| Modifier and Type | Field and Description |
|---|---|
protected Connection |
connection
The context connection used by all message kinds.
|
protected static org.slf4j.Logger |
LOGGER
The Logger interface.
|
protected ProtocolDataUnitFactory |
protocolDataUnitFactory
Factory to create the
ProtocolDataUnit instances. |
protected boolean |
stateFollowing
boolean to mark following states.
|
| Constructor and Description |
|---|
WriteRequestState(Connection initConnection,
ByteBuffer initBuffer,
int initBufferPosition,
SCSICommandParser.TaskAttributes initTaskAttributes,
int initExpectedDataTransferLength,
int initLogicalBlockAddress,
short initTransferLength)
Constructor to create a
WriteRequestState instance, which creates a request to the iSCSI Target. |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
This method is always invoked, when a request message must be send or response message must be received and then
parsed.
|
Exception |
isCorrect(ProtocolDataUnit protocolDataUnit)
This method checks the correctness of the given
ProtocolDataUnit instance within the current state
of a connection. |
boolean |
nextStateFollowing()
This method shows if another state is following this one.
|
protected static final org.slf4j.Logger LOGGER
protected final Connection connection
protected final ProtocolDataUnitFactory protocolDataUnitFactory
ProtocolDataUnit instances.protected boolean stateFollowing
public WriteRequestState(Connection initConnection, ByteBuffer initBuffer, int initBufferPosition, SCSICommandParser.TaskAttributes initTaskAttributes, int initExpectedDataTransferLength, int initLogicalBlockAddress, short initTransferLength)
WriteRequestState instance, which creates a request to the iSCSI Target.initConnection - This is the connection, which is used for the network transmission.initBuffer - This buffer should be sent.initBufferPosition - The start index of the buffer.initTaskAttributes - The task attributes of this task.initExpectedDataTransferLength - The expected length in bytes, which should be transfered.initLogicalBlockAddress - The logical block address of the first block to write.initTransferLength - The number of blocks to write.public final void execute()
throws InternetSCSIException
InternetSCSIException - if any violation of the iSCSI Standard (RfC3720) has emerged.public Exception isCorrect(ProtocolDataUnit protocolDataUnit)
ProtocolDataUnit instance within the current state
of a connection.public boolean nextStateFollowing()
nextStateFollowing in interface IStatetrue, if another state must follow this state. Else an final state is reached.Copyright © 2018. All rights reserved.