@Test public void testOnLeaveActionFromNeitherJoined() throws Exception { PeerSession session = getDefaultSession(NEITHER_JOINED); assertEquals(session, engine.onLeaveAction(txn, session)); }
@Override public PeerSession onLeaveAction(Transaction txn, PeerSession s) throws DbException { switch (s.getState()) { case START: case AWAIT_MEMBER: case NEITHER_JOINED: case LOCAL_LEFT: case ERROR: return s; case LOCAL_JOINED: return onLocalLeaveFromLocalJoined(txn, s); case BOTH_JOINED: return onLocalLeaveFromBothJoined(txn, s); default: throw new AssertionError(); } }
PeerProtocolEngine extends AbstractProtocolEngine<PeerSession> { @Override public PeerSession onLeaveAction(Transaction txn, PeerSession s) throws DbException { switch (s.getState()) { case START: case AWAIT_MEMBER: case NEITHER_JOINED: case LOCAL_LEFT: case ERROR: return s; case LOCAL_JOINED: return onLocalLeaveFromLocalJoined(txn, s); case BOTH_JOINED: return onLocalLeaveFromBothJoined(txn, s); default: throw new AssertionError(); } } }
PeerProtocolEngine extends AbstractProtocolEngine<PeerSession> { @Override public PeerSession onLeaveAction(Transaction txn, PeerSession s) throws DbException { switch (s.getState()) { case START: case AWAIT_MEMBER: case NEITHER_JOINED: case LOCAL_LEFT: case ERROR: return s; case LOCAL_JOINED: return onLocalLeaveFromLocalJoined(txn, s); case BOTH_JOINED: return onLocalLeaveFromBothJoined(txn, s); default: throw new AssertionError(); } } PeerProtocolEngine(DatabaseComponent db, ClientHelper clientHelper,
			ClientVersioningManager clientVersioningManager,
			PrivateGroupManager privateGroupManager,
			PrivateGroupFactory privateGroupFactory,
			GroupMessageFactory groupMessageFactory,
			IdentityManager identityManager, MessageParser messageParser,
			MessageEncoder messageEncoder, MessageTracker messageTracker,
			Clock clock); }
PeerProtocolEngine extends AbstractProtocolEngine<PeerSession> { @Override public PeerSession onLeaveAction(Transaction txn, PeerSession s) throws DbException { switch (s.getState()) { case START: case AWAIT_MEMBER: case NEITHER_JOINED: case LOCAL_LEFT: case ERROR: return s; case LOCAL_JOINED: return onLocalLeaveFromLocalJoined(txn, s); case BOTH_JOINED: return onLocalLeaveFromBothJoined(txn, s); default: throw new AssertionError(); } } PeerProtocolEngine(DatabaseComponent db, ClientHelper clientHelper,
			ClientVersioningManager clientVersioningManager,
			PrivateGroupManager privateGroupManager,
			PrivateGroupFactory privateGroupFactory,
			GroupMessageFactory groupMessageFactory,
			IdentityManager identityManager, MessageParser messageParser,
			MessageEncoder messageEncoder, MessageTracker messageTracker,
			Clock clock); @Override PeerSession onInviteAction(Transaction txn, PeerSession s,
			@Nullable String message, long timestamp, byte[] signature); @Override PeerSession onJoinAction(Transaction txn, PeerSession s); @Override PeerSession onLeaveAction(Transaction txn, PeerSession s); @Override PeerSession onMemberAddedAction(Transaction txn, PeerSession s); @Override PeerSession onInviteMessage(Transaction txn, PeerSession s,
			InviteMessage m); @Override PeerSession onJoinMessage(Transaction txn, PeerSession s,
			JoinMessage m); @Override PeerSession onLeaveMessage(Transaction txn, PeerSession s,
			LeaveMessage m); @Override PeerSession onAbortMessage(Transaction txn, PeerSession s,
			AbortMessage m); }
PeerProtocolEngine extends AbstractProtocolEngine<PeerSession> { @Override public PeerSession onLeaveAction(Transaction txn, PeerSession s) throws DbException { switch (s.getState()) { case START: case AWAIT_MEMBER: case NEITHER_JOINED: case LOCAL_LEFT: case ERROR: return s; case LOCAL_JOINED: return onLocalLeaveFromLocalJoined(txn, s); case BOTH_JOINED: return onLocalLeaveFromBothJoined(txn, s); default: throw new AssertionError(); } } PeerProtocolEngine(DatabaseComponent db, ClientHelper clientHelper,
			ClientVersioningManager clientVersioningManager,
			PrivateGroupManager privateGroupManager,
			PrivateGroupFactory privateGroupFactory,
			GroupMessageFactory groupMessageFactory,
			IdentityManager identityManager, MessageParser messageParser,
			MessageEncoder messageEncoder, MessageTracker messageTracker,
			Clock clock); @Override PeerSession onInviteAction(Transaction txn, PeerSession s,
			@Nullable String message, long timestamp, byte[] signature); @Override PeerSession onJoinAction(Transaction txn, PeerSession s); @Override PeerSession onLeaveAction(Transaction txn, PeerSession s); @Override PeerSession onMemberAddedAction(Transaction txn, PeerSession s); @Override PeerSession onInviteMessage(Transaction txn, PeerSession s,
			InviteMessage m); @Override PeerSession onJoinMessage(Transaction txn, PeerSession s,
			JoinMessage m); @Override PeerSession onLeaveMessage(Transaction txn, PeerSession s,
			LeaveMessage m); @Override PeerSession onAbortMessage(Transaction txn, PeerSession s,
			AbortMessage m);  }