net.i2p.sam
Class SAMv2StreamSession.v2StreamSender
java.lang.Object
net.i2p.sam.SAMStreamSession.StreamSender
net.i2p.sam.SAMv2StreamSession.v2StreamSender
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- SAMv2StreamSession
protected class SAMv2StreamSession.v2StreamSender
- extends SAMStreamSession.StreamSender
Method Summary |
void |
run()
|
void |
sendBytes(InputStream in,
int size)
Send bytes through the SAM STREAM session socket sender |
void |
shutDownGracefully()
Stop a SAM STREAM session socket sender gracefully: stop the
sender thread once all pending data has been sent. |
void |
stopRunning()
Stop a SAM STREAM session socket sender thread immediately |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAMv2StreamSession.v2StreamSender
public SAMv2StreamSession.v2StreamSender(I2PSocket s,
int id)
throws IOException
- Throws:
IOException
sendBytes
public void sendBytes(InputStream in,
int size)
throws IOException
- Send bytes through the SAM STREAM session socket sender
- Overrides:
sendBytes
in class SAMStreamSession.StreamSender
- Parameters:
in
- Data stream of data to sendsize
- Count of bytes to send
- Throws:
IOException
- if the client didnt provide enough data
stopRunning
public void stopRunning()
- Stop a SAM STREAM session socket sender thread immediately
- Overrides:
stopRunning
in class SAMStreamSession.StreamSender
shutDownGracefully
public void shutDownGracefully()
- Stop a SAM STREAM session socket sender gracefully: stop the
sender thread once all pending data has been sent.
- Overrides:
shutDownGracefully
in class SAMStreamSession.StreamSender
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class SAMStreamSession.StreamSender