Class LOOPBACK


public class LOOPBACK extends TP
Makes copies of outgoing messages, swaps sender and receiver and sends the message back up the stack.
  • Constructor Details

    • LOOPBACK

      public LOOPBACK()
  • Method Details

    • supportsMulticasting

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

      public String toString()
      Overrides:
      toString in class TP
    • sendMulticast

      public void sendMulticast(byte[] data, int offset, int length) throws Exception
      Description copied from class: TP
      Send to all members in the group. UDP would use an IP multicast message, whereas TCP would send N messages, one for each member
      Specified by:
      sendMulticast in class TP
      Parameters:
      data - The data to be sent. This is not a copy, so don't modify it
      offset -
      length -
      Throws:
      Exception
    • sendUnicast

      public void sendUnicast(PhysicalAddress dest, byte[] data, int offset, int length) throws Exception
      Description copied from class: TP
      Send a unicast to 1 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
      offset -
      length -
      Throws:
      Exception
    • getInfo

      public String getInfo()
      Specified by:
      getInfo in class TP
    • getPhysicalAddress

      protected PhysicalAddress getPhysicalAddress()
      Specified by:
      getPhysicalAddress in class TP
    • down

      public Object down(Event evt)
      Caller by the layer above this layer. Usually we just put this Message into the send queue and let one or more worker threads handle it. A worker thread then removes the Message from the send queue, performs a conversion and adds the modified Message to the send queue of the layer below it, by calling Down).
      Overrides:
      down in class TP