public final class PostResult
extends java.lang.Object
EventBus.post(Object) call.| Modifier and Type | Class and Description |
|---|---|
static class |
PostResult.CompositeException
Exception encapsulating a combined
failure. |
| Modifier and Type | Method and Description |
|---|---|
@NonNull java.util.Map<EventSubscriber<?>,java.lang.Throwable> |
exceptions()
Gets the exceptions that were thrown whilst posting the event to subscribers.
|
static @NonNull PostResult |
failure(@NonNull java.util.Map<EventSubscriber<?>,java.lang.Throwable> exceptions)
Marks that exceptions were thrown by subscribers.
|
void |
raise()
Raises a
PostResult.CompositeException if the posting was not
successful. |
static @NonNull PostResult |
success()
Marks that no exceptions were thrown by subscribers.
|
java.lang.String |
toString() |
boolean |
wasSuccessful()
Gets if the
EventBus.post(Object) call was successful. |
public static @NonNull PostResult success()
PostResult indicating successpublic static @NonNull PostResult failure(@NonNull java.util.Map<EventSubscriber<?>,java.lang.Throwable> exceptions)
exceptions - the exceptions that were thrownPostResult indicating failurepublic boolean wasSuccessful()
EventBus.post(Object) call was successful.public @NonNull java.util.Map<EventSubscriber<?>,java.lang.Throwable> exceptions()
public void raise()
throws PostResult.CompositeException
PostResult.CompositeException if the posting was not
successful.PostResult.CompositeException - if posting was not successfulpublic java.lang.String toString()
toString in class java.lang.Object