Class TargetContext


  • public class TargetContext
    extends Object
    When a connection is created, an object of this class is stored in the Connection Context. It is used as a holder for information required during the life-cycle of this connection.
    • Method Detail

      • getRequestMsgCtx

        public org.apache.axis2.context.MessageContext getRequestMsgCtx()
      • setRequestMsgCtx

        public void setRequestMsgCtx​(org.apache.axis2.context.MessageContext requestMsgCtx)
      • getReader

        public Pipe getReader()
      • getWriter

        public Pipe getWriter()
      • setReader

        public void setReader​(Pipe reader)
      • setWriter

        public void setWriter​(Pipe writer)
      • reset

        public void reset()
        Reset the resources associated with this context
      • reset

        public void reset​(boolean isError)
        Reset the resources associated with this context
        Parameters:
        isError - whether an error is causing this shutdown of the connection. It is very important to set this flag correctly. When an error causing the shutdown of the connections we should not release associated writer buffer to the pool as it might lead into situations like same buffer is getting released to both source and target buffer factories
      • updateState

        public static void updateState​(org.apache.http.nio.NHttpConnection conn,
                                       ProtocolState state)
      • assertState

        public static boolean assertState​(org.apache.http.nio.NHttpConnection conn,
                                          ProtocolState state)
      • getState

        public static ProtocolState getState​(org.apache.http.nio.NHttpConnection conn)
      • setRequest

        public static void setRequest​(org.apache.http.nio.NHttpConnection conn,
                                      TargetRequest request)
      • setResponse

        public static void setResponse​(org.apache.http.nio.NHttpConnection conn,
                                       TargetResponse response)
      • getRequest

        public static TargetRequest getRequest​(org.apache.http.nio.NHttpConnection conn)
      • getResponse

        public static TargetResponse getResponse​(org.apache.http.nio.NHttpConnection conn)
      • get

        public static TargetContext get​(org.apache.http.nio.NHttpConnection conn)
      • getLastStateUpdatedTime

        public long getLastStateUpdatedTime()
      • updateLastStateUpdatedTime

        public long updateLastStateUpdatedTime()
      • isCorrelationIdAvailable

        public static Boolean isCorrelationIdAvailable​(org.apache.http.nio.NHttpConnection connection)