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
Fields Modifier and Type Field Description protected InboundConnectionCache
connectionCache
protected long
enqueueTime
protected java.lang.String
hostname
protected boolean
initialized
protected int
locatorPort
protected java.lang.String
name
protected int
port
protected java.lang.String
type
protected ORBUtilSystemException
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 Constructor Description AcceptorBase(ORB orb, int port, java.lang.String name, java.lang.String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToIORTemplate(IORTemplate iorTemplate, Policies policies, java.lang.String codebase)
CDROutputObject
createOutputObject(ORB broker, MessageMediator messageMediator)
Acceptor
getAcceptor()
Connection
getConnection()
InboundConnectionCache
getConnectionCache()
java.lang.String
getConnectionCacheType()
long
getEnqueueTime()
This methods gets the time in millis in the work item, when this work item was enqueued in the work queue.EventHandler
getEventHandler()
java.lang.String
getHost()
java.lang.String
getHostName()
Get the host name of this end point.int
getInterestOps()
java.lang.String
getInterfaceName()
int
getLocatorPort()
The ORBD's proxy port of this end point.java.lang.String
getMonitoringName()
java.lang.String
getName()
This method will return the name of the work item.int
getPort()
java.lang.String
getType()
e.g.: "CLEAR_TEXT", "SSL", ...boolean
initialized()
Used to determine if anAcceptor
has been initialized.boolean
isLazy()
protected IIOPProfileTemplate
makeIIOPProfileTemplate(Policies policies, java.lang.String codebase)
void
processSocket(java.net.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
shouldRegisterAcceptEvent()
Used to determine if theAcceptor
should register with a Selector to handle accept events.java.lang.String
toString()
protected java.lang.String
toStringName()
-
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 Detail
-
wrapper
protected ORBUtilSystemException wrapper
-
port
protected int port
-
enqueueTime
protected long enqueueTime
-
initialized
protected boolean initialized
-
type
protected java.lang.String type
-
name
protected java.lang.String name
-
hostname
protected java.lang.String hostname
-
locatorPort
protected int locatorPort
-
connectionCache
protected InboundConnectionCache connectionCache
-
-
Constructor Detail
-
AcceptorBase
public AcceptorBase(ORB orb, int port, java.lang.String name, java.lang.String type)
-
-
Method Detail
-
getPort
public int getPort()
- Specified by:
getPort
in interfaceAcceptor
- Specified by:
getPort
in interfaceLegacyServerSocketEndPointInfo
- Specified by:
getPort
in interfaceSocketInfo
-
getInterfaceName
public java.lang.String getInterfaceName()
- Specified by:
getInterfaceName
in interfaceAcceptor
-
getName
public java.lang.String 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
public java.lang.String 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
-
processSocket
public void processSocket(java.net.Socket socket)
Description copied from interface:Acceptor
Handle a newly accepted Socket.- Specified by:
processSocket
in interfaceAcceptor
- Parameters:
socket
- socket to handle
-
addToIORTemplate
public void addToIORTemplate(IORTemplate iorTemplate, Policies policies, java.lang.String codebase)
- Specified by:
addToIORTemplate
in interfaceAcceptor
-
makeIIOPProfileTemplate
protected final IIOPProfileTemplate makeIIOPProfileTemplate(Policies policies, java.lang.String codebase)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringName
protected java.lang.String toStringName()
-
getHost
public java.lang.String getHost()
- Specified by:
getHost
in interfaceSocketInfo
-
getHostName
public java.lang.String 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
public InboundConnectionCache getConnectionCache()
- Specified by:
getConnectionCache
in interfaceAcceptor
-
getConnectionCacheType
public java.lang.String 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
public java.lang.String 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
public void setConnectionCache(InboundConnectionCache connectionCache)
- 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
public EventHandler getEventHandler()
- Specified by:
getEventHandler
in interfaceAcceptor
-
getAcceptor
public Acceptor getAcceptor()
- Specified by:
getAcceptor
in interfaceEventHandler
-
getConnection
public Connection getConnection()
- Specified by:
getConnection
in interfaceEventHandler
-
createOutputObject
public CDROutputObject createOutputObject(ORB broker, MessageMediator messageMediator)
- 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
-
-