Package org.rribbit.processing
Class LocalRequestProcessor
java.lang.Object
org.rribbit.processing.LocalRequestProcessor
- All Implemented Interfaces:
RequestProcessor
- Direct Known Subclasses:
JmsRequestProcessor
This class processes requests on a local machine and exposes its functionality as a simple Java method call. This class is supposed to be used in conjunction with the
LocalRequestDispatcher.- Author:
- G.J. Schouten
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ListenerObjectExecutorprotected ListenerObjectRetriever -
Constructor Summary
ConstructorsConstructorDescriptionWhenever you use this constructor, be sure to set theListenerObjectRetrieverAND theListenerObjectExecutorwith the setters provided by this class.LocalRequestProcessor(ListenerObjectRetriever listenerObjectRetriever, ListenerObjectExecutor listenerObjectExecutor) This constructor is recommended, since it forces you to specify theListenerObjectRetrieverandListenerObjectExecutor. -
Method Summary
Modifier and TypeMethodDescription<T> Response<T> processRequest(Request request) voidsetListenerObjectExecutor(ListenerObjectExecutor listenerObjectExecutor) voidsetListenerObjectRetriever(ListenerObjectRetriever listenerObjectRetriever)
-
Field Details
-
listenerObjectRetriever
-
listenerObjectExecutor
-
-
Constructor Details
-
LocalRequestProcessor
public LocalRequestProcessor()Whenever you use this constructor, be sure to set theListenerObjectRetrieverAND theListenerObjectExecutorwith the setters provided by this class. If you don't, runtimeNullPointerExceptions will occur. -
LocalRequestProcessor
public LocalRequestProcessor(ListenerObjectRetriever listenerObjectRetriever, ListenerObjectExecutor listenerObjectExecutor) This constructor is recommended, since it forces you to specify theListenerObjectRetrieverandListenerObjectExecutor. Passing a null value for either of these will result in a runtimeNullPointerExceptionwhenever theLocalRequestProcessoris used.- Parameters:
listenerObjectRetriever-listenerObjectExecutor-
-
-
Method Details
-
processRequest
Description copied from interface:RequestProcessor- Specified by:
processRequestin interfaceRequestProcessor- Parameters:
request- TheRequestto process- Returns:
- The
Response
-
getListenerObjectRetriever
-
setListenerObjectRetriever
-
getListenerObjectExecutor
-
setListenerObjectExecutor
-