public final class TextResponseParser extends TargetMessageParser
This class parses a Text Response message defined in the iSCSI Standard (RFC3720).
expectedCommandSequenceNumber, maximumCommandSequenceNumber, statusSequenceNumberlogicalUnitNumber, protocolDataUnit| Constructor and Description |
|---|
TextResponseParser(ProtocolDataUnit initProtocolDataUnit)
Default constructor, creates a new, empty
TextResponseParser 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 a target has more work to do (e.g., cannot transfer all the
remaining text data in a single Text Response or has to continue the
negotiation) and has enough resources to proceed, it MUST set the Target
Transfer Tag to a value other than the reserved value of
0xffffffff. |
boolean |
isContinueFlag()
When set to
1, indicates that the text (set of key=value
pairs) in this Text Response is not complete (it will be continued on
subsequent Text Responses); otherwise, it indicates that this Text
Response 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 |
setContinueFlag(boolean continueFlag) |
void |
setTargetTransferTag(int targetTransferTag) |
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, getExpectedCommandSequenceNumber, getMaximumCommandSequenceNumber, getShortInfo, getStatusSequenceNumber, incrementSequenceNumber, serializeBytes24to27, serializeBytes28to31, serializeBytes32to35, serializeBytes36to39, serializeBytes40to43, serializeBytes44to47, setExpectedCommandSequenceNumber, setMaximumCommandSequenceNumber, setStatusSequenceNumbercanContainAdditionalHeaderSegments, canHaveDigests, deserializeBytes12to15, deserializeBytes8to11, getLogicalUnitNumber, serializeBytes12to15, serializeBytes8to11, setLogicalUnitNumberpublic TextResponseParser(ProtocolDataUnit initProtocolDataUnit)
TextResponseParser object.initProtocolDataUnit - The reference ProtocolDataUnit instance, which
contains this TextResponseParser 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 boolean isContinueFlag()
1, indicates that the text (set of key=value
pairs) in this Text Response is not complete (it will be continued on
subsequent Text Responses); otherwise, it indicates that this Text
Response ends a set of key=value pairs. A Text Response 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.
Otherwise, the Target Transfer Tag MUST be set to 0xffffffff . When the Target Transfer
Tag is not 0xffffffff, the LUN field may be significant. The initiator MUST
copy the Target Transfer Tag and LUN in its next request to indicate that it wants the
rest of the data. When the target receives a Text Request with the Target Transfer Tag set to the
reserved value of 0xffffffff, it resets its internal information (resets state) associated
with the given Initiator Task Tag (restarts the negotiation). When a target cannot finish the operation
in a single Text Response, and does not have enough resources to continue, it rejects the Text Request
with the appropriate Reject code.
TextResponseParser object.public final void setContinueFlag(boolean continueFlag)
public final void setTargetTransferTag(int targetTransferTag)
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 deserializeBytes20to23(int line)
throws InternetSCSIException
20 till 23 in the Basic Header
Segment.deserializeBytes20to23 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 serializeBytes20to23()
20 till 23 in the Basic
Header Segment.serializeBytes20to23 in class TargetMessageParserCopyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.