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.
|
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 |
getMaxWaitTime()
Deprecated.
since 3.6.6 use
getTimeoutAction() instead. |
TimeInterval |
getSendProcessingInterval() |
TimeoutAction |
getTimeoutAction() |
TimeInterval |
getWarnAfter() |
java.lang.Long |
getWarnAfterMessageHangMillis()
Deprecated.
since 3.5.1 use
getWarnAfter() instead. |
void |
init()
Initialises the component.
|
protected void |
logHeaders(javax.servlet.http.HttpServletRequest req) |
void |
setAdditionalDebug(java.lang.Boolean additionalDebug) |
void |
setMaxWaitTime(TimeInterval maxWait)
Deprecated.
since 3.6.6 use
setTimeoutAction(TimeoutAction) instead. |
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 |
setWarnAfterMessageHangMillis(java.lang.Long w)
Deprecated.
since 3.5.1 use
setWarnAfter(TimeInterval) instead. |
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, getIsConfirmation, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isConfirmation, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsConfirmation, 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, isConfirmation, 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()
@Deprecated @Removal(version="3.9.0", message="Use #getTimeoutAction()") public TimeInterval getMaxWaitTime()
getTimeoutAction()
instead.@Deprecated @Removal(version="3.9.0", message="Use #setTimeoutAction(TimeoutAction)") public void setMaxWaitTime(TimeInterval maxWait)
setTimeoutAction(TimeoutAction)
instead.
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 internal HttpServlet
instance commits the
response in its current state and returns control back to the Jetty engine.
maxWait
- the maxWaitTime to set (default 10 minutes)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)
@Deprecated @Removal(version="3.9.0", message="Use #getWarnAfter()") public java.lang.Long getWarnAfterMessageHangMillis()
getWarnAfter()
instead.@Deprecated @Removal(version="3.9.0", message="Use #setWarnAfter(TimeInterval)") public void setWarnAfterMessageHangMillis(java.lang.Long w)
setWarnAfter(TimeInterval)
instead.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.