Class ORBLazyServiceInitializer
- java.lang.Object
-
- org.glassfish.enterprise.iiop.api.ORBLazyServiceInitializer
-
- All Implemented Interfaces:
org.glassfish.hk2.api.PostConstruct,LazyServiceInitializer
@Service @Named("iiop-service") public class ORBLazyServiceInitializer extends Object implements LazyServiceInitializer, org.glassfish.hk2.api.PostConstruct- Author:
- Ken Saks
-
-
Constructor Summary
Constructors Constructor Description ORBLazyServiceInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetServiceName()voidhandleRequest(SelectableChannel channel)Upon successful ACCEPT of every request on this port, the service is called upon to handle the request.booleaninitializeService()Upon accepting the first request on the port (to which this listener is bound), the listener will select the appropriate provider and call this method to let the actual service initialize itself.voidpostConstruct()
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
getServiceName
public String getServiceName()
-
initializeService
public boolean initializeService()
Description copied from interface:LazyServiceInitializerUpon accepting the first request on the port (to which this listener is bound), the listener will select the appropriate provider and call this method to let the actual service initialize itself. All further accept requests on this port will wait while the service is initialized. Upon successful completion of service initialization, all pending requests are passed to the service using the handleRequest method- Specified by:
initializeServicein interfaceLazyServiceInitializer- Returns:
- Return true if service initialization went through fine; false otherwise
-
handleRequest
public void handleRequest(SelectableChannel channel)
Description copied from interface:LazyServiceInitializerUpon successful ACCEPT of every request on this port, the service is called upon to handle the request. The service is provided the channel itself. The service can setup connection, its characteristics, decide on blocking/non-blocking modes etc. The service is expected to return control back to the listener ASAP without consuming this thread for processing the requst completely.- Specified by:
handleRequestin interfaceLazyServiceInitializer- Parameters:
channel- where the incoming request was accepted.
-
-