+
+ public void setOvsdbRpcTaskTimeout(int timeout) {
+ JsonRpcEndpoint.setReaperInterval(timeout);
+ }
+
+ /**
+ * Set useSSL flag.
+ *
+ * @param flag boolean for using ssl
+ */
+ public void setUseSsl(boolean flag) {
+ useSSL = flag;
+ }
+
+ /**
+ * Blueprint property setter method. Blueprint call this method and set the value of json rpc decoder
+ * max frame length to the value configured for config option (json-rpc-decoder-max-frame-length) in
+ * the configuration file. This option is only configured at the boot time of the controller. Any
+ * change at the run time will have no impact.
+ * @param maxFrameLength Max frame length (default : 100000)
+ */
+ public void setJsonRpcDecoderMaxFrameLength(int maxFrameLength) {
+ jsonRpcDecoderMaxFrameLength = maxFrameLength;
+ LOG.info("Json Rpc Decoder Max Frame Length set to : {}", jsonRpcDecoderMaxFrameLength);
+ }
+
+ public void setOvsdbListenerIp(String ip) {
+ LOG.info("OVSDB IP for listening connection is set to : {}", ip);
+ listenerIp = ip;
+ }
+
+ public void setOvsdbListenerPort(int portNumber) {
+ LOG.info("OVSDB port for listening connection is set to : {}", portNumber);
+ listenerPort = portNumber;
+ }
+
+ public void updateConfigParameter(Map<String, Object> configParameters) {
+ if (configParameters != null && !configParameters.isEmpty()) {
+ LOG.debug("Config parameters received : {}", configParameters.entrySet());
+ for (Map.Entry<String, Object> paramEntry : configParameters.entrySet()) {
+ if (paramEntry.getKey().equalsIgnoreCase(OVSDB_RPC_TASK_TIMEOUT_PARAM)) {
+ setOvsdbRpcTaskTimeout(Integer.parseInt((String)paramEntry.getValue()));
+ } else if (paramEntry.getKey().equalsIgnoreCase(USE_SSL)) {
+ useSSL = Boolean.parseBoolean(paramEntry.getValue().toString());
+ }
+ }
+ }
+ }