Package org.rribbit
Class RRB
java.lang.Object
org.rribbit.RRB
RRB is a convenience class that provides static access to a global
RequestResponseBus. This is ideal for small-scaled Java Applications.
Larger applications will probably want to use a RequestResponseBus initialized in their Spring Context. Everyone who wants the RequestResponseBus then has to
get it from the Spring Context. Alternatively, you could first initialize the Spring Context and then get the RequestResponseBus out of it and set it in RRB, if that
is convenient for your application.- Author:
- G.J. Schouten
-
Method Summary
Modifier and TypeMethodDescriptionstatic RequestResponseBusget()Gets the global staticRequestResponseBus.static RequestResponseBusrrb()Gets the global staticRequestResponseBus.static voidsetRequestResponseBus(RequestResponseBus requestResponseBus) Sets the global staticRequestResponseBus.
-
Method Details
-
setRequestResponseBus
Sets the global staticRequestResponseBus.- Parameters:
requestResponseBus-
-
get
Gets the global staticRequestResponseBus. This method is intended for people who don't like static imports and prefer syntax such as RRB.get().send(...);- Returns:
- the global static
RequestResponseBus
-
rrb
Gets the global staticRequestResponseBus. This method is intended for people who do like static imports and prefer syntax such as rrb().send(...);- Returns:
- the global static
RequestResponseBus
-