Package

org.sackfix

session

Permalink

package session

Visibility
  1. Public
  2. All

Type Members

  1. trait SessionOpenTodayStore extends AnyRef

    Permalink

    This is needed to determine if the session has opened today or not.

    This is needed to determine if the session has opened today or not. For instance, if it is a long running process, then it knows already, but if you bounce it every nightr and maybe your ctrl-m or autosys was down, or even the host was late starting then how does the process know that it should start with sequence numers at 1?

    This trait is the answer.

  2. sealed trait SfAction extends AnyRef

    Permalink
  3. case class SfActionBusinessMessage(msg: SfMessage) extends SfAction with Product with Serializable

    Permalink
  4. case class SfActionCloseSocket() extends SfAction with Product with Serializable

    Permalink
  5. case class SfActionCounterpartyHeartbeat(heartbeatSecs: Int) extends SfAction with Product with Serializable

    Permalink
  6. case class SfActionResendMessages(beginSeqNo: Int, endSeqNo: Int) extends SfAction with Product with Serializable

    Permalink
  7. case class SfActionSendMessageToFix(msg: SfFixMessageBody) extends SfAction with Product with Serializable

    Permalink
  8. case class SfActionStartTimeout(id: String, durationMs: Long) extends SfAction with Product with Serializable

    Permalink
  9. case class SfControlForceLogoutAndClose(reason: String, pausePriorToSocketCloseMs: Option[Long] = None) extends SfSessionControlEvent with Product with Serializable

    Permalink
  10. case class SfControlNoReceivedHeartbeatTimeout(noBeatsMissedPlus20Percent: Int) extends SfSessionControlEvent with Product with Serializable

    Permalink
  11. case class SfControlNoSentHeartbeatTimeout(noBeatsMissed: Int) extends SfSessionControlEvent with Product with Serializable

    Permalink
  12. case class SfControlTimeoutFired(id: String, durationMs: Long) extends SfSessionControlEvent with Product with Serializable

    Permalink
  13. abstract class SfMessageStore extends AnyRef

    Permalink

    Created by Jonathan in 2016.

    Created by Jonathan in 2016.

    Ideas taken from Quickfix4J at this point, time to wrap it up.

  14. case class SfSendFixMessageOutAck(correlationId: String) extends Event with Product with Serializable

    Permalink

    A case class used by the Business actor when it sends a message out.

    A case class used by the Business actor when it sends a message out. All part of AKKA io back pressure. Without this you risk not knowing AKKA closed down and messages were lost.

    correlationId

    Allows you to have a unique value which you track as you send a message out and wait for the ack back

  15. case class SfSequencePair(ourSeqNum: Int, theirSeqNum: Int) extends Product with Serializable

    Permalink
  16. trait SfSessOutEventRouter extends AnyRef

    Permalink

    The state for this is maintained by SfSocketActor, anything that makes it out of the socket layer (ie message is well formed) and into the SfSessionActor has one of these attached.

    The state for this is maintained by SfSocketActor, anything that makes it out of the socket layer (ie message is well formed) and into the SfSessionActor has one of these attached. It IS immutable so we do not expose state. However, this means there can be race. ie the session layer wants to send a message out but the socket is already closed

    Created by Jonathan during 2017.

  17. case class SfSessOutEventRouterImpl(businessComms: BusinessCommsHandler, sfSessionActor: ActorRef, sessionId: SfSessionId, tcpActor: ActorRef, remoteHostDebugStr: String) extends SfSessOutEventRouter with Product with Serializable

    Permalink
  18. abstract class SfSession extends AnyRef

    Permalink
  19. class SfSessionActor extends Actor with SfSessionActorOutActions with ActorLogging

    Permalink
  20. trait SfSessionActorOutActions extends AnyRef

    Permalink

    The state machone or system commands may need this subset of operations, which are broken out to each testing.

  21. class SfSessionCache extends AnyRef

    Permalink

    Created by Jonathan in 2016.

  22. trait SfSessionConfig extends AnyRef

    Permalink

    Created by Jonathan during 2017.

  23. sealed trait SfSessionControlEvent extends SfSessionEvent

    Permalink
  24. sealed trait SfSessionEvent extends AnyRef

    Permalink

    Created by Jonathan during November 2016.

    Created by Jonathan during November 2016. Using Early Initialisation and a trait rather than inheritance...just to see how it works

  25. case class SfSessionFixMessageEvent(msg: SfMessage) extends SfSessionEvent with Product with Serializable

    Permalink
  26. case class SfSessionId(beginString: String, senderCompId: String, senderSubId: Option[String] = None, senderLocationId: Option[String] = None, targetCompId: String, targetSubId: Option[String] = None, targetLocationId: Option[String] = None) extends Product with Serializable

    Permalink
  27. class SfSessionImpl extends SfSession

    Permalink

    Created by Jonathan in 2016.

    Created by Jonathan in 2016.

    If you want an easy life, just use the companion object and create the session and a file based message store for the sequence numbers, with a simple session Id. If you want a more complicated life then copy the apply function to your own code and set it up yourself.

    You should set the PersistentStore asap, and, from your implementation, as you read initial values call back into the session to set the values.

  28. class SfSessionLookup extends AnyRef

    Permalink

    Every socket will have an associated lookup in order to validate the header fields match one of the assocated sessions - an initiator only ever has one per lookup, whereas an acceptor will have many potential clients who can connect

  29. sealed trait SfSessionSocketEvent extends SfSessionEvent

    Permalink
  30. trait SfSessionType extends AnyRef

    Permalink

    Created by Jonathan during 2017.

Value Members

  1. object SfAcceptor extends SfSessionType with Product with Serializable

    Permalink
  2. object SfActionBusinessSessionClosedForSending extends SfAction with Product with Serializable

    Permalink
  3. object SfActionBusinessSessionOpenForSending extends SfAction with Product with Serializable

    Permalink
  4. object SfInitiator extends SfSessionType with Product with Serializable

    Permalink
  5. object SfSession

    Permalink
  6. object SfSessionActor

    Permalink
  7. object SfSessionConfig

    Permalink
  8. object SfSessionId extends Serializable

    Permalink

    Created by Jonathan in 2016.

    Created by Jonathan in 2016.

    Stolen from QuickFix4j as an idea

  9. object SfSessionImpl

    Permalink

    Feel free to add your own helpers below.

  10. object SfSessionNetworkConnectionEstablishedEvent extends SfSessionSocketEvent with Product with Serializable

    Permalink
  11. object SfSessionServerSocketCloseEvent extends SfSessionSocketEvent with Product with Serializable

    Permalink
  12. object SfSessionServerSocketOpenEvent extends SfSessionSocketEvent with Product with Serializable

    Permalink
  13. object SfSessionSocketCloseEvent extends SfSessionSocketEvent with Product with Serializable

    Permalink
  14. package filebasedstore

    Permalink
  15. package fixstate

    Permalink

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

    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) }

  16. package heartbeat

    Permalink

Ungrouped