Klasse NetEndPoint

Alle implementierten Schnittstellen:
IBaseEndPoint, IEndPoint, Closeable, CloseStateRequestable, GroupCloseable, AutoCloseable

public final class NetEndPoint extends EndPoint
A NetEndPoint is a EndPoint that can send messages to an other NetEndPoint.
Version:
2017-05-22
Autor:
Silvan Wyss
  • Konstruktordetails

    • NetEndPoint

      public NetEndPoint(int port)
      Creates a new NetEndPoint that will connect to the default target on the given port on the local machine.
      Parameter:
      port -
      Löst aus:
      ArgumentIsOutOfRangeException - if the given port is not in [0, 65535].
    • NetEndPoint

      public NetEndPoint(int port, String target)
      Creates a new NetEndPoint that will connect to the given target on the given port on the local machine.
      Parameter:
      port -
      target -
      Löst aus:
      ArgumentIsOutOfRangeException - if the given port is not in [0, 65535].
      ArgumentIsNullException - if the given target is null.
      InvalidArgumentException - if the given target is blank.
    • NetEndPoint

      public NetEndPoint(String ip)
      Creates a new NetEndPoint that will connect to the default target on the HTTP port (80) on the machine with the given ip.
      Parameter:
      ip -
    • NetEndPoint

      public NetEndPoint(String ip, int port)
      Creates a new NetEndPoint that will connect to the default target on the given port on the machine with the given ip.
      Parameter:
      ip -
      port -
      Löst aus:
      ArgumentIsOutOfRangeException - if the given port is not in [0, 65535].
    • NetEndPoint

      public NetEndPoint(String ip, int port, String target)
      Creates a new NetEndPoint that will connect to the given target on the given port on the machine with the given ip.
      Parameter:
      ip -
      port -
      target -
      Löst aus:
      ArgumentIsOutOfRangeException - if the given port is not in [0, 65535].
      ArgumentIsNullException - if the given target is null.
      InvalidArgumentException - if the given target is blank.
  • Methodendetails

    • getConnectionType

      public ConnectionType getConnectionType()
    • getCustomTargetSlot

      public String getCustomTargetSlot()
      Gibt zurück:
      the target of the current NetEndPoint.
      Löst aus:
      ArgumentDoesNotHaveAttributeException - if this net end point does not have a target.
    • getPeerType

      public PeerType getPeerType()
    • getSecurityLevel

      public SecurityMode getSecurityLevel()
    • isNetEndPoint

      public boolean isNetEndPoint()
      Gibt zurück:
      true if the current NetEndPoint is a net end point.
    • getReplyForRequest

      public String getReplyForRequest(String message)
      Sends the given message and returns the reply.
      Parameter:
      message -
      Gibt zurück:
      the reply to the given message if the current NetEndPoint stays connected, null otherwise.
    • hasCustomTargetSlot

      public boolean hasCustomTargetSlot()