public final class SessionState extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SessionState.ResendRange
The resend range when sending a resend request.
|
Constructor and Description |
---|
SessionState(Object lock,
Log log,
int heartBeatInterval,
boolean initiator,
MessageStore messageStore,
double testRequestDelayMultiplier,
double heartBeatTimeoutMultiplier) |
Modifier and Type | Method and Description |
---|---|
void |
clearLogoutReason() |
void |
clearQueue() |
void |
clearTestRequestCounter() |
Message |
dequeue(int sequence) |
void |
dequeueMessagesUpTo(int seqnum)
Remove messages from messageQueue up to a given sequence number.
|
void |
enqueue(int sequence,
Message message) |
void |
get(int first,
int last,
Collection<String> messages) |
Date |
getCreationTime() |
int |
getHeartBeatInterval() |
int |
getLastExpectedLogonNextSeqNum() |
long |
getLastReceivedTime() |
long |
getLastSentTime() |
Object |
getLock() |
Log |
getLog() |
int |
getLogonTimeout() |
String |
getLogoutReason() |
int |
getLogoutTimeout() |
MessageStore |
getMessageStore() |
Message |
getNextQueuedMessage() |
int |
getNextSenderMsgSeqNum() |
int |
getNextTargetMsgSeqNum() |
Collection<Integer> |
getQueuedSeqNums() |
SessionState.ResendRange |
getResendRange() |
double |
getTestRequestDelayMultiplier() |
void |
incrementTestRequestCounter() |
void |
incrNextSenderMsgSeqNum() |
void |
incrNextTargetMsgSeqNum() |
boolean |
isExpectedLogonNextSeqNumSent() |
boolean |
isHeartBeatNeeded() |
boolean |
isInitiator() |
boolean |
isLogonAlreadySent() |
boolean |
isLogonReceived() |
boolean |
isLogonSendNeeded() |
boolean |
isLogonSent() |
boolean |
isLogonTimedOut() |
boolean |
isLogoutReceived() |
boolean |
isLogoutSent() |
boolean |
isLogoutTimedOut() |
boolean |
isResendRequested() |
boolean |
isResetNeeded() |
boolean |
isResetReceived() |
boolean |
isResetSent() |
boolean |
isResetStatePending() |
boolean |
isTestRequestNeeded() |
boolean |
isTimedOut() |
void |
lockSenderMsgSeqNum() |
void |
lockTargetMsgSeqNum() |
void |
reset() |
boolean |
set(int sequence,
String message) |
void |
setHeartBeatInterval(int heartBeatInterval) |
void |
setLastExpectedLogonNextSeqNum(int lastExpectedLogonNextSeqNum) |
void |
setLastReceivedTime(long lastReceivedTime) |
void |
setLastSentTime(long lastSentTime) |
void |
setLogonReceived(boolean logonReceived) |
void |
setLogonSent(boolean logonSent) |
void |
setLogonTimeout(int logonTimeout) |
void |
setLogoutReason(String reason) |
void |
setLogoutReceived(boolean logoutReceived) |
void |
setLogoutSent(boolean logoutSent) |
void |
setLogoutTimeout(int logoutTimeout) |
void |
setNextTargetMsgSeqNum(int sequence) |
void |
setResendRange(int low,
int high) |
void |
setResendRange(int low,
int high,
int currentResend) |
void |
setResetRangeFromLastExpectedLogonNextSeqNumLogon()
No actual resend request has occurred but at logon we populated tag 789 so that the other side knows we
are missing messages without an explicit resend request and should immediately reply with the missing
messages.
|
void |
setResetReceived(boolean resetReceived) |
void |
setResetSent(boolean resetSent) |
void |
setResetStatePending(boolean resetStatePending) |
void |
unlockSenderMsgSeqNum() |
void |
unlockTargetMsgSeqNum() |
public SessionState(Object lock, Log log, int heartBeatInterval, boolean initiator, MessageStore messageStore, double testRequestDelayMultiplier, double heartBeatTimeoutMultiplier)
public int getHeartBeatInterval()
public void setHeartBeatInterval(int heartBeatInterval)
public boolean isHeartBeatNeeded()
public boolean isInitiator()
public long getLastReceivedTime()
public void setLastReceivedTime(long lastReceivedTime)
public long getLastSentTime()
public void setLastSentTime(long lastSentTime)
public Log getLog()
public boolean isLogonAlreadySent()
public boolean isLogonReceived()
public void setLogonReceived(boolean logonReceived)
public boolean isLogonSendNeeded()
public boolean isLogonSent()
public void setLogonSent(boolean logonSent)
public boolean isLogonTimedOut()
public void setLogonTimeout(int logonTimeout)
public int getLogonTimeout()
public void setLogoutTimeout(int logoutTimeout)
public int getLogoutTimeout()
public boolean isLogoutSent()
public void setLogoutSent(boolean logoutSent)
public boolean isLogoutReceived()
public void setLogoutReceived(boolean logoutReceived)
public boolean isLogoutTimedOut()
public MessageStore getMessageStore()
public double getTestRequestDelayMultiplier()
public void clearTestRequestCounter()
public void incrementTestRequestCounter()
public boolean isTestRequestNeeded()
public boolean isTimedOut()
public boolean set(int sequence, String message) throws IOException
IOException
public void get(int first, int last, Collection<String> messages) throws IOException
IOException
public void enqueue(int sequence, Message message)
public Message dequeue(int sequence)
public void dequeueMessagesUpTo(int seqnum)
seqnum
- up to which sequence number messages should be deletedpublic Message getNextQueuedMessage()
public Collection<Integer> getQueuedSeqNums()
public void clearQueue()
public void lockSenderMsgSeqNum()
public void unlockSenderMsgSeqNum()
public void lockTargetMsgSeqNum()
public void unlockTargetMsgSeqNum()
public int getNextSenderMsgSeqNum() throws IOException
IOException
public int getNextTargetMsgSeqNum() throws IOException
IOException
public void setNextTargetMsgSeqNum(int sequence) throws IOException
IOException
public void incrNextSenderMsgSeqNum() throws IOException
IOException
public void incrNextTargetMsgSeqNum() throws IOException
IOException
public Date getCreationTime() throws IOException
IOException
public boolean isResetNeeded() throws IOException
IOException
public void reset()
public void setResendRange(int low, int high)
public void setResendRange(int low, int high, int currentResend)
public boolean isResendRequested()
public SessionState.ResendRange getResendRange()
public boolean isResetReceived()
public void setResetReceived(boolean resetReceived)
public boolean isResetSent()
public void setResetSent(boolean resetSent)
public boolean isResetStatePending()
public void setResetStatePending(boolean resetStatePending)
public void setResetRangeFromLastExpectedLogonNextSeqNumLogon()
public void setLastExpectedLogonNextSeqNum(int lastExpectedLogonNextSeqNum)
lastExpectedLogonNextSeqNum
- This method is thread safe (atomic set).public int getLastExpectedLogonNextSeqNum()
public boolean isExpectedLogonNextSeqNumSent()
public void setLogoutReason(String reason)
public String getLogoutReason()
public void clearLogoutReason()
public Object getLock()
Copyright © 2021. All rights reserved.