use of org.glassfish.orb.admin.config.IiopListener in project Payara by payara.
the class CreateIiopListenerTest method testExecuteSuccessNoValueOptionEnabled.
/**
* Test of execute method, of class CreateIiopListener when enabled has no value
* asadmin create-iiop-listener --listeneraddress localhost
* --iiopport 4440 --enable iiop_1
*/
@Test
public void testExecuteSuccessNoValueOptionEnabled() {
parameters.set("listeneraddress", "localhost");
parameters.set("iiopport", "4440");
parameters.set("listener_id", "iiop_1");
parameters.set("enabled", "");
CreateIiopListener command = services.getService(CreateIiopListener.class);
cr.getCommandInvocation("create-iiop-listener", context.getActionReport(), adminSubject()).parameters(parameters).execute(command);
checkActionReport(context.getActionReport());
boolean isCreated = false;
List<IiopListener> listenerList = iiopService.getIiopListener();
for (IiopListener listener : listenerList) {
if (listener.getId().equals("iiop_1")) {
assertEquals("localhost", listener.getAddress());
assertEquals("true", listener.getEnabled());
assertEquals("4440", listener.getPort());
isCreated = true;
logger.fine("IIOPListener name iiop_1 is created.");
break;
}
}
assertTrue(isCreated);
logger.fine("msg: " + context.getActionReport().getMessage());
}
use of org.glassfish.orb.admin.config.IiopListener in project Payara by payara.
the class ListIiopListenersTest method setUp.
@Before
public void setUp() {
services = getHabitat();
IiopService iiopService = services.getService(IiopService.class);
parameters = new ParameterMap();
cr = services.getService(CommandRunner.class);
context = new AdminCommandContextImpl(LogDomains.getLogger(ListIiopListenersTest.class, LogDomains.ADMIN_LOGGER), new PropsFileActionReporter());
List<IiopListener> listenerList = iiopService.getIiopListener();
origNum = listenerList.size();
}
use of org.glassfish.orb.admin.config.IiopListener in project Payara by payara.
the class ORBConnectorStartup method initializeLazyListener.
/**
* Start Grizzly based ORB lazy listener, which is going to initialize
* ORB container on first request.
*/
private void initializeLazyListener() {
final IiopService iiopService = config.getExtensionByType(IiopService.class);
if (iiopService != null) {
List<IiopListener> iiopListenerList = iiopService.getIiopListener();
for (IiopListener oneListener : iiopListenerList) {
if (Boolean.valueOf(oneListener.getEnabled()) && Boolean.valueOf(oneListener.getLazyInit())) {
NetworkListener dummy = new DummyNetworkListener();
dummy.setPort(oneListener.getPort());
dummy.setAddress(oneListener.getAddress());
dummy.setProtocol("light-weight-listener");
dummy.setTransport("tcp");
dummy.setName("iiop-service");
grizzlyService.createNetworkProxy(dummy);
}
}
}
}
Aggregations