use of com.sun.corba.ee.spi.transport.Acceptor in project Payara by payara.
the class PEORBConfigurator method addAcceptor.
private Acceptor addAcceptor(org.omg.CORBA.ORB orb, boolean isLazy, String host, String type, int port) {
com.sun.corba.ee.spi.orb.ORB theOrb = (com.sun.corba.ee.spi.orb.ORB) orb;
TransportManager ctm = theOrb.getTransportManager();
Acceptor acceptor;
if (isLazy) {
acceptor = TransportDefault.makeLazyCorbaAcceptor(theOrb, port, host, type);
} else {
acceptor = TransportDefault.makeStandardCorbaAcceptor(theOrb, port, host, type);
}
ctm.registerAcceptor(acceptor);
return acceptor;
}
use of com.sun.corba.ee.spi.transport.Acceptor in project Payara by payara.
the class PEORBConfigurator method createORBListeners.
private void createORBListeners(IIOPUtils iiopUtils, IiopListener[] iiopListenerBeans, org.omg.CORBA.ORB orb) {
if (iiopListenerBeans != null) {
int lazyCount = 0;
for (IiopListener ilb : iiopListenerBeans) {
boolean securityEnabled = Boolean.valueOf(ilb.getSecurityEnabled());
boolean isLazy = Boolean.valueOf(ilb.getLazyInit());
if (isLazy) {
lazyCount++;
}
if (lazyCount > 1) {
throw new IllegalStateException("Invalid iiop-listener " + ilb.getId() + ". Only one iiop-listener can be configured " + "with lazy-init=true");
}
int port = Integer.parseInt(ilb.getPort());
String host = handleAddrAny(ilb.getAddress());
if (!securityEnabled || ilb.getSsl() == null) {
Acceptor acceptor = addAcceptor(orb, isLazy, host, IIOP_CLEAR_TEXT_CONNECTION, port);
if (isLazy) {
lazyAcceptor = acceptor;
}
} else {
if (isLazy) {
throw new IllegalStateException("Invalid iiop-listener " + ilb.getId() + ". Lazy-init not supported for SSL iiop-listeners");
}
Ssl sslBean = ilb.getSsl();
assert sslBean != null;
boolean clientAuth = Boolean.valueOf(sslBean.getClientAuthEnabled());
String type = clientAuth ? SSL_MUTUALAUTH : SSL;
addAcceptor(orb, isLazy, host, type, port);
}
}
if (lazyCount == 1) {
getHelper().setSelectableChannelDelegate(new AcceptorDelegateImpl(lazyAcceptor));
}
}
}
Aggregations