public abstract class InitiatorMessageParser extends AbstractMessageParser
This abstract class is the base class of all initiator message parsers defined in the iSCSI Protocol (RFC3720). This class defines some methods, which are common in all parsers to simplify the parsing process.
| Modifier and Type | Field and Description |
|---|---|
protected int |
commandSequenceNumber
Command Sequence Number.
|
protected int |
expectedStatusSequenceNumber
Expected Status Sequence Number.
|
logicalUnitNumber, protocolDataUnit| Constructor and Description |
|---|
InitiatorMessageParser(ProtocolDataUnit initProtocolDataUnit)
Default constructor, creates a new, empty LogoutRequestParser object.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
deserializeBytes20to23(int line)
Parse the bytes
20 till 23 in the Basic Header
Segment. |
protected void |
deserializeBytes24to27(int line)
Parse the bytes
24 till 27 in the Basic Header
Segment. |
protected void |
deserializeBytes28to31(int line)
Parse the bytes
28 till 31 in the Basic Header
Segment. |
protected void |
deserializeBytes32to35(int line)
Parse the bytes
32 till 35 in the Basic Header
Segment. |
protected void |
deserializeBytes36to39(int line)
Parse the bytes
36 till 39 in the Basic Header
Segment. |
protected void |
deserializeBytes40to43(int line)
Parse the bytes
40 till 43 in the Basic Header
Segment. |
protected void |
deserializeBytes44to47(int line)
Parse the bytes
44 till 47 in the Basic Header
Segment. |
int |
getCommandSequenceNumber()
Returns the Command Sequence Number of this
InitiatorMessageParser object. |
int |
getExpectedStatusSequenceNumber()
Returns the Expected Status Sequence Number of this
InitiatorMessageParser object. |
String |
getShortInfo()
Returns the short version of the used sequence numbers of this parser
instance.
|
boolean |
incrementSequenceNumber()
This
AbstractMessageParser instance affects the
incrementation of the Command Sequence Number. |
protected int |
serializeBytes1to3()
Serializes the bytes
1 till 3 in the Basic
Header Segment. |
protected int |
serializeBytes20to23()
Serializes the bytes
20 till 23 in the Basic
Header Segment. |
protected int |
serializeBytes24to27()
Serializes the bytes
24 till 27 in the Basic
Header Segment. |
protected int |
serializeBytes28to31()
Serializes the bytes
28 till 31 in the Basic
Header Segment. |
protected int |
serializeBytes32to35()
Serializes the bytes
32 till 35 in the Basic
Header Segment. |
protected int |
serializeBytes36to39()
Serializes the bytes
36 till 39 in the Basic
Header Segment. |
protected int |
serializeBytes40to43()
Serializes the bytes
40 till 43 in the Basic
Header Segment. |
protected int |
serializeBytes44to47()
Serializes the bytes
44 till 47 in the Basic
Header Segment. |
void |
setCommandSequenceNumber(int initCmdSN)
Sets the Command Sequence Number of this
InitiatorMessageParser object to the given value. |
void |
setExpectedStatusSequenceNumber(int initExpStatSN)
Sets the Expected Status Sequence Number of this
InitiatorMessageParser object to the
given value. |
String |
toString()
This method concatenate all the fields of a derived parser to allow an
easy generation of debug informations.
|
canContainAdditionalHeaderSegments, canHaveDigests, checkIntegrity, deserializeBytes12to15, deserializeBytes8to11, getDataSegmentFormat, getLogicalUnitNumber, serializeBytes12to15, serializeBytes8to11, setLogicalUnitNumberprotected int commandSequenceNumber
Enables ordered delivery across multiple connections in a single session.
protected int expectedStatusSequenceNumber
Command responses up to expectedStatusSequenceNumber - 1 (mod 2**32) have been received
(acknowledges status) on the connection.
public InitiatorMessageParser(ProtocolDataUnit initProtocolDataUnit)
initProtocolDataUnit - The reference ProtocolDataUnit instance, which
contains this InitiatorMessageParser object.public String getShortInfo()
getShortInfo in class AbstractMessageParserpublic String toString()
toString in class AbstractMessageParserpublic void clear()
clear in class AbstractMessageParserpublic boolean incrementSequenceNumber()
AbstractMessageParser instance affects the
incrementation of the Command Sequence Number.incrementSequenceNumber in class AbstractMessageParsertrue, if the counter has to be incremented. Else false.public final int getCommandSequenceNumber()
InitiatorMessageParser object.public final int getExpectedStatusSequenceNumber()
InitiatorMessageParser object.public void setCommandSequenceNumber(int initCmdSN)
InitiatorMessageParser object to the given value.initCmdSN - The new Command Sequence Number.public final void setExpectedStatusSequenceNumber(int initExpStatSN)
InitiatorMessageParser object to the
given value.initExpStatSN - The new Expected Status Sequence Number.protected void deserializeBytes1to3(int line)
throws InternetSCSIException
1 till 3 in the Basic Header
Segment.deserializeBytes1to3 in class AbstractMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected void deserializeBytes20to23(int line)
throws InternetSCSIException
20 till 23 in the Basic Header
Segment.deserializeBytes20to23 in class AbstractMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void deserializeBytes24to27(int line)
throws InternetSCSIException
24 till 27 in the Basic Header
Segment.deserializeBytes24to27 in class AbstractMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void deserializeBytes28to31(int line)
throws InternetSCSIException
28 till 31 in the Basic Header
Segment.deserializeBytes28to31 in class AbstractMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected void deserializeBytes32to35(int line)
throws InternetSCSIException
32 till 35 in the Basic Header
Segment.deserializeBytes32to35 in class AbstractMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected void deserializeBytes36to39(int line)
throws InternetSCSIException
36 till 39 in the Basic Header
Segment.deserializeBytes36to39 in class AbstractMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected void deserializeBytes40to43(int line)
throws InternetSCSIException
40 till 43 in the Basic Header
Segment.deserializeBytes40to43 in class AbstractMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected void deserializeBytes44to47(int line)
throws InternetSCSIException
44 till 47 in the Basic Header
Segment.deserializeBytes44to47 in class AbstractMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected int serializeBytes1to3()
1 till 3 in the Basic
Header Segment.serializeBytes1to3 in class AbstractMessageParserprotected int serializeBytes20to23()
20 till 23 in the Basic
Header Segment.serializeBytes20to23 in class AbstractMessageParserprotected int serializeBytes24to27()
24 till 27 in the Basic
Header Segment.serializeBytes24to27 in class AbstractMessageParserprotected int serializeBytes28to31()
28 till 31 in the Basic
Header Segment.serializeBytes28to31 in class AbstractMessageParserprotected int serializeBytes32to35()
32 till 35 in the Basic
Header Segment.serializeBytes32to35 in class AbstractMessageParserprotected int serializeBytes36to39()
36 till 39 in the Basic
Header Segment.serializeBytes36to39 in class AbstractMessageParserprotected int serializeBytes40to43()
40 till 43 in the Basic
Header Segment.serializeBytes40to43 in class AbstractMessageParserprotected int serializeBytes44to47()
44 till 47 in the Basic
Header Segment.serializeBytes44to47 in class AbstractMessageParserCopyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.