|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.cinnamon.service.ServiceMessageProcessor
public class ServiceMessageProcessor
The main MessageProcessor implementation that processes ServiceRequest
instances and returns ServiceResponse instances. This mechanism represents the
default RPC semantics in Cinnamon.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.spicefactory.cinnamon.io.MessageProcessor |
|---|
MessageProcessor.ResultHolder<O> |
| Constructor Summary | |
|---|---|
ServiceMessageProcessor(CinnamonConfig config)
Creates a new ServiceMessageProcessor. |
|
| Method Summary | |
|---|---|
boolean |
isFailFast()
Indicates whether this message processor should apply fail fast behaviour in case of errors. |
protected void |
logRequest(ServiceRequest request)
|
protected void |
logResult(ServiceRequest request,
ServiceResponse response)
|
MessageProcessor.ResultHolder<ServiceResponse> |
processException(ServiceRequest request,
Exception e)
Processes the specified Exception and returns a result to be sent to the client. |
MessageProcessor.ResultHolder<ServiceResponse> |
processMessage(ServiceRequest request)
Processes the given request instance and returns a result. |
void |
setFailFast(boolean failFast)
Set whether this message processor should apply fail fast behaviour in case of errors |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceMessageProcessor(CinnamonConfig config)
config - the Cinnamon configuration instance to use| Method Detail |
|---|
public boolean isFailFast()
MessageProcessor.processMessage(I)public void setFailFast(boolean failFast)
failFast - indicates whether this message processor should apply fail fast behaviour in case
of errorsMessageProcessor.processMessage(I)public MessageProcessor.ResultHolder<ServiceResponse> processMessage(ServiceRequest request)
MessageProcessorprocessException method. This may be useful if some kind of transactional
behaviour needs to be applied to a batch of method invocations.
processMessage in interface MessageProcessor<ServiceRequest,ServiceResponse>request - the object representing the request
public MessageProcessor.ResultHolder<ServiceResponse> processException(ServiceRequest request,
Exception e)
MessageProcessorprocessMessage method
has already been invoked for the same request message. This method will be invoked when
an Exception occured before or after processing the message (probably in a PhaseListener
method. In this case a corresponding message should be returned to the client even if the
original message processing succeeded.
processException in interface MessageProcessor<ServiceRequest,ServiceResponse>request - the object representing the requeste - the Exception that was thrown before or after processing the specified message
protected void logRequest(ServiceRequest request)
protected void logResult(ServiceRequest request,
ServiceResponse response)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||