@Test public void shouldManageGatewaySessions() throws Exception { openSocket(); awaitEndpointCreation(); framer.onLogonMessageReceived(gatewaySession, SESSION_ID); verifySessionsAcquired(CONNECTED); }
boolean onLogonMessageReceived(final GatewaySession gatewaySession, final long sessionId) { if (checkOfflineSession(gatewaySession, sessionId)) { return true; } if (!soleLibraryMode) { gatewaySessions.acquire( gatewaySession, CONNECTED, false, configuration.defaultHeartbeatIntervalInS(), UNK_SESSION, UNK_SESSION, null, null, engineBlockablePosition); } return false; }
Framer implements Agent, EngineEndPointHandler, ProtocolHandler { boolean onLogonMessageReceived(final GatewaySession gatewaySession, final long sessionId) { if (checkOfflineSession(gatewaySession, sessionId)) { return true; } if (!soleLibraryMode) { gatewaySessions.acquire( gatewaySession, CONNECTED, false, configuration.defaultHeartbeatIntervalInS(), UNK_SESSION, UNK_SESSION, null, null, engineBlockablePosition); } return false; } }
Framer implements Agent, EngineEndPointHandler, ProtocolHandler { boolean onLogonMessageReceived(final GatewaySession gatewaySession, final long sessionId) { if (checkOfflineSession(gatewaySession, sessionId)) { return true; } if (!soleLibraryMode) { gatewaySessions.acquire( gatewaySession, CONNECTED, false, configuration.defaultHeartbeatIntervalInS(), UNK_SESSION, UNK_SESSION, null, null, engineBlockablePosition); } return false; } Framer(
        final EpochClock epochClock,
        final Timer outboundTimer,
        final Timer sendTimer,
        final EngineConfiguration configuration,
        final EndPointFactory endPointFactory,
        final Subscription librarySubscription,
        final Subscription slowSubscription,
        final Image replayImage,
        final Image replaySlowImage,
        final ReplayQuery inboundMessages,
        final GatewayPublication outboundPublication,
        final GatewayPublication inboundPublication,
        final QueuedPipe<AdminCommand> adminCommands,
        final SessionIdStrategy sessionIdStrategy,
        final SessionContexts sessionContexts,
        final SequenceNumberIndexReader sentSequenceNumberIndex,
        final SequenceNumberIndexReader receivedSequenceNumberIndex,
        final GatewaySessions gatewaySessions,
        final ErrorHandler errorHandler,
        final String agentNamePrefix,
        final CompletionPosition inboundCompletionPosition,
        final CompletionPosition outboundLibraryCompletionPosition,
        final FinalImagePositions finalImagePositions,
        final AgentInvoker conductorAgentInvoker,
        final RecordingCoordinator recordingCoordinator); }
