public class DisconnectingFromVenueState
extends java.lang.Object
DisconnectingFromGatewayState.
Gracefully logging off the venue requires sending a UserRequestEncoder with UserRequestType.LogOffUser.
The server should reply with a UserNotificationDecoder with a userStatus of UserStatus.LoggedOff
There is a special case that needs to be considered - if there are open orders the log-off request will be rejected by the MF gateway
using a BusinessMessageReject message. In this case the client stays connected to the venue and moves back to the LoggedOnToVenueState.
This should be rare condition. In your implementation you should cancel all orders before attempting a graceful logout.
| Modifier and Type | Field and Description |
|---|---|
protected StateContext |
context |
protected static long |
MAX_TRANSMISSION_DELAY_MS |
protected java.lang.String |
stateName |
| Modifier | Constructor and Description |
|---|---|
protected |
DisconnectingFromVenueState(StateContext context) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getStateName() |
void |
onBusinessMessageReject(long msgSeqNum,
com.marketfactory.protocol.sbe4.BusinessMessageRejectDecoder message)
This is a special case that needs to be considered.
|
void |
onClientRequestedDisconnection() |
void |
onClientRequestedLogon() |
void |
onClientRequestedLogout() |
void |
onConnection() |
void |
onDisconnection()
If the server drop the connection/disconnects us at this point since we wanted to be logged off we will go directly to the
OfflineWaitingState state. |
void |
onEnter() |
void |
onErrorReport(long msgSeqNum,
com.marketfactory.protocol.sbe4.ErrorReportDecoder message) |
void |
onHeartbeat(long msgSeqNum,
com.marketfactory.protocol.sbe4.HeartbeatDecoder message) |
void |
onLogonResponse(long msgSeqNum,
com.marketfactory.protocol.sbe4.LogonResponseDecoder message) |
void |
onLogout(long msgSeqNum,
com.marketfactory.protocol.sbe4.LogoutDecoder message) |
void |
onLogoutResponse(long msgSeqNum,
com.marketfactory.protocol.sbe4.LogoutResponseDecoder message) |
void |
onSequenceResetGapFill(long msgSeqNum,
com.marketfactory.protocol.sbe4.SequenceResetGapFillDecoder message) |
void |
onTestRequest(long msgSeqNum,
com.marketfactory.protocol.sbe4.TestRequestDecoder message) |
void |
onTimer(long currentTimeMillis) |
void |
onUserNotification(long msgSeqNum,
com.marketfactory.protocol.sbe4.UserNotificationDecoder userNotification) |
protected static final long MAX_TRANSMISSION_DELAY_MS
protected final StateContext context
protected final java.lang.String stateName
protected DisconnectingFromVenueState(StateContext context)
public void onEnter()
public void onUserNotification(long msgSeqNum,
com.marketfactory.protocol.sbe4.UserNotificationDecoder userNotification)
public void onDisconnection()
OfflineWaitingState state.public void onBusinessMessageReject(long msgSeqNum,
com.marketfactory.protocol.sbe4.BusinessMessageRejectDecoder message)
public java.lang.String getStateName()
public void onConnection()
public void onClientRequestedLogon()
public void onClientRequestedLogout()
public void onClientRequestedDisconnection()
public void onTimer(long currentTimeMillis)
public void onLogout(long msgSeqNum,
com.marketfactory.protocol.sbe4.LogoutDecoder message)
public void onTestRequest(long msgSeqNum,
com.marketfactory.protocol.sbe4.TestRequestDecoder message)
public void onLogonResponse(long msgSeqNum,
com.marketfactory.protocol.sbe4.LogonResponseDecoder message)
public void onLogoutResponse(long msgSeqNum,
com.marketfactory.protocol.sbe4.LogoutResponseDecoder message)
public void onHeartbeat(long msgSeqNum,
com.marketfactory.protocol.sbe4.HeartbeatDecoder message)
public void onSequenceResetGapFill(long msgSeqNum,
com.marketfactory.protocol.sbe4.SequenceResetGapFillDecoder message)
public void onErrorReport(long msgSeqNum,
com.marketfactory.protocol.sbe4.ErrorReportDecoder message)