Class AcceptorLazyImpl
java.lang.Object
com.sun.corba.ee.impl.transport.EventHandlerBase
com.sun.corba.ee.impl.transport.AcceptorBase
com.sun.corba.ee.impl.transport.AcceptorLazyImpl
- All Implemented Interfaces:
LegacyServerSocketEndPointInfo, Work, Acceptor, EventHandler, SocketInfo
A version of an Acceptor that does not own the ServerSocket.
Instead, SelectableChannels obtained from the ServerSocket are
given to the processSocket method
-
Field Summary
Fields inherited from class AcceptorBase
connectionCache, enqueueTime, hostname, initialized, locatorPort, name, port, type, wrapperFields inherited from class EventHandlerBase
orb, selectionKey, useSelectThreadToWait, useWorkerThreadForEvent, workFields inherited from interface LegacyServerSocketEndPointInfo
BOOT_NAMING, DEFAULT_ENDPOINT, NO_NAMEFields inherited from interface SocketInfo
IIOP_CLEAR_TEXT, SSL_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close theAcceptor.voiddoWork()This method denotes the actual work that is done by the work item.Blocks until a new Socket is available on the acceptor's port.booleanUsed to initialize anAcceptor.booleanisLazy()booleanUsed to determine if theAcceptorshould register with a Selector to handle accept events.Methods inherited from class AcceptorBase
addToIORTemplate, createOutputObject, getAcceptor, getConnection, getConnectionCache, getConnectionCacheType, getEnqueueTime, getEventHandler, getHost, getHostName, getInterestOps, getInterfaceName, getLocatorPort, getMonitoringName, getName, getPort, getType, initialized, makeIIOPProfileTemplate, processSocket, setConnectionCache, setEnqueueTime, setLocatorPort, toString, toStringNameMethods inherited from class EventHandlerBase
getSelectionKey, getWork, handleEvent, setSelectionKey, setUseSelectThreadToWait, setUseWorkerThreadForEvent, setWork, shouldUseSelectThreadToWait, shouldUseWorkerThreadForEvent
-
Constructor Details
-
AcceptorLazyImpl
-
-
Method Details
-
isLazy
public boolean isLazy()- Specified by:
isLazyin interfaceAcceptor- Overrides:
isLazyin classAcceptorBase
-
getAcceptedSocket
-
getChannel
-
initialize
public boolean initialize()Description copied from interface:AcceptorUsed to initialize anAcceptor. For example, initialization may mean to create aServerSocketChannel. Note: this must be prepared to be be called multiple times.- Returns:
truewhen it performs initializatin actions (typically the first call.
-
close
-
getServerSocket
-
doWork
public void doWork()Description copied from interface:WorkThis method denotes the actual work that is done by the work item. -
shouldRegisterAcceptEvent
public boolean shouldRegisterAcceptEvent()Description copied from interface:AcceptorUsed to determine if theAcceptorshould register with a Selector to handle accept events. For example, this may be false in the case of Solaris Doors which do not actively listen.- Specified by:
shouldRegisterAcceptEventin interfaceAcceptor- Overrides:
shouldRegisterAcceptEventin classAcceptorBase- Returns:
trueif theAcceptorshould be registered with a Selector.
-