Framer implements Agent, EngineEndPointHandler, ProtocolHandler { boolean onLogonMessageReceived(final GatewaySession gatewaySession, final long sessionId) { if (checkOfflineSession(gatewaySession, sessionId)) { return true; } if (!soleLibraryMode) { gatewaySessions.acquire( gatewaySession, CONNECTED, false, configuration.defaultHeartbeatIntervalInS(), UNK_SESSION, UNK_SESSION, null, null, engineBlockablePosition); } return false; } Framer(
        final EpochClock epochClock,
        final Timer outboundTimer,
        final Timer sendTimer,
        final EngineConfiguration configuration,
        final EndPointFactory endPointFactory,
        final Subscription librarySubscription,
        final Subscription slowSubscription,
        final Image replayImage,
        final Image replaySlowImage,
        final ReplayQuery inboundMessages,
        final GatewayPublication outboundPublication,
        final GatewayPublication inboundPublication,
        final QueuedPipe<AdminCommand> adminCommands,
        final SessionIdStrategy sessionIdStrategy,
        final SessionContexts sessionContexts,
        final SequenceNumberIndexReader sentSequenceNumberIndex,
        final SequenceNumberIndexReader receivedSequenceNumberIndex,
        final GatewaySessions gatewaySessions,
        final ErrorHandler errorHandler,
        final String agentNamePrefix,
        final CompletionPosition inboundCompletionPosition,
        final CompletionPosition outboundLibraryCompletionPosition,
        final FinalImagePositions finalImagePositions,
        final AgentInvoker conductorAgentInvoker,
        final RecordingCoordinator recordingCoordinator); int doWork(); Action onInitiateILinkConnection(
        final int libraryId, final int port, final long correlationId,
        final boolean reestablishConnection, final boolean useBackupHost,
        final String primaryHost, final String accessKeyId, final String backupHost); Action onInitiateConnection(
        final int libraryId,
        final int port,
        final String host,
        final String senderCompId,
        final String senderSubId,
        final String senderLocationId,
        final String targetCompId,
        final String targetSubId,
        final String targetLocationId,
        final SequenceNumberType sequenceNumberType,
        final int requestedInitialReceivedSequenceNumber,
        final int requestedInitialSentSequenceNumber,
        final boolean resetSequenceNumber,
        final boolean closedResendInterval,
        final int resendRequestChunkSize,
        final boolean sendRedundantResendRequests,
        final boolean enableLastMsgSeqNumProcessed,
        final String username,
        final String password,
        final Class<? extends FixDictionary> fixDictionaryClass,
        final int heartbeatIntervalInS,
        final long correlationId,
        final Header header); Action onMidConnectionDisconnect(final int libraryId, final long correlationId); Action onMessage(
        final DirectBuffer buffer,
        final int offset,
        final int length,
        final int libraryId,
        final long connectionId,
        final long sessionId,
        final int sequenceIndex,
        final long messageType,
        final long timestamp,
        final MessageStatus status,
        final int sequenceNumber,
        final long position,
        final int metaDataLength); Action onILinkMessage(final long connectionId, final DirectBuffer buffer, final int offset); Action onRequestDisconnect(final int libraryId, final long connectionId, final DisconnectReason reason); Action onDisconnect(final int libraryId, final long connectionId, final DisconnectReason reason); Action onLibraryConnect(
        final int libraryId,
        final String libraryName,
        final long correlationId,
        final int aeronSessionId); Action onApplicationHeartbeat(final int libraryId, final int aeronSessionId); Action onReleaseSession(
        final int libraryId,
        final long connectionId,
        final long sessionId,
        final long correlationId,
        final SessionState state,
        final boolean awaitingResend,
        final long heartbeatIntervalInMs,
        final int lastSentSequenceNumber,
        final int lastReceivedSequenceNumber,
        final String username,
        final String password,
        final Header header); Action onRequestSession(
        final int libraryId,
        final long sessionId,
        final long correlationId,
        final int replayFromSequenceNumber,
        final int replayFromSequenceIndex); Action onReplayMessages(
        final int libraryId,
        final long sessionId,
        final long correlationId,
        final int replayFromSequenceNumber,
        final int replayFromSequenceIndex,
        final int replayToSequenceNumber,
        final int replayToSequenceIndex,
        final long latestReplyArrivalTimeInMs); Action onFollowerSessionRequest(
        final int libraryId,
        final long correlationId,
        final DirectBuffer srcBuffer,
        final int srcOffset,
        final int srcLength,
        final Header header); Action onWriteMetaData(
        final int libraryId,
        final long sessionId,
        final long correlationId,
        final int metaDataOffset,
        final DirectBuffer srcBuffer,
        final int srcOffset,
        final int srcLength); Action onReadMetaData(
        final int libraryId,
        final long sessionId,
        final long correlationId); void onClose(); String roleName(); void onWriteMetaDataResponse(final WriteMetaDataResponse response); AcceptorFixDictionaryLookup acceptorFixDictionaryLookup(); }
