Class MockTransport

    • Constructor Detail

      • MockTransport

        public MockTransport()
    • Method Detail

      • init

        public void init()
                  throws java.lang.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:
        java.lang.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,
                                byte[] data,
                                int offset,
                                int length)
                         throws java.lang.Exception
        Description copied from class: TP
        Send a unicast 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 unicast address
        data - The data to be sent. This is not a copy, so don't modify it
        Throws:
        java.lang.Exception
      • getInfo

        public java.lang.String getInfo()
        Specified by:
        getInfo in class TP
      • down

        public java.lang.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