Interface Connection

    • Method Detail

      • 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()
      • 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​(java.lang.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.
      • 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)
      • hasSocketChannel

        boolean hasSocketChannel()
      • write

        void write​(java.nio.ByteBuffer byteBuffer)
            throws java.io.IOException
        Throws:
        java.io.IOException
      • getNextRequestId

        int getNextRequestId()
      • getBroker

        ORB getBroker()
      • clientRequestMapGet

        MessageMediator clientRequestMapGet​(int requestId)
      • clientReply_1_1_Remove

        void clientReply_1_1_Remove()
      • 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()
      • sendCloseConnection

        void sendCloseConnection​(GIOPVersion giopVersion)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • sendMessageError

        void sendMessageError​(GIOPVersion giopVersion)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • sendCancelRequest

        void sendCancelRequest​(GIOPVersion giopVersion,
                               int requestId)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • sendCancelRequestWithLock

        void sendCancelRequestWithLock​(GIOPVersion giopVersion,
                                       int requestId)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • serverRequestMapPut

        void serverRequestMapPut​(int requestId,
                                 MessageMediator messageMediator)
      • serverRequestMapGet

        MessageMediator serverRequestMapGet​(int requestId)
      • serverRequestMapRemove

        void serverRequestMapRemove​(int requestId)
      • removeFragmentList

        void removeFragmentList​(RequestId corbaRequestId)
      • getSocketChannel

        java.nio.channels.SocketChannel getSocketChannel()
      • serverRequestProcessingBegins

        void serverRequestProcessingBegins()
      • serverRequestProcessingEnds

        void serverRequestProcessingEnds()
      • closeConnectionResources

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