I have been going through the documentation of akka FSM. I was not understanding the transform
method.
Here is the code –
when(SomeState)(transform {
case Event(bytes: ByteString, read) ⇒ stay using (read + bytes.length)
} using {
case s @ FSM.State(state, read, timeout, stopReason, replies) if read > 1000 ⇒
goto(Processing)
})
Can any one kindly explain how it is to use with when
method ?