Class MockTransport

All Implemented Interfaces:
Lifecycle, DiagnosticsHandler.ProbeHandler

public class MockTransport extends TP
A dummy implementation of TP
Since:
5.4
Author:
Bela Ban
  • Constructor Details

    • MockTransport

      public MockTransport()
  • Method Details

    • init

      public void init() throws Exception
      Description copied from class: Protocol
      Called after a protocol has been created and before the protocol is started. Attributes are already set. Other protocols are not yet connected and events cannot yet be sent.
      Specified by:
      init in interface Lifecycle
      Overrides:
      init in class TP
      Throws:
      Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
    • supportsMulticasting

      public boolean supportsMulticasting()
      Description copied from class: TP
      Whether hardware multicasting is supported
      Specified by:
      supportsMulticasting in class TP
    • sendUnicast

      public void sendUnicast(PhysicalAddress dest, ByteBuffer data) throws Exception
      Description copied from class: TP
      Send a unicast message to a member. Note that the destination address is a *physical*, not a logical address
      Specified by:
      sendUnicast in class TP
      Parameters:
      dest - Must be a non-null physical unicast address (e.g. IpAddress)
      data - The data to be sent. This is not a copy, so don't modify it
      Throws:
      Exception
    • getPhysicalAddress

      protected PhysicalAddress getPhysicalAddress()
      Description copied from class: TP
      Returns the physical address of this transport
      Specified by:
      getPhysicalAddress in class TP
    • cluster

      public MockTransport cluster(AsciiString s)
    • down

      public Object down(Message msg)
      Description copied from class: TP
      A message needs to be sent to a single member or all members
      Overrides:
      down in class TP