@ComponentProfile(summary="Write and commit the HTTP Response", tag="producer,http,https", recommended=NullConnection.class) public class StandardResponseProducer extends ResponseProducerImpl
AdaptrisMessageProducer
writes to the HttpServletResponse
object metadata
provided by the Jetty engine.In the adapter configuration file this class is aliased as jetty-standard-response-producer which is the preferred alternative to the fully qualified classname when building your configuration.
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
StandardResponseProducer() |
StandardResponseProducer(HttpStatusProvider.HttpStatus status) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component.
|
void |
init()
Initialises the component.
|
void |
prepare()
Prepare for initialisation.
|
void |
produce(AdaptrisMessage msg,
ProduceDestination destination)
Produce the
AdaptrisMessage to the supplied ProduceDestination , over-riding any configured destinations. |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
flushBuffers, forwardConnectionException, getContentTypeProvider, getFlushBuffer, getForwardConnectionException, getResponseHeaderProvider, getSendPayload, getStatus, getStatusProvider, sendPayload, setContentTypeProvider, setFlushBuffer, setForwardConnectionException, setResponseHeaderProvider, setSendPayload, setStatusProvider, withContentTypeProvider, withFlushBuffer, withForwardConnectionException, withResponseHeaderProvider, withSendPayload, withStatusProvider
produce, request, request, request, request
getDestination, 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
createName, createQualifier, isTrackingEndpoint
public StandardResponseProducer()
public StandardResponseProducer(HttpStatusProvider.HttpStatus status)
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
CoreException
- wrapping any underlying Exception
spublic 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
spublic 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
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
public void prepare() throws CoreException
ComponentLifecycleExtension
CoreException
public void produce(AdaptrisMessage msg, ProduceDestination destination) throws ProduceException
AdaptrisMessageSender
AdaptrisMessage
to the supplied ProduceDestination
, over-riding any configured destinations.msg
- the AdaptrisMessage
to producedestination
- the ProduceDestination
to produce toProduceException
- wrapping any underlying Exceptions