/** * @return the currently managed Connection */ protected final Connection connection() { return stateData().getConnection(); }
/** * @return the Connection Id */ protected final String connectionId() { return stateData().getConnectionId(); }
private ConnectionStatus getCurrentConnectionStatus() { return stateData().getConnectionStatus(); }
private MessageMappingProcessorActor(final ActorRef publisherActor, final ActorRef conciergeForwarder, final MessageMappingProcessor processor, final String connectionId) { this.publisherActor = publisherActor; this.conciergeForwarder = conciergeForwarder; this.processor = processor; this.connectionId = connectionId; timers = new ConcurrentHashMap<>(); placeholderSubstitution = new PlaceholderSubstitution(); adjustHeaders = new AdjustHeaders(connectionId); mapHeaders = new ApplyHeaderMapping(log); applySignalIdEnforcement = new ApplySignalIdEnforcement(log); }
private Instant getInConnectionStatusSince() { return stateData().getInConnectionStatusSince(); }
private Optional<String> getCurrentConnectionStatusDetails() { return stateData().getConnectionStatusDetails(); }
private static Consumer<ConnectionActor> subscribeForEventsAndScheduleResponse( final ConnectivityCommandResponse response, final ActorRef sender) { return connectionActor -> { connectionActor.subscribeForEvents(); connectionActor.schedulePendingResponse(response, sender); }; }
/** * Start a child actor whose name is guaranteed to be different from all other child actors started by this method. * * @param prefix prefix of the child actor name. * @param props props of the child actor. * @return the created ActorRef. */ protected final ActorRef startChildActorConflictFree(final String prefix, final Props props) { return startChildActor(nextChildActorName(prefix), props); }
@Override public MessageMappingProcessorActor create() { return new MessageMappingProcessorActor(publisherActor, conciergeForwarder, processor, connectionId); } });
/** * Remove info related to the last command. Should be called when entering a stable state (UNKNOWN, CONNECTED, * DISCONNECTED). * * @return data without info related to the last command. */ public BaseClientData resetSession() { return new BaseClientData(connectionId, connection, connectionStatus, desiredConnectionStatus, connectionStatusDetails, inConnectionStatusSince, null, null); }
@Override public ConnectionActor create() { return new ConnectionActor(connectionId, pubSubMediator, conciergeForwarder, propsFactory, commandValidator); } });
/** * Creates the handler for messages in connected state. * Overwrite and extend by additional matchers. * * @return an FSM function builder */ protected FSMStateFunctionBuilder<BaseClientState, BaseClientData> inConnectedState() { return matchEvent(CloseConnection.class, BaseClientData.class, this::closeConnection); }
private MessageMappingProcessorActor(final ActorRef publisherActor, final ActorRef conciergeForwarder, final MessageMappingProcessor processor, final String connectionId) { this.publisherActor = publisherActor; this.conciergeForwarder = conciergeForwarder; this.processor = processor; this.connectionId = connectionId; timers = new ConcurrentHashMap<>(); placeholderSubstitution = new PlaceholderSubstitution(); adjustHeaders = new AdjustHeaders(connectionId); mapHeaders = new ApplyHeaderMapping(log); applySignalIdEnforcement = new ApplySignalIdEnforcement(log); }
/** * @return the currently managed Connection */ protected final Connection connection() { return stateData().getConnection(); }
/** * @return the Connection Id */ protected final String connectionId() { return stateData().getConnectionId(); }
private ConnectionStatus getCurrentConnectionStatus() { return stateData().getConnectionStatus(); }
private Instant getInConnectionStatusSince() { return stateData().getInConnectionStatusSince(); }
private Optional<String> getCurrentConnectionStatusDetails() { return stateData().getConnectionStatusDetails(); }
private static Consumer<ConnectionActor> subscribeForEventsAndScheduleResponse( final ConnectivityCommandResponse response, final ActorRef sender) { return connectionActor -> { connectionActor.subscribeForEvents(); connectionActor.schedulePendingResponse(response, sender); }; }
@Override public MessageMappingProcessorActor create() { return new MessageMappingProcessorActor(publisherActor, conciergeForwarder, processor, connectionId); } });