Class LocalEndPoint

All Implemented Interfaces:
IBaseEndPoint, IEndPoint, Closeable, CloseStateRequestable, GroupCloseable, AutoCloseable

public final class LocalEndPoint extends AbstractEndPoint
A local end point can send messages to an other local end point.
Author:
Silvan Wyss
  • Method Details

    • toSlot

      public static LocalEndPoint toSlot(ISlot slot)
      Parameters:
      slot -
      Returns:
      a new LocalEndPoint that will connect to the given slot.
      Throws:
      NullPointerException - if the given slot is null.
    • toServerAndSlot

      public static LocalEndPoint toServerAndSlot(AbstractServer server, String slot)
      Parameters:
      server -
      slot -
      Returns:
      a new LocalEndPoint that will connect to the given slot on the given server.
      Throws:
      NullPointerException - if the given server is null.
      RuntimeException - if the given slot is null.
      RuntimeException - if the given slot is null.
    • getConnectionType

      public ConnectionType getConnectionType()
    • getPeerType

      public PeerType getPeerType()
    • sendAndWaitToReply

      public String sendAndWaitToReply(String message)
      Lets this local end point send the given message.
      Parameters:
      message -
      Returns:
      the reply to the given message.
      Throws:
      RuntimeException - if this local end point is closed.
    • getStoredCounterpart

      public LocalEndPoint getStoredCounterpart()
      Returns:
      the counterpart of this local end point.
    • getCustomTargetSlot

      public String getCustomTargetSlot()
      Returns:
      the target of this local end point.
      Throws:
      ArgumentDoesNotHaveAttributeException - if this local end point does not have a target.
    • getReplyForRequest

      public String getReplyForRequest(String message)
      Lets this local end point send the given message.
      Parameters:
      message -
      Returns:
      the reply to the given message from this local end point.
    • getSecurityMode

      public SecurityMode getSecurityMode()
    • hasCustomTargetSlot

      public boolean hasCustomTargetSlot()