@Test public void testOnMemberAddedFromStart() throws Exception { PeerSession session = getDefaultSession(START); PeerSession newSession = engine.onMemberAddedAction(txn, session); assertEquals(NEITHER_JOINED, newSession.getState()); assertEquals(session.getLastLocalMessageId(), newSession.getLastLocalMessageId()); assertEquals(session.getLastRemoteMessageId(), newSession.getLastRemoteMessageId()); assertEquals(session.getLocalTimestamp(), newSession.getLocalTimestamp()); assertSessionConstantsUnchanged(session, newSession); }
private PeerSession onMemberAddedFromStart(PeerSession s) { return new PeerSession(s.getContactGroupId(), s.getPrivateGroupId(), s.getLastLocalMessageId(), s.getLastRemoteMessageId(), s.getLocalTimestamp(), NEITHER_JOINED); }
PeerProtocolEngine extends AbstractProtocolEngine<PeerSession> { private PeerSession onMemberAddedFromStart(PeerSession s) { return new PeerSession(s.getContactGroupId(), s.getPrivateGroupId(), s.getLastLocalMessageId(), s.getLastRemoteMessageId(), s.getLocalTimestamp(), NEITHER_JOINED); } }
PeerProtocolEngine extends AbstractProtocolEngine<PeerSession> { private PeerSession onMemberAddedFromStart(PeerSession s) { return new PeerSession(s.getContactGroupId(), s.getPrivateGroupId(), s.getLastLocalMessageId(), s.getLastRemoteMessageId(), s.getLocalTimestamp(), NEITHER_JOINED); } 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> { private PeerSession onMemberAddedFromStart(PeerSession s) { return new PeerSession(s.getContactGroupId(), s.getPrivateGroupId(), s.getLastLocalMessageId(), s.getLastRemoteMessageId(), s.getLocalTimestamp(), NEITHER_JOINED); } 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> { private PeerSession onMemberAddedFromStart(PeerSession s) { return new PeerSession(s.getContactGroupId(), s.getPrivateGroupId(), s.getLastLocalMessageId(), s.getLastRemoteMessageId(), s.getLocalTimestamp(), NEITHER_JOINED); } 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);  }