use of im.actor.core.api.base.SeqUpdateTooLong in project actor-platform by actorapp.
the class SequenceActor method onReceive.
//
// Messages
//
@Override
public void onReceive(Object message) {
if (message instanceof Invalidate || message instanceof SeqUpdateTooLong || message instanceof ForceInvalidate) {
if (!isValidated) {
return;
}
invalidate();
} else if (message instanceof SeqUpdate || message instanceof FatSeqUpdate) {
if (!isValidated) {
stash();
return;
}
int seq;
byte[] state;
int type;
byte[] body;
List<ApiUser> users = null;
List<ApiGroup> groups = null;
if (message instanceof SeqUpdate) {
seq = ((SeqUpdate) message).getSeq();
state = ((SeqUpdate) message).getState();
type = ((SeqUpdate) message).getUpdateHeader();
body = ((SeqUpdate) message).getUpdate();
} else {
seq = ((FatSeqUpdate) message).getSeq();
state = ((FatSeqUpdate) message).getState();
type = ((FatSeqUpdate) message).getUpdateHeader();
body = ((FatSeqUpdate) message).getUpdate();
users = ((FatSeqUpdate) message).getUsers();
groups = ((FatSeqUpdate) message).getGroups();
}
onUpdateReceived(seq, state, type, body, users, groups);
} else if (message instanceof ExecuteAfter) {
if (!isValidated) {
stash();
return;
}
onExecuteAfter((ExecuteAfter) message);
} else if (message instanceof PushSeq) {
if (!isValidated) {
stash();
return;
}
onPushSeqReceived(((PushSeq) message).seq, ((PushSeq) message).authId);
} else if (message instanceof WeakUpdate) {
WeakUpdate weakUpdate = (WeakUpdate) message;
onWeakUpdateReceived(weakUpdate.getUpdateHeader(), weakUpdate.getUpdate(), weakUpdate.getDate());
} else {
super.onReceive(message);
}
}
Aggregations