public abstract class SimulationSocketImpl<T> extends Object implements SimulationSocket<T>
| Constructor and Description |
|---|
SimulationSocketImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns the amount of objects ready for receiving.
|
void |
close()
Closes this socket.
|
boolean |
established()
Returns true if a connection is established with the other socket (ie.
|
T |
read()
Receives an object from this socket.
|
protected void |
setIO(at.borkowski.spicej.ticks.TickSource t,
InputStream in,
OutputStream out,
SimulationSocketImpl<T> otherSide,
Serializer<T> serializer) |
void |
write(T object)
Writes an object to this socket.
|
public boolean established()
SimulationSocketestablished in interface SimulationSocket<T>public int available()
throws IOException
SimulationSocketavailable in interface SimulationSocket<T>IOException - if any I/O operation failspublic T read() throws IOException
SimulationSocketread in interface SimulationSocket<T>IOException - if receiving failspublic void write(T object) throws IOException
SimulationSocketwrite in interface SimulationSocket<T>object - the object to be writtenIOException - if sending failspublic void close()
SimulationSocketclose in interface SimulationSocket<T>close in interface Closeableclose in interface AutoCloseableprotected void setIO(at.borkowski.spicej.ticks.TickSource t,
InputStream in,
OutputStream out,
SimulationSocketImpl<T> otherSide,
Serializer<T> serializer)
Copyright © 2015. All rights reserved.