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
Modifier and TypeMethodDescriptionvoidaddToIORTemplate(IORTemplate iorTemplate, Policies policies, String codebase) voidclose()Close theAcceptor.createOutputObject(ORB broker, MessageMediator messageMediator) Blocks until a new Socket is available on the acceptor's port.intgetPort()getType()booleanUsed to initialize anAcceptor.booleanUsed to determine if anAcceptorhas been initialized.booleanisLazy()voidprocessSocket(Socket channel) Handle a newly accepted Socket.voidsetConnectionCache(InboundConnectionCache connectionCache) booleanUsed to determine if theAcceptorshould register with a Selector to handle accept events.
-
Method Details
-
getPort
@ManagedAttribute @Description("The TCP port of this Acceptor") int getPort() -
getInterfaceName
@ManagedAttribute @Description("The name of the IP interface for this Acceptor") String getInterfaceName() -
getType
-
isLazy
@ManagedAttribute @Description("True if this acceptor is used to lazily start the ORB") boolean isLazy() -
addToIORTemplate
-
getMonitoringName
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:
truewhen it performs initializatin actions (typically the first call.
-
initialized
boolean initialized()Used to determine if anAcceptorhas been initialized.- Returns:
true. if theAcceptorhas been initialized.
-
getConnectionCacheType
String getConnectionCacheType() -
setConnectionCache
-
getConnectionCache
InboundConnectionCache getConnectionCache() -
shouldRegisterAcceptEvent
boolean shouldRegisterAcceptEvent()Used 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.- Returns:
trueif theAcceptorshould be registered with a Selector.
-
getAcceptedSocket
Socket getAcceptedSocket()Blocks until a new Socket is available on the acceptor's port.- Returns:
- the new socket
-
processSocket
Handle a newly accepted Socket.- Parameters:
channel- socket to handle
-
close
void close()Close theAcceptor. -
getEventHandler
EventHandler getEventHandler() -
createOutputObject
-
getServerSocket
ServerSocket getServerSocket()
-