|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A raw data handler that works with TCP. More...

Public Member Functions | |
| RawDataHandlerTCP (Integer rawDataID, String rawDataIP, int rawDataPort) | |
| Constructor. | |
| synchronized ObjectInputStream | requestRawData () |
| Gets the raw data. | |
| synchronized void | discardRawData () |
| Tells the sender to discard the raw data. | |
Protected Member Functions | |
| void | finalize () throws Throwable |
| Closes the socket. | |
Private Member Functions | |
| void | readObject (java.io.ObjectInputStream in) throws IOException, ClassNotFoundException |
| This is the method called when deserializing a RawDataHandlerTCP. | |
Private Attributes | |
| Integer | rawDataID = null |
| ID of the raw data. | |
| String | rawDataIP |
| IP from which the raw data can be retrieved. | |
| int | rawDataPort |
| Port number from which the raw data can be retrieved. | |
| transient Socket | socket |
| Socket used to communicate with the sender of the raw data. | |
| transient ObjectOutputStream | toSender |
| Output stream used to send requests to the sender of the message. | |
Static Private Attributes | |
| static final long | serialVersionUID = 9055544029313537503L |
| Used for serialization. | |
A raw data handler that works with TCP.
| frodo2.communication.tcp.RawDataHandlerTCP.RawDataHandlerTCP | ( | Integer | rawDataID, |
| String | rawDataIP, | ||
| int | rawDataPort ) |
Constructor.
| rawDataID | ID of the raw data |
| rawDataIP | IP from which the raw data can be retrieved |
| rawDataPort | Port number from which the raw data can be retrieved |
References rawDataID, rawDataIP, and rawDataPort.
| synchronized void frodo2.communication.tcp.RawDataHandlerTCP.discardRawData | ( | ) |
Tells the sender to discard the raw data.
Implements frodo2.communication.MessageWithRawData.RawDataHandler.
|
protected |
|
private |
This is the method called when deserializing a RawDataHandlerTCP.
Establishes the connection with the sender of the raw data.
| in | the stream from which the message is read |
| ClassNotFoundException | thrown if the class read from the stream is unknown |
| IOException | thrown if an I/O error occurs |
References frodo2.java, rawDataID, rawDataIP, rawDataPort, socket, and toSender.
| synchronized ObjectInputStream frodo2.communication.tcp.RawDataHandlerTCP.requestRawData | ( | ) |
Gets the raw data.
The first time this method is called, it sends a request for the raw data and returns a stream from which it can be read. It returns null if any exception occurs in the process, or this is not the first time the method is called.
Implements frodo2.communication.MessageWithRawData.RawDataHandler.
|
private |
ID of the raw data.
Referenced by discardRawData(), RawDataHandlerTCP(), readObject(), and requestRawData().
|
private |
IP from which the raw data can be retrieved.
Referenced by RawDataHandlerTCP(), and readObject().
|
private |
Port number from which the raw data can be retrieved.
Referenced by RawDataHandlerTCP(), and readObject().
|
staticprivate |
Used for serialization.
|
private |
Socket used to communicate with the sender of the raw data.
Referenced by finalize(), readObject(), and requestRawData().
|
private |
Output stream used to send requests to the sender of the message.
Referenced by discardRawData(), readObject(), and requestRawData().