Package org.jgroups.tests.rt
Interface RtTransport
- All Known Implementing Classes:
JGroupsTransport,NioTransport,ServerTransport,TcpTransport,UdpTransport
public interface RtTransport
Transport for the
RoundTrip test- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the addresses of all cluster members.Returns the local addres of this member.String[]options()Prints the accepted options, e.g.voidSets options on this transport.voidreceiver(RtReceiver receiver) Sets the receiver whoseRtReceiver.receive(Object,byte[],int,int)callback will be invoked whenever a message is receivedvoidSends a messagevoidStarts the transport, e.g.voidstop()Stops the transport, e.g.
-
Method Details
-
options
String[] options()Prints the accepted options, e.g. [-host host] [-port port] [-server host]- Returns:
-
options
Sets options on this transport. Usually done after creation and beforestart(String...)is called, but may also be called at runtime.- Parameters:
options- The options- Throws:
Exception
-
receiver
Sets the receiver whoseRtReceiver.receive(Object,byte[],int,int)callback will be invoked whenever a message is received- Parameters:
receiver-
-
localAddress
Object localAddress()Returns the local addres of this member.- Returns:
- The local address. Implementations without cluster membership may return null
-
clusterMembers
Returns the addresses of all cluster members. May return null if not implemented- Returns:
- The list of all members in the cluster
-
start
Starts the transport, e.g. connecting to a server socket- Parameters:
options- Options passed to the transport at startup time. May be null- Throws:
Exception
-
stop
void stop()Stops the transport, e.g. stopping the accept() loop in a TCP-based server -
send
Sends a message- Parameters:
dest- The destination addressbuf- The bufferoffset- The offset at which the data startslength- The length (in bytes) of the data to send- Throws:
Exception
-