public abstract class BasicJettyConsumer extends AdaptrisMessageConsumerImp
Modifier and Type | Class and Description |
---|---|
protected class |
BasicJettyConsumer.BasicServlet |
static interface |
BasicJettyConsumer.HttpOperation |
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
BasicJettyConsumer() |
Modifier and Type | Method and Description |
---|---|
protected ServletWrapper |
asServletWrapper() |
void |
close()
Closes the component.
|
java.lang.String |
consumeLocationKey()
Provides the metadata key '"jettyURI"' that
contains the URI which triggered the consumer.
|
abstract AdaptrisMessage |
createMessage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Create an AdaptrisMessage from the incoming servlet request and response.
|
protected java.lang.String |
ensureIsPath(java.lang.String s) |
java.lang.Boolean |
getAdditionalDebug() |
TimeInterval |
getSendProcessingInterval() |
TimeoutAction |
getTimeoutAction() |
TimeInterval |
getWarnAfter() |
void |
init()
Initialises the component.
|
protected void |
logHeaders(javax.servlet.http.HttpServletRequest req) |
void |
setAdditionalDebug(java.lang.Boolean additionalDebug) |
void |
setSendProcessingInterval(TimeInterval t)
If required send a 102 upon this interval.
|
void |
setTimeoutAction(TimeoutAction action)
Set the behaviour that should occur when the workflow takes too long to finish.
|
void |
setWarnAfter(TimeInterval t)
Log a warning after this interval.
|
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
changeState, getDestination, registerAdaptrisMessageListener, renameThread, requestClose, requestInit, requestStart, requestStop, retrieveAdaptrisMessageListener, retrieveComponentState, setDestination
createName, createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
getUniqueId
prepare
createName, createQualifier, isTrackingEndpoint
public abstract AdaptrisMessage createMessage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
request
- the HttpServletRequestresponse
- the HttpServletResponsejava.io.IOException
javax.servlet.ServletException
HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
protected void logHeaders(javax.servlet.http.HttpServletRequest req)
protected ServletWrapper asServletWrapper() throws CoreException
CoreException
protected java.lang.String ensureIsPath(java.lang.String s) throws CoreException
CoreException
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
CoreException
- wrapping any underlying Exception
sComponentLifecycle.init()
public void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer
, calling start
will begin message delivery.
CoreException
- wrapping any underlying Exception
sComponentLifecycle.start()
public void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer
, calling stop
will pause message delivery. Throwing a RuntimeException
may cause unintended consequences
ComponentLifecycle.stop()
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException
may
cause unintended consequences
ComponentLifecycle.close()
public TimeoutAction getTimeoutAction()
public void setTimeoutAction(TimeoutAction action)
This setting only has an impact if the consumer is the entry point for a PoolingWorkflow
instance. In
the event that the wait time is exceeded, then the behaviour specified here is done.
action
- the action; default is a 202 after 10 minutes.public java.lang.Boolean getAdditionalDebug()
public void setAdditionalDebug(java.lang.Boolean additionalDebug)
public TimeInterval getWarnAfter()
public void setWarnAfter(TimeInterval t)
t
- the warnAfter to set, default is to never warn.public TimeInterval getSendProcessingInterval()
public void setSendProcessingInterval(TimeInterval t)
t
- the sendExpectEvery to set, default is 20 seconds.public java.lang.String consumeLocationKey()