connect.socket
Class SocketConsumerChannel
java.lang.Object
|
+--connect.socket.SocketConsumerChannel
- All Implemented Interfaces:
- ConsumerChannel
- public class SocketConsumerChannel
- extends Object
- implements ConsumerChannel
|
Method Summary |
void |
close()
Closes this channel. |
boolean |
isAvailable()
Returns true if it is possible at the time of the call to
consume additional data from the channel. |
Object |
readObject()
Reads in an object from the channel. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
ois
private final ObjectInputStream ois
SocketConsumerChannel
public SocketConsumerChannel(InputStream is)
close
public void close()
throws IOException
- Description copied from interface:
ConsumerChannel
- Closes this channel.
- Specified by:
close in interface ConsumerChannel
IOException
isAvailable
public boolean isAvailable()
throws IOException
- Description copied from interface:
ConsumerChannel
- Returns true if it is possible at the time of the call to
consume additional data from the channel.
- Specified by:
isAvailable in interface ConsumerChannel
IOException
readObject
public Object readObject()
throws IOException,
ClassNotFoundException
- Reads in an object from the channel. This method is made
synchronized to allow for multiple
Thread
accesses to call readObject at the same time.
- Specified by:
readObject in interface ConsumerChannel
IOException
ClassNotFoundException
To submit a bug or feature email the author of that class. Funding for this research was provided by Boeing and DARPA.