public class TargetContext extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONNECTION_INFORMATION |
Constructor and Description |
---|
TargetContext(TargetConfiguration targetConfiguration) |
Modifier and Type | Method and Description |
---|---|
static void |
create(org.apache.http.nio.NHttpConnection conn,
ProtocolState state,
TargetConfiguration configuration) |
static TargetContext |
get(org.apache.http.nio.NHttpConnection conn) |
Pipe |
getReader() |
TargetRequest |
getRequest() |
static TargetRequest |
getRequest(org.apache.http.nio.NHttpConnection conn) |
org.apache.axis2.context.MessageContext |
getRequestMsgCtx() |
TargetResponse |
getResponse() |
static TargetResponse |
getResponse(org.apache.http.nio.NHttpConnection conn) |
ProtocolState |
getState() |
static ProtocolState |
getState(org.apache.http.nio.NHttpConnection conn) |
Pipe |
getWriter() |
void |
reset()
Reset the resources associated with this context
|
void |
reset(boolean isError)
Reset the resources associated with this context
|
void |
setReader(Pipe reader) |
static void |
setRequest(org.apache.http.nio.NHttpConnection conn,
TargetRequest request) |
void |
setRequest(TargetRequest request) |
void |
setRequestMsgCtx(org.apache.axis2.context.MessageContext requestMsgCtx) |
static void |
setResponse(org.apache.http.nio.NHttpConnection conn,
TargetResponse response) |
void |
setResponse(TargetResponse response) |
void |
setState(ProtocolState state) |
void |
setWriter(Pipe writer) |
static void |
updateState(org.apache.http.nio.NHttpConnection conn,
ProtocolState state) |
public static final String CONNECTION_INFORMATION
public TargetContext(TargetConfiguration targetConfiguration)
public ProtocolState getState()
public void setState(ProtocolState state)
public TargetRequest getRequest()
public void setRequest(TargetRequest request)
public TargetResponse getResponse()
public void setResponse(TargetResponse response)
public org.apache.axis2.context.MessageContext getRequestMsgCtx()
public void setRequestMsgCtx(org.apache.axis2.context.MessageContext requestMsgCtx)
public Pipe getReader()
public Pipe getWriter()
public void setReader(Pipe reader)
public void setWriter(Pipe writer)
public void reset()
public void reset(boolean isError)
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 factoriespublic static void create(org.apache.http.nio.NHttpConnection conn, ProtocolState state, TargetConfiguration configuration)
public static void updateState(org.apache.http.nio.NHttpConnection conn, ProtocolState state)
public static ProtocolState getState(org.apache.http.nio.NHttpConnection conn)
public static void setRequest(org.apache.http.nio.NHttpConnection conn, TargetRequest request)
public static void setResponse(org.apache.http.nio.NHttpConnection conn, TargetResponse response)
public static TargetRequest getRequest(org.apache.http.nio.NHttpConnection conn)
public static TargetResponse getResponse(org.apache.http.nio.NHttpConnection conn)
public static TargetContext get(org.apache.http.nio.NHttpConnection conn)
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.