Interface RtTransport

All Known Implementing Classes:
JGroupsTransport, NioTransport, ServerTransport, TcpTransport, UdpTransport

public interface RtTransport
Transport for the RoundTrip test
Since:
4.0
  • Method Details

    • options

      String[] options()
      Prints the accepted options, e.g. [-host host] [-port port] [-server host]
      Returns:
    • options

      void options(String... options) throws Exception
      Sets options on this transport. Usually done after creation and before start(String...) is called, but may also be called at runtime.
      Parameters:
      options - The options
      Throws:
      Exception
    • receiver

      void receiver(RtReceiver receiver)
      Sets the receiver whose RtReceiver.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

      List<? extends Object> clusterMembers()
      Returns the addresses of all cluster members. May return null if not implemented
      Returns:
      The list of all members in the cluster
    • start

      void start(String... options) throws Exception
      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

      void send(Object dest, byte[] buf, int offset, int length) throws Exception
      Sends a message
      Parameters:
      dest - The destination address
      buf - The buffer
      offset - The offset at which the data starts
      length - The length (in bytes) of the data to send
      Throws:
      Exception