import javax.annotation.Nullable;
/**
- * Base behavior attached to {@link AbstractClientActor}. Exposes
- * @author user
+ * Base behavior attached to {@link AbstractClientActor}.
*
* @param <C> Type of associated context
*
public abstract class AbstractClientActorBehavior<C extends AbstractClientActorContext> {
private final C context;
- AbstractClientActorBehavior(final @Nonnull C context) {
+ AbstractClientActorBehavior(@Nonnull final C context) {
// Hidden to prevent outside subclasses. Users instantiated this via ClientActorBehavior
this.context = Preconditions.checkNotNull(context);
}
*
* @return A client actor context instance.
*/
- protected final @Nonnull C context() {
+ @Nonnull
+ protected final C context() {
return context;
}
*
* @return Persistence identifier
*/
- protected final @Nonnull String persistenceId() {
+ @Nonnull
+ protected final String persistenceId() {
return context.persistenceId();
}
*
* @return Actor associated with this behavior
*/
- public final @Nonnull ActorRef self() {
+ @Nonnull
+ public final ActorRef self() {
return context.self();
}
* @param command Command message
* @return Behavior which should be used with the next message. Return null if this actor should shut down.
*/
- abstract @Nullable AbstractClientActorBehavior<?> onReceiveCommand(@Nonnull Object command);
+ @Nullable
+ abstract AbstractClientActorBehavior<?> onReceiveCommand(@Nonnull Object command);
/**
* Implementation-internal method for handling an incoming recovery message coming from persistence.
* @param recover Recover message
* @return Behavior which should be used with the next message. Return null if this actor should shut down.
*/
- abstract @Nullable AbstractClientActorBehavior<?> onReceiveRecover(@Nonnull Object recover);
+ @Nullable
+ abstract AbstractClientActorBehavior<?> onReceiveRecover(@Nonnull Object recover);
}