Package com.sun.corba.ee.spi.transport
Interface Acceptor
-
- All Known Implementing Classes:
AcceptorAcceptOnlyImpl
,AcceptorBase
,AcceptorImpl
,AcceptorLazyImpl
,ParserTable.TestAcceptor1
,ParserTable.TestAcceptor2
,SocketFactoryAcceptorImpl
@ManagedObject @Description("An Acceptor represents an endpoint on which the ORB handles incoming connections") public interface Acceptor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addToIORTemplate(IORTemplate iorTemplate, Policies policies, java.lang.String codebase)
void
close()
Close theAcceptor
.CDROutputObject
createOutputObject(ORB broker, MessageMediator messageMediator)
java.net.Socket
getAcceptedSocket()
Blocks until a new Socket is available on the acceptor's port.InboundConnectionCache
getConnectionCache()
java.lang.String
getConnectionCacheType()
EventHandler
getEventHandler()
java.lang.String
getInterfaceName()
java.lang.String
getMonitoringName()
int
getPort()
java.net.ServerSocket
getServerSocket()
java.lang.String
getType()
boolean
initialize()
Used to initialize anAcceptor
.boolean
initialized()
Used to determine if anAcceptor
has been initialized.boolean
isLazy()
void
processSocket(java.net.Socket channel)
Handle a newly accepted Socket.void
setConnectionCache(InboundConnectionCache connectionCache)
boolean
shouldRegisterAcceptEvent()
Used to determine if theAcceptor
should register with a Selector to handle accept events.
-
-
-
Method Detail
-
getPort
@ManagedAttribute @Description("The TCP port of this Acceptor") int getPort()
-
getInterfaceName
@ManagedAttribute @Description("The name of the IP interface for this Acceptor") java.lang.String getInterfaceName()
-
getType
@ManagedAttribute @Description("The type of requests that this Acceptor handles") java.lang.String getType()
-
isLazy
@ManagedAttribute @Description("True if this acceptor is used to lazily start the ORB") boolean isLazy()
-
addToIORTemplate
void addToIORTemplate(IORTemplate iorTemplate, Policies policies, java.lang.String codebase)
-
getMonitoringName
java.lang.String getMonitoringName()
-
initialize
boolean initialize()
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.
-
initialized
boolean initialized()
Used to determine if anAcceptor
has been initialized.- Returns:
true
. if theAcceptor
has been initialized.
-
getConnectionCacheType
java.lang.String getConnectionCacheType()
-
setConnectionCache
void setConnectionCache(InboundConnectionCache connectionCache)
-
getConnectionCache
InboundConnectionCache getConnectionCache()
-
shouldRegisterAcceptEvent
boolean shouldRegisterAcceptEvent()
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.- Returns:
true
if theAcceptor
should be registered with a Selector.
-
getAcceptedSocket
java.net.Socket getAcceptedSocket()
Blocks until a new Socket is available on the acceptor's port.- Returns:
- the new socket
-
processSocket
void processSocket(java.net.Socket channel)
Handle a newly accepted Socket.- Parameters:
channel
- socket to handle
-
close
void close()
Close theAcceptor
.
-
getEventHandler
EventHandler getEventHandler()
-
createOutputObject
CDROutputObject createOutputObject(ORB broker, MessageMediator messageMediator)
-
getServerSocket
java.net.ServerSocket getServerSocket()
-
-