Class/Object

org.sackfix.socket

SfSocketHandlerActor

Related Docs: object SfSocketHandlerActor | package socket

Permalink

class SfSocketHandlerActor extends Actor with ActorLogging

Every Socket sends TCP IO events to me. Bytes being received are the most obvious, which are decoded and some initial validation is performed. Providing it decodes to a fix message the comp id's etc are used to locate a configured session, if found then the message is handed off to the session actor for handling.

When a client connects to the server port this class is registered to handle incoming comms.

It calls the decoder to convert from bytes into a Strongly typed Fix Message.

If the message is badly formed, missing enough header fields and so on this this actor replies

If the session is established, and we know the SfSessionActor to use then the comms is forwarded to it and it does it all.

http://doc.akka.io/docs/akka/current/scala/io-tcp.html

Linear Supertypes
ActorLogging, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SfSocketHandlerActor
  2. ActorLogging
  3. Actor
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SfSocketHandlerActor(sessionType: SfSessionType, connection: ActorRef, sessionLookup: SfSessionLookup, remoteHostName: String, businessComms: BusinessCommsHandler, latencyRecorder: Option[ActorRef])

    Permalink

    sessionType

    Either SfAcceptor or SfInitiator, determines the starting states for new sessions

    connection

    This is where we can send data back down to the client

    sessionLookup

    Holds details of all the sessions in a cache, and can validate sendCompId etc

    remoteHostName

    Just for debug strings

    businessComms

    An actor for receiving decoded, validated fix messages. It is used when a session is established with the correct sender and target comp id's

    latencyRecorder

    An optional microsecond latency recorder.

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  5. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  6. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  7. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  8. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. val businessComms: BusinessCommsHandler

    Permalink

    An actor for receiving decoded, validated fix messages.

    An actor for receiving decoded, validated fix messages. It is used when a session is established with the correct sender and target comp id's

  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def closeSocket: Unit

    Permalink
  13. val connection: ActorRef

    Permalink

    This is where we can send data back down to the client

  14. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  15. def createReplyMessageForNoSession(sessId: SfSessionId, msgType: String, outgoingMsgBody: SfFixMessageBody): SfMessage

    Permalink
  16. def createReplyMessageForNoSession(incomingMsg: SfMessage, msgType: String, outgoingMsgBody: SfFixMessageBody): SfMessage

    Permalink

    Could not find the session, so reject it and make up some fields for the header

  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def handleGarbledMessage(reason: String, decoderTimestamp: DecoderTimestamps): Unit

    Permalink

    Called by the decoder when the tag id is not a number, or some other bad formatting which means we cannot even work out what session this message is for.

    Called by the decoder when the tag id is not a number, or some other bad formatting which means we cannot even work out what session this message is for.

    reason

    The debug message.

  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. val latencyRecorder: Option[ActorRef]

    Permalink

    An optional microsecond latency recorder.

  25. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  30. def postStop(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  31. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  32. def preStart(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  33. def receive: PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    SfSocketHandlerActor → Actor
  34. def receivedAMessageCallback(msgTuples: Array[(Int, String)], rejectDetails: Option[FixStrDecodeRejectDetails], decoderTimestamps: DecoderTimestamps): Unit

    Permalink

    called when it gets the final tuple of a message

    called when it gets the final tuple of a message

    rejectDetails

    Some of the validation done when decoding the string to tuples should result in a garbled message - ie just discard it, while others such as a null value in a tag value pair should result in a reject - which means we need the session

  35. val remoteHostName: String

    Permalink

    Just for debug strings

  36. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  37. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  38. val sessionLookup: SfSessionLookup

    Permalink

    Holds details of all the sessions in a cache, and can validate sendCompId etc

  39. val sessionType: SfSessionType

    Permalink

    Either SfAcceptor or SfInitiator, determines the starting states for new sessions

  40. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  43. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Actor
  44. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ActorLogging

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped