Package

org.sackfix.session

fixstate

Permalink

package fixstate

Provides all of the state objects and classes which match the ancient Fix Spec document.

Overview

On entering a new state we can generate a message, and suggest the next state When receiving a message or event we can propose which state to enter next - which will fire off a message and move the state on again.

Its a wierd state machine taken from the Fix Spec. Bad pseudocode below:

SomeStateTransiton = handleEvent() moveState(someStateTransition)

where

moveState(newState) :state Somemsg = newState.stateTransitionSessionMessage newState.nextState match{ case None=> newState case Some(nextState) => moveState(newStata) }

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. fixstate
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class AwaitingProcessingResponseToResendRequest(beginSeqNum: Int, endSeqNum: Int) extends SfSessState with Product with Serializable

    Permalink

    Created by Jonathan on 01/01/2017.

  2. case class AwaitingProcessingResponseToTestRequest(reqId: String) extends SfSessState with Product with Serializable

    Permalink

    Created by Jonathan on 01/01/2017.

  3. case class HandleResendRequest(initialState: SfSessState) extends SfSessState with Product with Serializable

    Permalink

    Ask the session to resend everything then move ack to normal session state.

    Ask the session to resend everything then move ack to normal session state.

    initialState

    Once resent, return to this initial state

  4. case class HandleTestRequest(initialState: SfSessState) extends SfSessState with Product with Serializable

    Permalink

    initialState

    The state to return to once I have dealt with this

  5. case class InitiateLogoutProcess(reason: String, closeSocketAfterSend: Boolean = false, pausePriorToSocketCloseMs: Option[Long] = None) extends SfSessState with Product with Serializable

    Permalink

    Created by Jonathan on 01/01/2017.

    Created by Jonathan on 01/01/2017.

    There are some situations especially during logon where we send logout with a reason and then close the socket. Otherwise you send logout and then wait for a reply logout... or a timeout.

  6. class NoMessagesReceivedInInterval extends SfSessState

    Permalink

    Created by Jonathan on 01/01/2017.

  7. case class ReceiveMsgSeqNumTooHigh(beginSeqNum: Int, endSeqNum: Int) extends SfSessState with Product with Serializable

    Permalink

    Transition state due to missing some message, ask them to resend and move to awaiting catch up.

  8. abstract class SfSessState extends AnyRef

    Permalink

    Base of all initiator or acceptor states.

    Base of all initiator or acceptor states. When enter the state an action can fire and then you can transition right to another state. Or you can receive events, which may then trigger a new state...

    Not my design - its from their state transition spec.

Value Members

  1. object ActiveNormalSession extends SfSessState

    Permalink

    Created by Jonathan on 01/01/2017.

  2. object AwaitingConnection extends SfSessState

    Permalink

    Opened server socket, waiting for a client.

  3. object DetectBrokenNetworkConnection extends SfSessState

    Permalink

    Transition state, got broken socket, so ensure its all closed up and go to disconnected

  4. object DisconnectSocketNow extends SfSessState

    Permalink

    Transition state, action is close the socket

  5. object DisconnectedConnectionToday extends SfSessState

    Permalink

    Created by Jonathan on 01/01/2017.

  6. object DisconnectedNoConnectionToday extends SfSessState

    Permalink
  7. object InitiateConnection extends SfSessState

    Permalink

    Transition state to send out a logon

  8. object InitiationLogonReceived extends SfSessState

    Permalink

    Transition state, ack the login and go to logon response

  9. object InitiationLogonResponse extends SfSessState

    Permalink

    Transition state from the spec, we got a login, we sent the ack, now either deal with msg seq num too high, or just go to active normal state

  10. object InitiationLogonSent extends SfSessState

    Permalink

    transition state to awaiting logon ack

  11. object NetworkConnnectionEstablished extends SfSessState

    Permalink

    waiting state, for the first login, ie we are the server, and a client has connected

    waiting state, for the first login, ie we are the server, and a client has connected

    SfSessionServerSocketOpenEvent into NoConnection transitions into networkconnection established

  12. object ReceiveLogoutMessage extends SfSessState

    Permalink

    Created by Jonathan on 01/01/2017.

    Created by Jonathan on 01/01/2017.

    1. Send Logout response message 2. Wait for counterparty to disconnect up to 10 seconds. If max exceeded, disconnect and generate an “error” condition in test output.

  13. object SessNoChangeEventConsumed extends SfSessState with Product with Serializable

    Permalink

    Created by Jonathan during 2017.

  14. object WaitingForLogonAck extends SfSessState

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped