public final class SenderWorker extends Object
Constructor and Description |
---|
SenderWorker(Connection initConnection,
InetSocketAddress inetAddress)
Creates a new, empty
SenderWorker instance. |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method does all the necessary steps, which are needed when a connection should be closed.
|
org.jscsi.parser.ProtocolDataUnit |
receiveFromWire()
Receives a
ProtocolDataUnit from the socket and appends it to the end of the receiving queue of this
connection. |
void |
sendOverWire(org.jscsi.parser.ProtocolDataUnit unit)
Sends the given
ProtocolDataUnit instance over the socket to the connected iSCSI Target. |
public SenderWorker(Connection initConnection, InetSocketAddress inetAddress) throws IOException
SenderWorker
instance.initConnection
- The reference connection of this worker caller.inetAddress
- The InetSocketAddress of the Target.IOException
- if any IO error occurs.public final void close() throws IOException
IOException
- if an I/O error occurs.public org.jscsi.parser.ProtocolDataUnit receiveFromWire() throws DigestException, org.jscsi.exception.InternetSCSIException, IOException
ProtocolDataUnit
from the socket and appends it to the end of the receiving queue of this
connection.IOException
- if an I/O error occurs.org.jscsi.exception.InternetSCSIException
- if any violation of the iSCSI-Standard emerge.DigestException
- if a mismatch of the digest exists.public final void sendOverWire(org.jscsi.parser.ProtocolDataUnit unit) throws org.jscsi.exception.InternetSCSIException, IOException, InterruptedException
ProtocolDataUnit
instance over the socket to the connected iSCSI Target.unit
- The ProtocolDataUnit
instances to send.org.jscsi.exception.InternetSCSIException
- if any violation of the iSCSI-Standard emerge.IOException
- if an I/O error occurs.InterruptedException
- if another caller interrupted the current caller before or while the current caller
was waiting for a notification. The interrupted status of the current caller is cleared when this
exception is thrown.Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.