|
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
public class 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()
This is an explicit close operation. |
ReliableInputStream.MsgListener |
getListener()
Returns the message listener for this pipe |
boolean |
hasNextMessage()
|
boolean |
isInputShutdown()
Returns true if closed |
(package private) Message |
nextMessage(boolean blocking)
|
int |
read()
|
int |
read(byte[] a,
int offset,
int length)
|
void |
recv(Message msg)
Receive this incoming message. |
void |
setTimeout(int timeout)
Sets the Timeout attribute. |
void |
softClose()
Prepare this input stream to being closed. |
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
read()
operations will fail.
close
in interface Closeable
close
in class InputStream
IOException
public boolean isInputShutdown()
public void softClose()
public void setTimeout(int timeout)
timeout
- The new soTimeout valuepublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] a, int offset, int length) throws IOException
read
in class InputStream
IOException
public void recv(Message msg)
recv
in interface Incoming
msg
- the messagepublic boolean hasNextMessage()
Message nextMessage(boolean blocking) throws IOException
IOException
public int available() throws IOException
available
in class InputStream
IOException
public ReliableInputStream.MsgListener getListener()
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |