A
- The type of the address, e.g. Address
public interface Server<A>
Modifier and Type | Method and Description |
---|---|
Server<A> |
receiver(Receiver<A> receiver)
Sets a receiver
|
void |
send(A dest,
byte[] buf,
int offset,
int length)
Sends a message to a destination
|
void |
send(A dest,
java.nio.ByteBuffer buf)
Sends a message to a destination
|
void |
start()
Starts the server.
|
void |
stop()
Stops the server, e.g.
|
Server<A> receiver(Receiver<A> receiver)
receiver
- The receivervoid start() throws java.lang.Exception
java.lang.Exception
void stop()
void send(A dest, byte[] buf, int offset, int length) throws java.lang.Exception
dest
- The destination address. Must not be nullbuf
- The bufferoffset
- The offset into the bufferlength
- The number of bytes to be sentjava.lang.Exception
void send(A dest, java.nio.ByteBuffer buf) throws java.lang.Exception
dest
- The destination address. Must not be nullbuf
- The buffer to be sentjava.lang.Exception
Copyright © 1998-2020 Red Hat. All Rights Reserved.