public final class LogoutResponseParser extends TargetMessageParser
This class parses a Logout Response message defined in the iSCSI Standard (RFC3720).
The Logout Response is used by the target to indicate if the cleanup operation for the connection(s) has completed.
After Logout, the TCP connection referred by the CID MUST be closed at both ends (or all connections must be closed if the logout reason was session close).
0.
expectedCommandSequenceNumber, maximumCommandSequenceNumber, statusSequenceNumberlogicalUnitNumber, protocolDataUnit| Constructor and Description |
|---|
LogoutResponseParser(ProtocolDataUnit initProtocolDataUnit)
Default constructor, creates a new, empty
LogoutResponseParser object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIntegrity()
This method checks, if all parsed fields are valid.
|
void |
clear()
This method sets all settings to their initial values.
|
protected void |
deserializeBytes1to3(int line)
Parse the bytes
1 till 3 in the Basic Header
Segment. |
protected void |
deserializeBytes40to43(int line)
Parse the bytes
40 till 43 in the Basic Header
Segment. |
DataSegmentFactory.DataSegmentFormat |
getDataSegmentFormat()
If this method returns
true, hen it indicates that the data
segment data is interpreted as binary data. |
LogoutResponse |
getResponse()
Returns the Logout Response of this
LogoutResponseParser object. |
short |
getTime2Retain()
If the Logout response code is
0 and if the operational
ErrorRecoveryLevel is 2, this is the maximum amount of time,
in seconds, after the initial wait (Time2Wait), the target waits for the
allegiance reassignment for any active task after which the task state is
discarded. |
short |
getTime2Wait()
If the Logout Response code is
0 and if the operational
ErrorRecoveryLevel is 2, this is the minimum amount of time,
in seconds, to wait before attempting task reassignment. |
protected int |
serializeBytes1to3()
Serializes the bytes
1 till 3 in the Basic
Header Segment. |
protected int |
serializeBytes40to43()
Serializes the bytes
40 till 43 in the Basic
Header Segment. |
void |
setResponse(LogoutResponse response) |
void |
setTime2Retain(short time2Retain) |
void |
setTime2Wait(short time2Wait) |
String |
toString()
This method concatenate all the fields of a derived parser to allow an
easy generation of debug informations.
|
deserializeBytes20to23, deserializeBytes24to27, deserializeBytes28to31, deserializeBytes32to35, deserializeBytes36to39, deserializeBytes44to47, getExpectedCommandSequenceNumber, getMaximumCommandSequenceNumber, getShortInfo, getStatusSequenceNumber, incrementSequenceNumber, serializeBytes20to23, serializeBytes24to27, serializeBytes28to31, serializeBytes32to35, serializeBytes36to39, serializeBytes44to47, setExpectedCommandSequenceNumber, setMaximumCommandSequenceNumber, setStatusSequenceNumbercanContainAdditionalHeaderSegments, canHaveDigests, deserializeBytes12to15, deserializeBytes8to11, getLogicalUnitNumber, serializeBytes12to15, serializeBytes8to11, setLogicalUnitNumberpublic LogoutResponseParser(ProtocolDataUnit initProtocolDataUnit)
LogoutResponseParser object.initProtocolDataUnit - The reference ProtocolDataUnit instance, which
contains this LogoutResponseParser subclass
object.public final String toString()
toString in class TargetMessageParserpublic final DataSegmentFactory.DataSegmentFormat getDataSegmentFormat()
true, hen it indicates that the data
segment data is interpreted as binary data. Else the data segment data
must be interpreted as Text Format.getDataSegmentFormat in class AbstractMessageParserDataSegmentFactory.DataSegmentFormatpublic final void clear()
clear in class TargetMessageParserpublic final LogoutResponse getResponse()
LogoutResponseParser object.LogoutResponseParser object.LogoutResponsepublic final short getTime2Retain()
0 and if the operational
ErrorRecoveryLevel is 2, this is the maximum amount of time,
in seconds, after the initial wait (Time2Wait), the target waits for the
allegiance reassignment for any active task after which the task state is
discarded. If the Logout response code is 0 and if the
operational ErrorRecoveryLevel is less than 2, this field is
to be ignored.
This field is invalid if the Logout response code is 1.
If the Logout response code is 2 or 3, this field specifies the maximum
amount of time, in seconds, after the initial wait (Time2Wait), the target waits for a new implicit or
explicit logout.
If it is the last connection of a session, the whole session state is discarded after Time2Retain.
If Time2Retain is 0, the target has already discarded the connection (and
possibly the session) state along with the task states. No reassignment or Logout is required in this
case.
LogoutResponseParser object.public final short getTime2Wait()
0 and if the operational
ErrorRecoveryLevel is 2, this is the minimum amount of time,
in seconds, to wait before attempting task reassignment. If the Logout
Response code is 0 and if the operational ErrorRecoveryLevel
is less than 2, this field is to be ignored.
This field is invalid if the Logout Response code is 1.
If the Logout response code is 2 or 3, this field specifies the minimum time
to wait before attempting a new implicit or explicit logout.
If Time2Wait is 0, the reassignment or a new Logout may be attempted
immediately.
LogoutResponseParser object.public final void setResponse(LogoutResponse response)
public final void setTime2Retain(short time2Retain)
public final void setTime2Wait(short time2Wait)
protected final void deserializeBytes1to3(int line)
throws InternetSCSIException
1 till 3 in the Basic Header
Segment.deserializeBytes1to3 in class TargetMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void deserializeBytes40to43(int line)
throws InternetSCSIException
40 till 43 in the Basic Header
Segment.deserializeBytes40to43 in class TargetMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void checkIntegrity()
throws InternetSCSIException
checkIntegrity in class AbstractMessageParserInternetSCSIException - If the integrity is violated.protected final int serializeBytes1to3()
1 till 3 in the Basic
Header Segment.serializeBytes1to3 in class TargetMessageParserprotected final int serializeBytes40to43()
40 till 43 in the Basic
Header Segment.serializeBytes40to43 in class TargetMessageParserCopyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.