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 InboundConnectionCacheconnectionCacheprotected longenqueueTimeprotected java.lang.Stringhostnameprotected booleaninitializedprotected intlocatorPortprotected java.lang.Stringnameprotected intportprotected java.lang.Stringtypeprotected ORBUtilSystemExceptionwrapper-
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 voidaddToIORTemplate(IORTemplate iorTemplate, Policies policies, java.lang.String codebase)CDROutputObjectcreateOutputObject(ORB broker, MessageMediator messageMediator)AcceptorgetAcceptor()ConnectiongetConnection()InboundConnectionCachegetConnectionCache()java.lang.StringgetConnectionCacheType()longgetEnqueueTime()This methods gets the time in millis in the work item, when this work item was enqueued in the work queue.EventHandlergetEventHandler()java.lang.StringgetHost()java.lang.StringgetHostName()Get the host name of this end point.intgetInterestOps()java.lang.StringgetInterfaceName()intgetLocatorPort()The ORBD's proxy port of this end point.java.lang.StringgetMonitoringName()java.lang.StringgetName()This method will return the name of the work item.intgetPort()java.lang.StringgetType()e.g.: "CLEAR_TEXT", "SSL", ...booleaninitialized()Used to determine if anAcceptorhas been initialized.booleanisLazy()protected IIOPProfileTemplatemakeIIOPProfileTemplate(Policies policies, java.lang.String codebase)voidprocessSocket(java.net.Socket socket)Handle a newly accepted Socket.voidsetConnectionCache(InboundConnectionCache connectionCache)voidsetEnqueueTime(long timeInMillis)This methods sets the time in millis in the work item, when this work item was enqueued in the work queue.voidsetLocatorPort(int port)booleanshouldRegisterAcceptEvent()Used to determine if theAcceptorshould register with a Selector to handle accept events.java.lang.StringtoString()protected java.lang.StringtoStringName()-
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:
getPortin interfaceAcceptor- Specified by:
getPortin interfaceLegacyServerSocketEndPointInfo- Specified by:
getPortin interfaceSocketInfo
-
getInterfaceName
public java.lang.String getInterfaceName()
- Specified by:
getInterfaceNamein interfaceAcceptor
-
getName
public java.lang.String getName()
Description copied from interface:WorkThis method will return the name of the work item.- Specified by:
getNamein interfaceLegacyServerSocketEndPointInfo- Specified by:
getNamein interfaceWork
-
getType
public java.lang.String getType()
Description copied from interface:LegacyServerSocketEndPointInfoe.g.: "CLEAR_TEXT", "SSL", ...- Specified by:
getTypein interfaceAcceptor- Specified by:
getTypein interfaceLegacyServerSocketEndPointInfo- Specified by:
getTypein interfaceSocketInfo- Returns:
- type
-
processSocket
public void processSocket(java.net.Socket socket)
Description copied from interface:AcceptorHandle a newly accepted Socket.- Specified by:
processSocketin interfaceAcceptor- Parameters:
socket- socket to handle
-
addToIORTemplate
public void addToIORTemplate(IORTemplate iorTemplate, Policies policies, java.lang.String codebase)
- Specified by:
addToIORTemplatein interfaceAcceptor
-
makeIIOPProfileTemplate
protected final IIOPProfileTemplate makeIIOPProfileTemplate(Policies policies, java.lang.String codebase)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringName
protected java.lang.String toStringName()
-
getHost
public java.lang.String getHost()
- Specified by:
getHostin interfaceSocketInfo
-
getHostName
public java.lang.String getHostName()
Description copied from interface:LegacyServerSocketEndPointInfoGet 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:
getHostNamein interfaceLegacyServerSocketEndPointInfo- Returns:
- the host name
-
getLocatorPort
public int getLocatorPort()
Description copied from interface:LegacyServerSocketEndPointInfoThe ORBD's proxy port of this end point. Note: Pre-ORT "port-exchange" model.- Specified by:
getLocatorPortin interfaceLegacyServerSocketEndPointInfo- Returns:
- proxy port
-
setLocatorPort
public void setLocatorPort(int port)
- Specified by:
setLocatorPortin interfaceLegacyServerSocketEndPointInfo
-
getConnectionCache
public InboundConnectionCache getConnectionCache()
- Specified by:
getConnectionCachein interfaceAcceptor
-
getConnectionCacheType
public java.lang.String getConnectionCacheType()
- Specified by:
getConnectionCacheTypein interfaceAcceptor
-
getEnqueueTime
public long getEnqueueTime()
Description copied from interface:WorkThis methods gets the time in millis in the work item, when this work item was enqueued in the work queue.- Specified by:
getEnqueueTimein interfaceWork
-
getMonitoringName
public java.lang.String getMonitoringName()
- Specified by:
getMonitoringNamein interfaceAcceptor
-
initialized
public boolean initialized()
Description copied from interface:AcceptorUsed to determine if anAcceptorhas been initialized.- Specified by:
initializedin interfaceAcceptor- Returns:
true. if theAcceptorhas been initialized.
-
setConnectionCache
public void setConnectionCache(InboundConnectionCache connectionCache)
- Specified by:
setConnectionCachein interfaceAcceptor
-
setEnqueueTime
public void setEnqueueTime(long timeInMillis)
Description copied from interface:WorkThis methods sets the time in millis in the work item, when this work item was enqueued in the work queue.- Specified by:
setEnqueueTimein interfaceWork
-
getEventHandler
public EventHandler getEventHandler()
- Specified by:
getEventHandlerin interfaceAcceptor
-
getAcceptor
public Acceptor getAcceptor()
- Specified by:
getAcceptorin interfaceEventHandler
-
getConnection
public Connection getConnection()
- Specified by:
getConnectionin interfaceEventHandler
-
createOutputObject
public CDROutputObject createOutputObject(ORB broker, MessageMediator messageMediator)
- Specified by:
createOutputObjectin interfaceAcceptor
-
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- Returns:
trueif theAcceptorshould be registered with a Selector.
-
getInterestOps
public int getInterestOps()
- Specified by:
getInterestOpsin interfaceEventHandler
-
-