FileDocCategorySizeDatePackage
Acceptor.javaAPI DocJava SE 5 API6386Fri Aug 26 14:54:34 BST 2005com.sun.corba.se.pept.transport

Acceptor

public interface Acceptor

The primary PEPt server-side plug-in point and enabler for altenate encodings, protocols and transports.

Acceptor is a factory for client-side artifacts used to receive a message (and possibly send a response).

author
Harold Carr

Fields Summary
Constructors Summary
Methods Summary
public voidaccept()
Accept a connection request. This is called either when the selector gets an accept event for this Acceptor or by a {@link com.sun.corba.se.pept.transport.ListenerThread ListenerThread}. It results in a {@link com.sun.corba.se.pept.transport.Connection Connection} being created.

public voidclose()
Close the Acceptor.

public com.sun.corba.se.pept.encoding.InputObjectcreateInputObject(com.sun.corba.se.pept.broker.Broker broker, com.sun.corba.se.pept.protocol.MessageMediator messageMediator)
Used to get a {@link com.sun.corba.se.pept.encoding.InputObject InputObject} for the specific encoding represented by this Acceptor.

return
{@link com.sun.corba.se.pept.encoding.InputObject InputObject}

public com.sun.corba.se.pept.protocol.MessageMediatorcreateMessageMediator(com.sun.corba.se.pept.broker.Broker xbroker, com.sun.corba.se.pept.transport.Connection xconnection)
Used to get a {@link com.sun.corba.se.pept.protocol.MessageMeidator MessageMediator} to hold internal data for a message received using the specific encoding, protocol, transport combination represented by this Acceptor.

return
{@link com.sun.corba.se.pept.protocol.MessageMeidator MessageMediator}

public com.sun.corba.se.pept.encoding.OutputObjectcreateOutputObject(com.sun.corba.se.pept.broker.Broker broker, com.sun.corba.se.pept.protocol.MessageMediator messageMediator)
Used to get a {@link com.sun.corba.se.pept.encoding.OutputObject OutputObject} for the specific encoding represented by this Acceptor.

return
{@link com.sun.corba.se.pept.encoding.OutputObject OutputObject}

public com.sun.corba.se.pept.protocol.MessageMediatorfinishCreatingMessageMediator(com.sun.corba.se.pept.broker.Broker broker, com.sun.corba.se.pept.transport.Connection xconnection, com.sun.corba.se.pept.protocol.MessageMediator messageMediator)
Used to finish creating a {@link com.sun.corba.se.pept.protocol.MessageMeidator MessageMediator} to with internal data for a message received using the specific encoding, protocol, transport combination represented by this Acceptor.

return
{@link com.sun.corba.se.pept.protocol.MessageMediator MessageMediator}

public InboundConnectionCachegetConnectionCache()
Get the {@link com.sun.corba.se.pept.transport.Inbound.ConnectionCache InboundConnectionCache} used by this Acceptor PEPt uses separate caches for each type of Acceptor as given by {@link #getConnectionCacheType}. {@link #setConnectionCache} and {@link #getConnectionCache} support an optimzation to avoid hashing to find that cache.

return
{@link com.sun.corba.se.pept.transport.ConnectionCache ConnectionCache}

public java.lang.StringgetConnectionCacheType()
PEPt uses separate caches for each type of Acceptor as given by getConnectionCacheType.

return
{@link java.lang.String}

public com.sun.corba.se.pept.transport.EventHandlergetEventHandler()
Get the {@link com.sun.corba.se.pept.transport.EventHandler EventHandler} associated with this Acceptor.

return
{@link com.sun.corba.se.pept.transport.EventHandler EventHandler}

public booleaninitialize()
Used to initialize an Acceptor. For example, initialization may mean to create a {@link java.nio.channels.ServerSocketChannel ServerSocketChannel}. Note: this must be prepared to be be called multiple times.

return
true when it performs initializatin actions (typically the first call.

public booleaninitialized()
Used to determine if an Acceptor has been initialized.

return
trueAcceptor has been initialized.

public voidsetConnectionCache(InboundConnectionCache connectionCache)
Set the {@link com.sun.corba.se.pept.transport.Inbound.ConnectionCache InboundConnectionCache} to be used by this Acceptor. PEPt uses separate caches for each type of Acceptor as given by {@link #getConnectionCacheType}. {@link #setConnectionCache} and {@link #getConnectionCache} support an optimzation to avoid hashing to find that cache.

param
connectionCache.

public booleanshouldRegisterAcceptEvent()
Used to determine if the Acceptor should register with {@link com.sun.corba.se.pept.transport.Selector Selector} to handle accept events. For example, this may be false in the case of Solaris Doors which do not actively listen.

return
true if the Acceptor should be registered with {@link com.sun.corba.se.pept.transport.Selector Selector}