|
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
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()
|
ReliableInputStream.MsgListener |
getListener()
Returns the message listener for this pipe |
boolean |
hasNextMessage()
|
boolean |
isInputShutdown()
|
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
close in interface Closeableclose in class InputStreamIOExceptionpublic boolean isInputShutdown()
public void setClosing()
throws IOException
IOExceptionpublic void setTimeout(int timeout)
timeout - The new soTimeout value
public int read()
throws IOException
read in class InputStreamIOException
public int read(byte[] a,
int offset,
int length)
throws IOException
read in class InputStreamIOExceptionpublic void recv(Message msg)
Incoming
recv in interface Incomingpublic boolean hasNextMessage()
public Message nextMessage()
throws IOException
IOException
public int available()
throws IOException
available in class InputStreamIOExceptionpublic ReliableInputStream.MsgListener getListener()
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||