|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
net.jxta.impl.util.pipe.reliable.ReliableInputStream
Acts as a reliable input stream. Accepts data which arrives in messages and orders it.
Nested Class Summary | |
static interface |
ReliableInputStream.MsgListener
The listener interface for receiving Message |
Field Summary | |
(package private) long |
nextRetransRequest
|
Constructor Summary | |
ReliableInputStream(Outgoing outgoing,
int timeout)
|
|
ReliableInputStream(Outgoing outgoing,
int timeout,
ReliableInputStream.MsgListener listener)
|
Method Summary | |
int |
available()
|
void |
close()
|
ReliableInputStream.MsgListener |
getListener()
Returns the message listener for this pipe |
boolean |
hasNextMessage()
|
boolean |
isInputShutdown()
{@inheritDoc} |
Message |
nextMessage()
|
int |
read()
|
int |
read(byte[] a,
int offset,
int length)
|
void |
recv(Message msg)
Receive this incoming message. |
void |
setClosing()
prepare this input stream to being closed. |
void |
setTimeout(int timeout)
Sets the Timeout attribute. |
Methods inherited from class java.io.InputStream |
mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
long nextRetransRequest
Constructor Detail |
public ReliableInputStream(Outgoing outgoing, int timeout)
public ReliableInputStream(Outgoing outgoing, int timeout, ReliableInputStream.MsgListener listener)
Method Detail |
public void close() throws IOException
IOException
public boolean isInputShutdown()
public void setClosing() throws IOException
IOException
public void setTimeout(int timeout)
timeout
- The new soTimeout valuepublic int read() throws IOException
IOException
public int read(byte[] a, int offset, int length) throws IOException
IOException
public void recv(Message msg)
Incoming
recv
in interface Incoming
public boolean hasNextMessage()
public Message nextMessage() throws IOException
IOException
public int available() throws IOException
IOException
public ReliableInputStream.MsgListener getListener()
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |