Class NetEndPoint
java.lang.Object
ch.nolix.base.net.baseendpoint.AbstractBaseEndPoint
ch.nolix.base.net.level2server.AbstractEndPoint
ch.nolix.base.net.level2server.NetEndPoint
- All Implemented Interfaces:
IBaseEndPoint, IEndPoint, Closeable, CloseStateRequestable, GroupCloseable, AutoCloseable
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptiongetReplyForRequest(String message) Sends the given message and returns the reply.booleanstatic NetEndPointtoGivenHostAndGivenPortAndDefaultSlot(String host, int port) static NetEndPointtoGivenHostAndGivenPortAndGivenSlot(String host, int port, String slot) static NetEndPointstatic NetEndPointtoLocalMachineAndGivenPortAndDefaultSlot(int port) static NetEndPointtoLocalMachineAndGivenPortAndGivenSlot(int port, String slot) Methods inherited from class AbstractEndPoint
hasReplier, noteClose, setReplierMethods inherited from class AbstractBaseEndPoint
getStoredCloseController, getTargetSlotDefinition, hasDefaultTargetSlot, isBackendEndPoint, isFrontendEndPoint, isLocalEndPoint, isSocketEndPoint, isWebSocketEndPointMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseStateRequestable
isOpenMethods inherited from interface GroupCloseable
close, createCloseDependencyTo, getStoredCloseController, isClosedMethods inherited from interface IBaseEndPoint
getTargetSlotDefinition, hasDefaultTargetSlot, isBackendEndPoint, isFrontendEndPoint, isLocalEndPoint, isSocketEndPoint, isWebSocketEndPoint
-
Method Details
-
toGivenHostAndGivenPortAndDefaultSlot
- Parameters:
host-port-- Returns:
- a new
NetEndPointthat will connect to the default slot on the given port on the given host. - Throws:
RuntimeException- if the given port is not in [0, 65535].
-
toGivenHostAndGivenPortAndGivenSlot
- Parameters:
host-port-slot-- Returns:
- a new
NetEndPointthat will connect to the given slot on the given port on the given host. - Throws:
RuntimeException- if the given port is not in [0, 65535].RuntimeException- if the given slot is null.RuntimeException- if the given slot is blank.
-
toGivenHostAndHttpPortAndDefaultSlot
- Parameters:
host-- Returns:
- a new
NetEndPointthat will connect to the default slot on the HTTP port on the given host.
-
toLocalMachineAndGivenPortAndDefaultSlot
- Parameters:
port-- Returns:
- a new
NetEndPointthat will connect to the default slot on the given port on the local machine. - Throws:
RuntimeException- if the given port is not in [0, 65535].
-
toLocalMachineAndGivenPortAndGivenSlot
- Parameters:
port-slot-- Returns:
- a new
NetEndPointthat will connect to the given slot on the given port on the local machine. - Throws:
RuntimeException- if the given port is not in [0, 65535].RuntimeException- if the given slot is null or blank.
-
getConnectionType
-
getCustomTargetSlot
- Returns:
- the target of the current
NetEndPoint. - Throws:
ArgumentDoesNotHaveAttributeException- if this net end point does not have a target.
-
getPeerType
-
getSecurityMode
-
getReplyForRequest
Sends the given message and returns the reply.- Parameters:
message-- Returns:
- the reply to the given message if the current
NetEndPointstays connected, null otherwise.
-
hasCustomTargetSlot
public boolean hasCustomTargetSlot()
-