Module it.rebirthproject.ufoeb
Class AbstractQueryMessage<T>
java.lang.Object
it.rebirthproject.ufoeb.architecture.messages.interfaces.AbstractQueryMessage<T>
- Type Parameters:
T- The value passed to the complete action
- All Implemented Interfaces:
Message
- Direct Known Subclasses:
IsListenerRegisteredMessage
The abstract class defining a query message that can be used by the bus
infrastructure.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CompletableFuture<T>A completable future used to return some query value, for example a boolean stating if a listener is registered to the bus. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidA method useful to notify that an action is completed in the future without exceptionvoidA method useful to notify that an action thrown exception while completing.Getter for the future responsetoString()A method that serializes the message class name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface it.rebirthproject.ufoeb.architecture.messages.interfaces.Message
getMessageType
-
Field Details
-
futureResponse
A completable future used to return some query value, for example a boolean stating if a listener is registered to the bus.
-
-
Constructor Details
-
AbstractQueryMessage
public AbstractQueryMessage()
-
-
Method Details
-
getResponse
Getter for the future response- Returns:
- The future containing the query response value.
-
complete
A method useful to notify that an action is completed in the future without exception- Parameters:
response- The response value of the completed action
-
completeWithException
A method useful to notify that an action thrown exception while completing.- Parameters:
e- The exception thrown while completing the action
-
toString
A method that serializes the message class name.
-