|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.i2p.sam.SAMStreamSession
net.i2p.sam.SAMv2StreamSession
public class SAMv2StreamSession
SAMv2 STREAM session class.
| Nested Class Summary | |
|---|---|
class |
SAMv2StreamSession.SAMv2StreamSessionSocketReader
SAM STREAM socket reader, running in its own thread. |
class |
SAMv2StreamSession.StreamConnector
SAM STREAM socket connecter, running in its own thread. |
protected class |
SAMv2StreamSession.v2StreamSender
|
| Nested classes/interfaces inherited from class net.i2p.sam.SAMStreamSession |
|---|
SAMStreamSession.DisconnectListener, SAMStreamSession.SAMStreamSessionServer, SAMStreamSession.SAMStreamSessionSocketReader, SAMStreamSession.SAMv1StreamSessionSocketReader, SAMStreamSession.StreamSender, SAMStreamSession.v1StreamSender |
| Field Summary |
|---|
| Fields inherited from class net.i2p.sam.SAMStreamSession |
|---|
canCreate, DEFAULT_FORCE_FLUSH, forceFlush, PROP_FORCE_FLUSH, recv, server, SOCKET_HANDLER_BUF_SIZE, socketMgr |
| Constructor Summary | |
|---|---|
SAMv2StreamSession(InputStream destStream,
String dir,
Properties props,
SAMStreamReceiver recv)
Create a new SAM STREAM session. |
|
SAMv2StreamSession(String dest,
String dir,
Properties props,
SAMStreamReceiver recv)
Create a new SAM STREAM session. |
|
| Method Summary | |
|---|---|
boolean |
connect(int id,
String dest,
Properties props)
Connect the SAM STREAM session to the specified Destination |
protected SAMStreamSession.SAMStreamSessionSocketReader |
newSAMStreamSessionSocketReader(I2PSocket s,
int id)
|
protected SAMStreamSession.StreamSender |
newStreamSender(I2PSocket s,
int id)
Lets us push data through the stream without blocking, (even after exceeding the I2PSocket's buffer) |
boolean |
setReceiveLimit(int id,
long limit,
boolean nolimit)
Send bytes through a SAM STREAM session. |
| Methods inherited from class net.i2p.sam.SAMStreamSession |
|---|
checkSocketHandlerId, close, closeConnection, createSocketHandler, getDestination, getSocketReader, removeSocketHandler, sendBytes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SAMv2StreamSession(String dest,
String dir,
Properties props,
SAMStreamReceiver recv)
throws IOException,
DataFormatException,
SAMException
dest - Base64-encoded destination (private key)dir - Session direction ("RECEIVE", "CREATE" or "BOTH")props - Properties to setup the I2P sessionrecv - Object that will receive incoming data
IOException
DataFormatException
SAMException
public SAMv2StreamSession(InputStream destStream,
String dir,
Properties props,
SAMStreamReceiver recv)
throws IOException,
DataFormatException,
SAMException
destStream - Input stream containing the destination keysdir - Session direction ("RECEIVE", "CREATE" or "BOTH")props - Properties to setup the I2P sessionrecv - Object that will receive incoming data
IOException
DataFormatException
SAMException| Method Detail |
|---|
public boolean connect(int id,
String dest,
Properties props)
throws DataFormatException,
SAMInvalidDirectionException
connect in class SAMStreamSessionid - Unique id for the connectiondest - Base64-encoded Destination to connect toprops - Options to be used for connection
DataFormatException - if the destination is not valid
SAMInvalidDirectionException - if trying to connect through a
receive-only session
protected SAMStreamSession.StreamSender newStreamSender(I2PSocket s,
int id)
throws IOException
newStreamSender in class SAMStreamSessions - I2PSocketid - Socket ID
IOException
protected SAMStreamSession.SAMStreamSessionSocketReader newSAMStreamSessionSocketReader(I2PSocket s,
int id)
throws IOException
newSAMStreamSessionSocketReader in class SAMStreamSessionIOException
public boolean setReceiveLimit(int id,
long limit,
boolean nolimit)
setReceiveLimit in class SAMStreamSessionid - Stream IDlimit - limitationnolimit - true to limit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||