Class Enqueue
- java.lang.Object
-
- org.apache.cxf.phase.AbstractPhaseInterceptor<org.apache.cxf.message.Message>
-
- adams.flow.webservice.interceptor.incoming.AbstractInInterceptor
-
- adams.flow.webservice.interceptor.incoming.Enqueue
-
- All Implemented Interfaces:
adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,InterceptorWithActor
,org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>
,org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>
public class Enqueue extends AbstractInInterceptor implements InterceptorWithActor
Enqueues a token in the specified queue whenever an incoming message is received.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.flow.core.Actor
m_Actor
the actor to use for getting access to queues.protected boolean
m_EnqueueMessage
whether to enqueue the message or just aNullToken
.protected adams.flow.control.StorageName
m_StorageName
the queue to enqueue the token in.-
Fields inherited from class adams.flow.webservice.interceptor.incoming.AbstractInInterceptor
m_Logger, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Enqueue()
Initializes the interceptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description adams.flow.core.Actor
getActor()
Returns the actor in use.boolean
getEnqueueMessage()
Returns whether to enqueue the whole message or just aNullToken
.adams.flow.control.StorageName
getStorageName()
Returns the queue in use.void
handleMessage(org.apache.cxf.message.Message message)
Intercepts a message.protected void
initialize()
Initializes the members.void
setActor(adams.flow.core.Actor value)
Sets the actor to use.void
setEnqueueMessage(boolean value)
Sets whether to enqueue the whole message or just aNullToken
.void
setStorageName(adams.flow.control.StorageName value)
Sets the queue to use.-
Methods inherited from class adams.flow.webservice.interceptor.incoming.AbstractInInterceptor
configureLogger, getLogger, getLoggingLevel, initializeLogging, isInfoLoggingEnabled, isLoggingEnabled, setLoggingLevel
-
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
-
-
-
-
Field Detail
-
m_StorageName
protected adams.flow.control.StorageName m_StorageName
the queue to enqueue the token in.
-
m_EnqueueMessage
protected boolean m_EnqueueMessage
whether to enqueue the message or just aNullToken
.
-
m_Actor
protected adams.flow.core.Actor m_Actor
the actor to use for getting access to queues.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractInInterceptor
-
setStorageName
public void setStorageName(adams.flow.control.StorageName value)
Sets the queue to use.- Parameters:
value
- the queue
-
getStorageName
public adams.flow.control.StorageName getStorageName()
Returns the queue in use.- Returns:
- the queue
-
setEnqueueMessage
public void setEnqueueMessage(boolean value)
Sets whether to enqueue the whole message or just aNullToken
.- Parameters:
value
- true if to enqueue whole message
-
getEnqueueMessage
public boolean getEnqueueMessage()
Returns whether to enqueue the whole message or just aNullToken
.- Returns:
- true if to enqueue whole message
-
setActor
public void setActor(adams.flow.core.Actor value)
Sets the actor to use.- Specified by:
setActor
in interfaceInterceptorWithActor
- Parameters:
value
- the actor to use
-
getActor
public adams.flow.core.Actor getActor()
Returns the actor in use.- Specified by:
getActor
in interfaceInterceptorWithActor
- Returns:
- the actor in use
-
handleMessage
public void handleMessage(org.apache.cxf.message.Message message) throws org.apache.cxf.interceptor.Fault
Intercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.- Specified by:
handleMessage
in interfaceorg.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>
- Parameters:
message
-- Throws:
org.apache.cxf.interceptor.Fault
-
-