Package com.sun.corba.ee.impl.transport
Class AcceptorBase
java.lang.Object
com.sun.corba.ee.impl.transport.EventHandlerBase
com.sun.corba.ee.impl.transport.AcceptorBase
- All Implemented Interfaces:
LegacyServerSocketEndPointInfo
,Work
,Acceptor
,EventHandler
,SocketInfo
- Direct Known Subclasses:
AcceptorImpl
,AcceptorLazyImpl
public abstract class AcceptorBase
extends EventHandlerBase
implements Acceptor, Work, SocketInfo, LegacyServerSocketEndPointInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InboundConnectionCache
protected long
protected String
protected boolean
protected int
protected String
protected int
protected String
protected ORBUtilSystemException
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
addToIORTemplate
(IORTemplate iorTemplate, Policies policies, String codebase) createOutputObject
(ORB broker, MessageMediator messageMediator) long
This methods gets the time in millis in the work item, when this work item was enqueued in the work queue.getHost()
Get the host name of this end point.int
int
The ORBD's proxy port of this end point.getName()
This method will return the name of the work item.int
getPort()
getType()
e.g.: "CLEAR_TEXT", "SSL", ...boolean
Used to determine if anAcceptor
has been initialized.boolean
isLazy()
protected final IIOPProfileTemplate
makeIIOPProfileTemplate
(Policies policies, String codebase) void
processSocket
(Socket socket) Handle a newly accepted Socket.void
setConnectionCache
(InboundConnectionCache connectionCache) void
setEnqueueTime
(long timeInMillis) This methods sets the time in millis in the work item, when this work item was enqueued in the work queue.void
setLocatorPort
(int port) boolean
Used to determine if theAcceptor
should register with a Selector to handle accept events.toString()
protected String
Methods inherited from class com.sun.corba.ee.impl.transport.EventHandlerBase
getSelectionKey, getWork, handleEvent, setSelectionKey, setUseSelectThreadToWait, setUseWorkerThreadForEvent, setWork, shouldUseSelectThreadToWait, shouldUseWorkerThreadForEvent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sun.corba.ee.spi.transport.Acceptor
close, getAcceptedSocket, getServerSocket, initialize
Methods inherited from interface com.sun.corba.ee.spi.transport.EventHandler
getChannel
-
Field Details
-
wrapper
-
port
protected int port -
enqueueTime
protected long enqueueTime -
initialized
protected boolean initialized -
type
-
name
-
hostname
-
locatorPort
protected int locatorPort -
connectionCache
-
-
Constructor Details
-
AcceptorBase
-
-
Method Details
-
getPort
public int getPort()- Specified by:
getPort
in interfaceAcceptor
- Specified by:
getPort
in interfaceLegacyServerSocketEndPointInfo
- Specified by:
getPort
in interfaceSocketInfo
-
getInterfaceName
- Specified by:
getInterfaceName
in interfaceAcceptor
-
getName
Description copied from interface:Work
This method will return the name of the work item.- Specified by:
getName
in interfaceLegacyServerSocketEndPointInfo
- Specified by:
getName
in interfaceWork
-
getType
Description copied from interface:LegacyServerSocketEndPointInfo
e.g.: "CLEAR_TEXT", "SSL", ...- Specified by:
getType
in interfaceAcceptor
- Specified by:
getType
in interfaceLegacyServerSocketEndPointInfo
- Specified by:
getType
in interfaceSocketInfo
- Returns:
- type
-
isLazy
public boolean isLazy() -
processSocket
Description copied from interface:Acceptor
Handle a newly accepted Socket.- Specified by:
processSocket
in interfaceAcceptor
- Parameters:
socket
- socket to handle
-
addToIORTemplate
- Specified by:
addToIORTemplate
in interfaceAcceptor
-
makeIIOPProfileTemplate
-
toString
-
toStringName
-
getHost
- Specified by:
getHost
in interfaceSocketInfo
-
getHostName
Description copied from interface:LegacyServerSocketEndPointInfo
Get the host name of this end point. Subcontracts must use this instead of InetAddress.getHostName() because this would take into account the value of the ORBServerHost property.- Specified by:
getHostName
in interfaceLegacyServerSocketEndPointInfo
- Returns:
- the host name
-
getLocatorPort
public int getLocatorPort()Description copied from interface:LegacyServerSocketEndPointInfo
The ORBD's proxy port of this end point. Note: Pre-ORT "port-exchange" model.- Specified by:
getLocatorPort
in interfaceLegacyServerSocketEndPointInfo
- Returns:
- proxy port
-
setLocatorPort
public void setLocatorPort(int port) - Specified by:
setLocatorPort
in interfaceLegacyServerSocketEndPointInfo
-
getConnectionCache
- Specified by:
getConnectionCache
in interfaceAcceptor
-
getConnectionCacheType
- Specified by:
getConnectionCacheType
in interfaceAcceptor
-
getEnqueueTime
public long getEnqueueTime()Description copied from interface:Work
This methods gets the time in millis in the work item, when this work item was enqueued in the work queue.- Specified by:
getEnqueueTime
in interfaceWork
-
getMonitoringName
- Specified by:
getMonitoringName
in interfaceAcceptor
-
initialized
public boolean initialized()Description copied from interface:Acceptor
Used to determine if anAcceptor
has been initialized.- Specified by:
initialized
in interfaceAcceptor
- Returns:
true
. if theAcceptor
has been initialized.
-
setConnectionCache
- Specified by:
setConnectionCache
in interfaceAcceptor
-
setEnqueueTime
public void setEnqueueTime(long timeInMillis) Description copied from interface:Work
This methods sets the time in millis in the work item, when this work item was enqueued in the work queue.- Specified by:
setEnqueueTime
in interfaceWork
-
getEventHandler
- Specified by:
getEventHandler
in interfaceAcceptor
-
getAcceptor
- Specified by:
getAcceptor
in interfaceEventHandler
-
getConnection
- Specified by:
getConnection
in interfaceEventHandler
-
createOutputObject
- Specified by:
createOutputObject
in interfaceAcceptor
-
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
- Returns:
true
if theAcceptor
should be registered with a Selector.
-
getInterestOps
public int getInterestOps()- Specified by:
getInterestOps
in interfaceEventHandler
-