- /**
- * A private method to set router policies for callback ports
- *
- * @params strRouterAdd String router address
- * @params strIoTSlaveControllerHostAdd String slave controller host address
- * @params strIoTSlaveObjectHostAdd String slave object host address
- * @params strProtocol String protocol
- * @return iPort Integer port number
- */
- private void setCallbackPortsPolicy(String strObjName, String strRouterAdd, String strIoTSlaveControllerHostAdd,
- String strIoTSlaveObjectHostAdd, String strProtocol) {
-
- int iNumCallbackPorts = Integer.parseInt(STR_NUM_CALLBACK_PORTS);
- Integer[] rmiCallbackPorts = commHan.getCallbackPorts(strObjName, iNumCallbackPorts);
-
- // Iterate over port numbers and set up policies
- for (int i=0; i<iNumCallbackPorts; i++) {
- routerConfig.configureRouterMainPolicies(strRouterAdd, strIoTSlaveControllerHostAdd, strIoTSlaveObjectHostAdd,
- strProtocol, rmiCallbackPorts[i]);
- routerConfig.configureHostMainPolicies(strIoTSlaveControllerHostAdd, strIoTSlaveControllerHostAdd, strIoTSlaveObjectHostAdd,
- strProtocol, rmiCallbackPorts[i]);
- routerConfig.configureHostMainPolicies(strIoTSlaveObjectHostAdd, strIoTSlaveControllerHostAdd, strIoTSlaveObjectHostAdd,
- strProtocol, rmiCallbackPorts[i]);
- }
- }