Interface Acceptor

All Known Subinterfaces:
CorbaAcceptor
All Known Implementing Classes:
ParserTable.TestAcceptor1, ParserTable.TestAcceptor2, SocketFactoryAcceptorImpl, SocketOrChannelAcceptorImpl

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
  • Method Details

    • initialize

      boolean initialize()
      Used to initialize an Acceptor. For example, initialization may mean to create a ServerSocketChannel. 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 an Acceptor has been initialized.
      Returns:
      true</code. if the Acceptor has been initialized.
    • getConnectionCacheType

      String getConnectionCacheType()
      PEPt uses separate caches for each type of Acceptor as given by getConnectionCacheType.
      Returns:
      String
    • setConnectionCache

      void setConnectionCache(InboundConnectionCache connectionCache)
      Set the InboundConnectionCache to be used by this Acceptor. PEPt uses separate caches for each type of Acceptor as given by getConnectionCacheType(). setConnectionCache(com.sun.corba.se.pept.transport.InboundConnectionCache) and getConnectionCache() support an optimzation to avoid hashing to find that cache.
      Parameters:
      connectionCache - .
    • getConnectionCache

      InboundConnectionCache getConnectionCache()
      Get the InboundConnectionCache used by this Acceptor PEPt uses separate caches for each type of Acceptor as given by getConnectionCacheType(). setConnectionCache(com.sun.corba.se.pept.transport.InboundConnectionCache) and getConnectionCache() support an optimzation to avoid hashing to find that cache.
      Returns:
      ConnectionCache
    • shouldRegisterAcceptEvent

      boolean shouldRegisterAcceptEvent()
      Used to determine if the Acceptor should register with 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 the Acceptor should be registered with Selector
    • accept

      void accept()
      Accept a connection request. This is called either when the selector gets an accept event for this Acceptor or by a ListenerThread. It results in a Connection being created.
    • close

      void close()
      Close the Acceptor.
    • getEventHandler

      EventHandler getEventHandler()
      Get the EventHandler associated with this Acceptor.
      Returns:
      EventHandler
    • createMessageMediator

      MessageMediator createMessageMediator(Broker xbroker, Connection xconnection)
      Used to get a MessageMediator to hold internal data for a message received using the specific encoding, protocol, transport combination represented by this Acceptor.
      Returns:
      MessageMediator
    • finishCreatingMessageMediator

      MessageMediator finishCreatingMessageMediator(Broker broker, Connection xconnection, MessageMediator messageMediator)
      Used to finish creating a MessageMediator to with internal data for a message received using the specific encoding, protocol, transport combination represented by this Acceptor.
      Returns:
      MessageMediator
    • createInputObject

      InputObject createInputObject(Broker broker, MessageMediator messageMediator)
      Used to get a InputObject for the specific encoding represented by this Acceptor.
      Returns:
      InputObject
    • createOutputObject

      OutputObject createOutputObject(Broker broker, MessageMediator messageMediator)
      Used to get a OutputObject for the specific encoding represented by this Acceptor.
      Returns:
      OutputObject