Class DefaultStreamInterceptor
- java.lang.Object
-
- org.apache.synapse.transport.passthru.DefaultStreamInterceptor
-
- All Implemented Interfaces:
StreamInterceptor
- Direct Known Subclasses:
LoggingStreamInterceptor
public abstract class DefaultStreamInterceptor extends Object implements StreamInterceptor
Default class implementing the methods ofStreamInterceptor. A stream interceptor can be written by extending and overding the necessary methods of this class. For an example seeLoggingStreamInterceptor
-
-
Constructor Summary
Constructors Constructor Description DefaultStreamInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(String name, Object value)Add an interceptor propertyMapgetProperties()Get all interceptor propertiesbooleaninterceptSourceRequest(org.apache.axis2.context.MessageContext axisCtx)Logic to determine whether to intercept the source requestbooleaninterceptSourceResponse(org.apache.axis2.context.MessageContext axisCtx)Logic to determine whether to intercept the source responsebooleaninterceptTargetRequest(org.apache.axis2.context.MessageContext axisCtx)Logic to determine whether to intercept the target requestbooleaninterceptTargetResponse(org.apache.axis2.context.MessageContext axisCtx)Logic to determine whether to intercept the target responsebooleansourceRequest(ByteBuffer buffer, org.apache.axis2.context.MessageContext axisCtx)Handles the request data coming in to the engine from the clientvoidsourceResponse(ByteBuffer buffer, org.apache.axis2.context.MessageContext axisCtx)Handles the response data leaving out of the enginevoidtargetRequest(ByteBuffer buffer, org.apache.axis2.context.MessageContext axisCtx)Handles the request data leaving out of the enginebooleantargetResponse(ByteBuffer buffer, org.apache.axis2.context.MessageContext axisCtx)Handles the response data coming in to the engine from the back end
-
-
-
Method Detail
-
interceptSourceRequest
public boolean interceptSourceRequest(org.apache.axis2.context.MessageContext axisCtx)
Description copied from interface:StreamInterceptorLogic to determine whether to intercept the source request- Specified by:
interceptSourceRequestin interfaceStreamInterceptor- Parameters:
axisCtx- associated axis2MsgCtx of the request- Returns:
- intercept source request or not
-
sourceRequest
public boolean sourceRequest(ByteBuffer buffer, org.apache.axis2.context.MessageContext axisCtx)
Description copied from interface:StreamInterceptorHandles the request data coming in to the engine from the client- Specified by:
sourceRequestin interfaceStreamInterceptor- Parameters:
buffer- copy of data entering inaxisCtx- associated axis2MsgCtx- Returns:
- whether to continue reading the data or to close the connection
-
interceptTargetRequest
public boolean interceptTargetRequest(org.apache.axis2.context.MessageContext axisCtx)
Description copied from interface:StreamInterceptorLogic to determine whether to intercept the target request- Specified by:
interceptTargetRequestin interfaceStreamInterceptor- Parameters:
axisCtx- associated axis2MsgCtx of the request- Returns:
- intercept target request or not
-
targetRequest
public void targetRequest(ByteBuffer buffer, org.apache.axis2.context.MessageContext axisCtx)
Description copied from interface:StreamInterceptorHandles the request data leaving out of the engine- Specified by:
targetRequestin interfaceStreamInterceptor- Parameters:
buffer- copy of data being send outaxisCtx- associated axis2MsgCtx
-
interceptTargetResponse
public boolean interceptTargetResponse(org.apache.axis2.context.MessageContext axisCtx)
Description copied from interface:StreamInterceptorLogic to determine whether to intercept the target response- Specified by:
interceptTargetResponsein interfaceStreamInterceptor- Parameters:
axisCtx- associated axis2MsgCtx of the response- Returns:
- intercept target response or not
-
targetResponse
public boolean targetResponse(ByteBuffer buffer, org.apache.axis2.context.MessageContext axisCtx)
Description copied from interface:StreamInterceptorHandles the response data coming in to the engine from the back end- Specified by:
targetResponsein interfaceStreamInterceptor- Parameters:
buffer- copy of data entering inaxisCtx- associated axis2MsgCtx- Returns:
- whether to continue reading the data or to close the connection
-
interceptSourceResponse
public boolean interceptSourceResponse(org.apache.axis2.context.MessageContext axisCtx)
Description copied from interface:StreamInterceptorLogic to determine whether to intercept the source response- Specified by:
interceptSourceResponsein interfaceStreamInterceptor- Parameters:
axisCtx- associated axis2MsgCtx of the response- Returns:
- intercept source response or not
-
sourceResponse
public void sourceResponse(ByteBuffer buffer, org.apache.axis2.context.MessageContext axisCtx)
Description copied from interface:StreamInterceptorHandles the response data leaving out of the engine- Specified by:
sourceResponsein interfaceStreamInterceptor- Parameters:
buffer- copy of data leavingaxisCtx- associated axis2MsgCtx
-
addProperty
public void addProperty(String name, Object value)
Description copied from interface:StreamInterceptorAdd an interceptor property- Specified by:
addPropertyin interfaceStreamInterceptor- Parameters:
name- property namevalue- property value
-
getProperties
public Map getProperties()
Description copied from interface:StreamInterceptorGet all interceptor properties- Specified by:
getPropertiesin interfaceStreamInterceptor- Returns:
- Map of handler properties
-
-