Package com.sun.corba.ee.impl.transport
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 com.sun.corba.ee.impl.transport.AcceptorBase
connectionCache, enqueueTime, hostname, initialized, locatorPort, name, port, type, wrapper
Fields inherited from class com.sun.corba.ee.impl.transport.EventHandlerBase
orb, selectionKey, useSelectThreadToWait, useWorkerThreadForEvent, work
Fields inherited from interface com.sun.corba.ee.spi.legacy.connection.LegacyServerSocketEndPointInfo
BOOT_NAMING, DEFAULT_ENDPOINT, NO_NAME
Fields inherited from interface com.sun.corba.ee.spi.transport.SocketInfo
IIOP_CLEAR_TEXT, SSL_PREFIX
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close theAcceptor
.void
doWork()
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.boolean
Used to initialize anAcceptor
.boolean
isLazy()
boolean
Used to determine if theAcceptor
should register with a Selector to handle accept events.Methods inherited from class com.sun.corba.ee.impl.transport.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, toStringName
Methods inherited from class com.sun.corba.ee.impl.transport.EventHandlerBase
getSelectionKey, getWork, handleEvent, setSelectionKey, setUseSelectThreadToWait, setUseWorkerThreadForEvent, setWork, shouldUseSelectThreadToWait, shouldUseWorkerThreadForEvent
-
Constructor Details
-
AcceptorLazyImpl
-
-
Method Details
-
isLazy
public boolean isLazy()- Specified by:
isLazy
in interfaceAcceptor
- Overrides:
isLazy
in classAcceptorBase
-
getAcceptedSocket
Description copied from interface:Acceptor
Blocks until a new Socket is available on the acceptor's port.- Returns:
- the new socket
-
getChannel
-
initialize
public boolean initialize()Description copied from interface:Acceptor
Used to initialize anAcceptor
. For example, initialization may mean to create aServerSocketChannel
. Note: this must be prepared to be be called multiple times.- Returns:
true
when it performs initializatin actions (typically the first call.
-
close
public void close()Description copied from interface:Acceptor
Close theAcceptor
. -
getServerSocket
-
doWork
public void doWork()Description copied from interface:Work
This method denotes the actual work that is done by the work item. -
shouldRegisterAcceptEvent
public boolean shouldRegisterAcceptEvent()Description copied from interface:Acceptor
Used to determine if theAcceptor
should 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:
shouldRegisterAcceptEvent
in interfaceAcceptor
- Overrides:
shouldRegisterAcceptEvent
in classAcceptorBase
- Returns:
true
if theAcceptor
should be registered with a Selector.
-