public final class TextRequestParser extends InitiatorMessageParser
This class parses a Text Request message defined in the iSCSI Standard (RFC3720).
commandSequenceNumber, expectedStatusSequenceNumberlogicalUnitNumber, protocolDataUnit| Constructor and Description |
|---|
TextRequestParser(ProtocolDataUnit initProtocolDataUnit)
Default constructor, creates a new, empty
TextRequestParser 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 |
deserializeBytes20to23(int line)
Parse the bytes
20 till 23 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. |
int |
getTargetTransferTag()
When the Target Transfer Tag is set to the reserved value
0xffffffff, it tells
the target that this is a new request
and the target resets any internal state associated with the Initiator
Task Tag (resets the current negotiation state). |
boolean |
isContinueFlag()
When set to
1, indicates that the text (set of key=value
pairs) in this Text Request is not complete (it will be continued on
subsequent Text Requests); otherwise, it indicates that this Text Request
ends a set of key=value pairs. |
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. |
void |
setTargetTransferTag(int newTargetTransferTag)
Sets the Target Transfer Tag to a new one.
|
String |
toString()
This method concatenate all the fields of a derived parser to allow an
easy generation of debug informations.
|
deserializeBytes24to27, deserializeBytes28to31, deserializeBytes32to35, deserializeBytes36to39, deserializeBytes40to43, deserializeBytes44to47, getCommandSequenceNumber, getExpectedStatusSequenceNumber, getShortInfo, incrementSequenceNumber, serializeBytes24to27, serializeBytes28to31, serializeBytes32to35, serializeBytes36to39, serializeBytes40to43, serializeBytes44to47, setCommandSequenceNumber, setExpectedStatusSequenceNumbercanContainAdditionalHeaderSegments, canHaveDigests, deserializeBytes12to15, deserializeBytes8to11, getLogicalUnitNumber, serializeBytes12to15, serializeBytes8to11, setLogicalUnitNumberpublic TextRequestParser(ProtocolDataUnit initProtocolDataUnit)
TextRequestParser object.initProtocolDataUnit - The reference ProtocolDataUnit instance, which
contains this TextRequestParser subclass object.public final String toString()
toString in class InitiatorMessageParserpublic 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 InitiatorMessageParserpublic final void setTargetTransferTag(int newTargetTransferTag)
newTargetTransferTag - The new Target Transfer Tag.getTargetTransferTag()public final boolean isContinueFlag()
1, indicates that the text (set of key=value
pairs) in this Text Request is not complete (it will be continued on
subsequent Text Requests); otherwise, it indicates that this Text Request
ends a set of key=value pairs. A Text Request with the C bit
set to 1 MUST have the F bit set to 0.True, if the Continue Flag is set. Else false.public final int getTargetTransferTag()
0xffffffff, it tells
the target that this is a new request
and the target resets any internal state associated with the Initiator
Task Tag (resets the current negotiation state). The target sets the
Target Transfer Tag in a text response to a value other than the reserved
value 0xffffffff whenever it indicates that it has more data
to send or more operations to perform that are associated with the
specified Initiator Task Tag. It MUST do so whenever it sets the F bit to 0
in the response. By copying the
Target Transfer Tag from the response to the next Text Request, the
initiator tells the target to continue the operation for the specific
Initiator Task Tag. The initiator MUST ignore the Target Transfer Tag in
the Text Response when the F bit is set to 1.
This mechanism allows the initiator and target to transfer a large amount
of textual data over a sequence of text-command/text-response exchanges,
or to perform extended negotiation sequences. If the Target Transfer Tag
is not 0xffffffff, the LUN field MUST be sent
by the target in the Text Response.
A target MAY reset its internal negotiation state if an exchange is stalled by the initiator for a long time or if it is running out of resources. Long text responses are handled as in the following example: I->T Text SendTargets=All (F=1,TTT=0xffffffff) T->I Text <part 1> (F=0,TTT=0x12345678) I->T Text <empty> (F=1, TTT=0x12345678) T->I Text <part 2> (F=0, TTT=0x12345678) I->T Text <empty> (F=1, TTT=0x12345678) ... T->I Text <part n> (F=1, TTT=0xffffffff)
TextRequestParser object.protected final void deserializeBytes1to3(int line)
throws InternetSCSIException
1 till 3 in the Basic Header
Segment.deserializeBytes1to3 in class InitiatorMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void deserializeBytes20to23(int line)
throws InternetSCSIException
20 till 23 in the Basic Header
Segment.deserializeBytes20to23 in class InitiatorMessageParserline - 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 InitiatorMessageParserprotected final int serializeBytes20to23()
20 till 23 in the Basic
Header Segment.serializeBytes20to23 in class InitiatorMessageParserCopyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.