WSTCPLifeCycleModulepublic final class WSTCPLifeCycleModule extends Object implements com.sun.appserv.server.LifecycleListenerGlassFish lifecycle module, which works as SOAP/TCP endpoints registry. |
Fields Summary |
---|
private static WSTCPLifeCycleModule | instance | private static final Logger | logger | private WSTCPConnector | connector | private WSTCPDelegate | delegate | private Properties | properties |
Methods Summary |
---|
public void | free(java.lang.String contextPath, java.util.List adapters)
delegate.freeAdapters(contextPath, adapters);
| public static com.sun.xml.ws.transport.tcp.server.glassfish.WSTCPLifeCycleModule | getInstance()Method returns initialized WSTCPLifeCycleModule instance
if (instance == null) {
throw new IllegalStateException(MessagesMessages.WSTCP_0007_TRANSPORT_MODULE_NOT_INITIALIZED());
}
return instance;
| public void | handleEvent(com.sun.appserv.server.LifecycleEvent lifecycleEvent)
final int eventType = lifecycleEvent.getEventType();
if (eventType == LifecycleEvent.INIT_EVENT) {
instance = this;
logger.log(Level.FINE, "WSTCPLifeCycleModule.INIT_EVENT");
properties = (Properties) lifecycleEvent.getData();
} else if (eventType == LifecycleEvent.STARTUP_EVENT) {
logger.log(Level.FINE, "WSTCPLifeCycleModule.STARTUP_EVENT");
delegate = new WSTCPDelegate();
} else if (eventType == LifecycleEvent.READY_EVENT) {
logger.log(Level.FINE, "WSTCPLifeCycleModule.READY_EVENT");
try {
delegate.setCustomWSRegistry(WSTCPAdapterRegistryImpl.getInstance());
connector = new GrizzlyTCPConnector(delegate, properties);
connector.listen();
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
}
} else if (eventType == LifecycleEvent.SHUTDOWN_EVENT) {
logger.log(Level.FINE, "WSTCPLifeCycleModule.SHUTDOWN_EVENT");
instance = null;
if (delegate != null) {
delegate.destroy();
}
if (connector != null) {
connector.close();
}
}
| public void | register(java.lang.String contextPath, java.util.List adapters)
delegate.registerAdapters(contextPath, adapters);
|
|