Interface Connection

All Superinterfaces:
Connection
All Known Implementing Classes:
ConnectionImpl, NoConnectionCacheImpl.NCCConnectionImpl, SocketFactoryConnectionImpl

public interface Connection extends Connection
  • Field Details

  • Method Details

    • shouldRegisterReadEvent

      boolean shouldRegisterReadEvent()
      Used to determine if the Connection should register with the CorbaTransportManager Selector to handle read events. For example, an HTTP transport would not register since the requesting thread would just block on read when waiting for the reply.
      Returns:
      true if it should be registered.
    • shouldRegisterServerReadEvent

      boolean shouldRegisterServerReadEvent()
      Used to determine if the Connection should register with the CorbaTransportManager Selector to handle read events. For example, an HTTP transport would not register since the requesting thread would just block on read when waiting for the reply.
      Returns:
      true if it should be registered.
    • read

      boolean read()
      Called to read incoming messages.
      Returns:
      true if the thread calling read can be released.
    • close

      void close()
    • getAcceptor

      Acceptor getAcceptor()
    • getContactInfo

      ContactInfo getContactInfo()
    • getEventHandler

      EventHandler getEventHandler()
    • isServer

      boolean isServer()
      Indicates whether a CorbaContactInfo or CorbaAcceptor created the Connection.
      Returns:
      true if a CorbaAcceptor created the Connection.
    • isClosed

      boolean isClosed()
      Indicates if the Connection is closed.
      Returns:
      true if the Connection is closed.
    • isBusy

      boolean isBusy()
      Indicates if the Connection is in the process of sending or receiving a message.
      Returns:
      true if the Connection is busy.
    • getTimeStamp

      long getTimeStamp()
      Timestamps are used for connection management, in particular, for reclaiming idle Connections.
      Returns:
      the "time" the Connection was last used.
    • setTimeStamp

      void setTimeStamp(long time)
      Timestamps are used for connection management, in particular, for reclaiming idle Connections.
      Parameters:
      time - - the "time" the Connection was last used.
    • setState

      void setState(String state)
      The "state" of the Connection.
      Parameters:
      state - state to set
    • writeLock

      void writeLock()
      Grab a write lock on the Connection. If another thread already has a write lock then the calling thread will block until the lock is released. The calling thread must call writeUnlock() when it is done.
    • writeUnlock

      void writeUnlock()
      Release a write lock on the Connection.
    • sendWithoutLock

      void sendWithoutLock(CDROutputObject outputObject)
    • registerWaiter

      void registerWaiter(MessageMediator messageMediator)
      Register an invocation's CorbaMessageMediator with the Connection. This is useful in protocols which support fragmentation.
      Parameters:
      messageMediator - mediator to register
    • waitForResponse

      CDRInputObject waitForResponse(MessageMediator messageMediator)
      If a message expect's a response then this method is called. This method might block on a read (e.g., HTTP), put the calling thread to sleep while another thread read's the response (e.g., GIOP), or it may use the calling thread to perform the server-side work (e.g., Solaris Doors).
      Parameters:
      messageMediator - mediator to process
      Returns:
      stream
    • unregisterWaiter

      void unregisterWaiter(MessageMediator messageMediator)
      Unregister an invocation's * CorbaMessageMediator with the Connection.
      Parameters:
      messageMediator - mediator to unregister
    • setConnectionCache

      void setConnectionCache(ConnectionCache connectionCache)
    • getConnectionCache

      ConnectionCache getConnectionCache()
    • hasSocketChannel

      boolean hasSocketChannel()
    • write

      void write(ByteBuffer byteBuffer) throws IOException
      Throws:
      IOException
    • getNextRequestId

      int getNextRequestId()
    • getBroker

      ORB getBroker()
    • getCodeSetContext

    • setCodeSetContext

      void setCodeSetContext(CodeSetComponentInfo.CodeSetContext csc)
    • clientRequestMapGet

      MessageMediator clientRequestMapGet(int requestId)
    • clientReply_1_1_Put

      void clientReply_1_1_Put(MessageMediator x)
    • clientReply_1_1_Get

      MessageMediator clientReply_1_1_Get()
    • clientReply_1_1_Remove

      void clientReply_1_1_Remove()
    • serverRequest_1_1_Put

      void serverRequest_1_1_Put(MessageMediator x)
    • serverRequest_1_1_Get

      MessageMediator serverRequest_1_1_Get()
    • serverRequest_1_1_Remove

      void serverRequest_1_1_Remove()
    • isPostInitialContexts

      boolean isPostInitialContexts()
    • setPostInitialContexts

      void setPostInitialContexts()
    • purgeCalls

      void purgeCalls(SystemException systemException, boolean die, boolean lockHeld)
    • setCodeBaseIOR

      void setCodeBaseIOR(IOR ior)
    • getCodeBaseIOR

      IOR getCodeBaseIOR()
    • getCodeBase

      CodeBase getCodeBase()
    • sendCloseConnection

      void sendCloseConnection(GIOPVersion giopVersion) throws IOException
      Throws:
      IOException
    • sendMessageError

      void sendMessageError(GIOPVersion giopVersion) throws IOException
      Throws:
      IOException
    • sendCancelRequest

      void sendCancelRequest(GIOPVersion giopVersion, int requestId) throws IOException
      Throws:
      IOException
    • sendCancelRequestWithLock

      void sendCancelRequestWithLock(GIOPVersion giopVersion, int requestId) throws IOException
      Throws:
      IOException
    • getResponseWaitingRoom

      ResponseWaitingRoom getResponseWaitingRoom()
    • serverRequestMapPut

      void serverRequestMapPut(int requestId, MessageMediator messageMediator)
    • serverRequestMapGet

      MessageMediator serverRequestMapGet(int requestId)
    • serverRequestMapRemove

      void serverRequestMapRemove(int requestId)
    • getFragmentList

      Queue<MessageMediator> getFragmentList(RequestId corbaRequestId)
    • removeFragmentList

      void removeFragmentList(RequestId corbaRequestId)
    • getSocketChannel

      SocketChannel getSocketChannel()
    • serverRequestProcessingBegins

      void serverRequestProcessingBegins()
    • serverRequestProcessingEnds

      void serverRequestProcessingEnds()
    • closeConnectionResources

      void closeConnectionResources()
      Clean up all connection resources. Used when shutting down an ORB.