Framer implements Agent, EngineEndPointHandler, ProtocolHandler { boolean onLogonMessageReceived(final GatewaySession gatewaySession, final long sessionId) { if (checkOfflineSession(gatewaySession, sessionId)) { return true; } if (!soleLibraryMode) { gatewaySessions.acquire( gatewaySession, CONNECTED, false, configuration.defaultHeartbeatIntervalInS(), UNK_SESSION, UNK_SESSION, null, null, engineBlockablePosition); } return false; } Framer(
        final EpochClock epochClock,
        final Timer outboundTimer,
        final Timer sendTimer,
        final EngineConfiguration configuration,
        final EndPointFactory endPointFactory,
        final Subscription librarySubscription,
        final Subscription slowSubscription,
        final Image replayImage,
        final Image replaySlowImage,
        final ReplayQuery inboundMessages,
        final GatewayPublication outboundPublication,
        final GatewayPublication inboundPublication,
        final QueuedPipe<AdminCommand> adminCommands,
        final SessionIdStrategy sessionIdStrategy,
        final SessionContexts sessionContexts,
        final SequenceNumberIndexReader sentSequenceNumberIndex,
        final SequenceNumberIndexReader receivedSequenceNumberIndex,
        final GatewaySessions gatewaySessions,
        final ErrorHandler errorHandler,
        final String agentNamePrefix,
        final CompletionPosition inboundCompletionPosition,
        final CompletionPosition outboundLibraryCompletionPosition,
        final FinalImagePositions finalImagePositions,
        final AgentInvoker conductorAgentInvoker,
        final RecordingCoordinator recordingCoordinator); int doWork(); Action onInitiateILinkConnection(
        final int libraryId, final int port, final long correlationId,
        final boolean reestablishConnection, final boolean useBackupHost,
        final String primaryHost, final String accessKeyId, final String backupHost); Action onInitiateConnection(
        final int libraryId,
        final int port,
        final String host,
        final String senderCompId,
        final String senderSubId,
        final String senderLocationId,
        final String targetCompId,
        final String targetSubId,
        final String targetLocationId,
        final SequenceNumberType sequenceNumberType,
        final int requestedInitialReceivedSequenceNumber,
        final int requestedInitialSentSequenceNumber,
        final boolean resetSequenceNumber,
        final boolean closedResendInterval,
        final int resendRequestChunkSize,
        final boolean sendRedundantResendRequests,
        final boolean enableLastMsgSeqNumProcessed,
        final String username,
        final String password,
        final Class<? extends FixDictionary> fixDictionaryClass,
        final int heartbeatIntervalInS,
        final long correlationId,
        final Header header); Action onMidConnectionDisconnect(final int libraryId, final long correlationId); Action onMessage(
        final DirectBuffer buffer,
        final int offset,
        final int length,
        final int libraryId,
        final long connectionId,
        final long sessionId,
        final int sequenceIndex,
        final long messageType,
        final long timestamp,
        final MessageStatus status,
        final int sequenceNumber,
        final long position,
        final int metaDataLength); Action onILinkMessage(final long connectionId, final DirectBuffer buffer, final int offset); Action onRequestDisconnect(final int libraryId, final long connectionId, final DisconnectReason reason); Action onDisconnect(final int libraryId, final long connectionId, final DisconnectReason reason); Action onLibraryConnect(
        final int libraryId,
        final String libraryName,
        final long correlationId,
        final int aeronSessionId); Action onApplicationHeartbeat(final int libraryId, final int aeronSessionId); Action onReleaseSession(
        final int libraryId,
        final long connectionId,
        final long sessionId,
        final long correlationId,
        final SessionState state,
        final boolean awaitingResend,
        final long heartbeatIntervalInMs,
        final int lastSentSequenceNumber,
        final int lastReceivedSequenceNumber,
        final String username,
        final String password,
        final Header header); Action onRequestSession(
        final int libraryId,
        final long sessionId,
        final long correlationId,
        final int replayFromSequenceNumber,
        final int replayFromSequenceIndex); Action onReplayMessages(
        final int libraryId,
        final long sessionId,
        final long correlationId,
        final int replayFromSequenceNumber,
        final int replayFromSequenceIndex,
        final int replayToSequenceNumber,
        final int replayToSequenceIndex,
        final long latestReplyArrivalTimeInMs); Action onFollowerSessionRequest(
        final int libraryId,
        final long correlationId,
        final DirectBuffer srcBuffer,
        final int srcOffset,
        final int srcLength,
        final Header header); Action onWriteMetaData(
        final int libraryId,
        final long sessionId,
        final long correlationId,
        final int metaDataOffset,
        final DirectBuffer srcBuffer,
        final int srcOffset,
        final int srcLength); Action onReadMetaData(
        final int libraryId,
        final long sessionId,
        final long correlationId); void onClose(); String roleName(); void onWriteMetaDataResponse(final WriteMetaDataResponse response); AcceptorFixDictionaryLookup acceptorFixDictionaryLookup();  }