net.i2p.sam
Class SAMv3DatagramSession
java.lang.Object
net.i2p.sam.SAMMessageSession
net.i2p.sam.SAMDatagramSession
net.i2p.sam.SAMv3DatagramSession
- All Implemented Interfaces:
- SAMDatagramReceiver, SAMv3Handler.Session
public class SAMv3DatagramSession
- extends SAMDatagramSession
- implements SAMv3Handler.Session, SAMDatagramReceiver
Constructor Summary |
SAMv3DatagramSession(String nick)
build a DatagramSession according to informations registered
with the given nickname |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
handler
final SAMv3Handler handler
server
final SAMv3Handler.DatagramServer server
nick
final String nick
clientAddress
final SocketAddress clientAddress
SAMv3DatagramSession
public SAMv3DatagramSession(String nick)
throws IOException,
DataFormatException,
I2PSessionException,
SAMException
- build a DatagramSession according to informations registered
with the given nickname
- Parameters:
nick
- nickname of the session
- Throws:
IOException
DataFormatException
I2PSessionException
SAMException
getNick
public String getNick()
- Specified by:
getNick
in interface SAMv3Handler.Session
receiveDatagramBytes
public void receiveDatagramBytes(Destination sender,
byte[] data)
throws IOException
- Description copied from interface:
SAMDatagramReceiver
- Send a byte array to a SAM client.
- Specified by:
receiveDatagramBytes
in interface SAMDatagramReceiver
- Parameters:
sender
- Destinationdata
- Byte array to be received
- Throws:
IOException
stopDatagramReceiving
public void stopDatagramReceiving()
- Description copied from interface:
SAMDatagramReceiver
- Stop receiving data.
- Specified by:
stopDatagramReceiving
in interface SAMDatagramReceiver