Class SocketEndPoint
java.lang.Object
ch.nolix.base.net.baseendpoint.AbstractBaseEndPoint
ch.nolix.base.net.level1server.AbstractEndPoint
ch.nolix.base.net.level1server.AbstractNetEndPoint
ch.nolix.base.net.level1server.SocketEndPoint
- All Implemented Interfaces:
IBaseEndPoint, IEndPoint, Closeable, CloseStateRequestable, GroupCloseable, AutoCloseable
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionvoidLets the currentGroupCloseablenote a close.static SocketEndPointtoGivenHostAndGivenPortAndDefaultSlot(String host, int port) static SocketEndPointtoGivenHostAndGivenPortAndGivenSlot(String host, int port, String slot) static SocketEndPointstatic SocketEndPointstatic SocketEndPointtoLocalMachineAndGivenPortAndGivenSlot(int port, String slot) static SocketEndPointwithSocketAndSocketInputStreamAndSocketOutputStream(Socket socket, InputStream socketInputStream, OutputStream socketOutputStream) static SocketEndPointwithSocketAndSocketInputStreamAndSocketOutputStreamAndTarget(Socket socket, InputStream socketInputStream, OutputStream socketOutputStream, String target) Methods inherited from class AbstractNetEndPoint
sendMessageMethods inherited from class AbstractEndPoint
getCustomTargetSlot, hasCustomTargetSlot, hasReceiver, setReceiverMethods 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
SocketEndPointthat 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
public static SocketEndPoint toGivenHostAndGivenPortAndGivenSlot(String host, int port, String slot) - Parameters:
host-port-slot-- Returns:
- a new
SocketEndPointthat 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
SocketEndPointthat will connect to the default slot on the HTTP port on the given host.
-
toLocaleMachineAndGivenPortAndDefaultSlot
- Parameters:
port-- Returns:
- a new
SocketEndPointthat will connect to the default slot on the given port on the locale machine. - Throws:
RuntimeException- if the given port is not in [0, 65535].
-
toLocalMachineAndGivenPortAndGivenSlot
- Parameters:
port-slot-- Returns:
- a new
SocketEndPointthat 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 target slot null.RuntimeException- if the given target slot blank.
-
withSocketAndSocketInputStreamAndSocketOutputStream
public static SocketEndPoint withSocketAndSocketInputStreamAndSocketOutputStream(Socket socket, InputStream socketInputStream, OutputStream socketOutputStream) - Parameters:
socket-socketInputStream-socketOutputStream-- Returns:
- a new
AbstractNetEndPointwith the given socket. The given socketInputStream and the given socketOutputStream belong to the given socket. - Throws:
RuntimeException- if the given socket is null.RuntimeException- if the given socketInputStream is null.RuntimeException- if the given socketOutputStream is null.
-
withSocketAndSocketInputStreamAndSocketOutputStreamAndTarget
public static SocketEndPoint withSocketAndSocketInputStreamAndSocketOutputStreamAndTarget(Socket socket, InputStream socketInputStream, OutputStream socketOutputStream, String target) - Parameters:
socket-socketInputStream-socketOutputStream-target-- Returns:
- a new
AbstractNetEndPointwith the given socket and target. The given socketInputStream and the given socketOutputStream belong to the given socket. - Throws:
RuntimeException- if the given socket is null.RuntimeException- if the given socketInputStream is null.RuntimeException- if the given socketOutputStream is null.RuntimeException- if the given target is null.RuntimeException- if the given target is blank.
-
getPeerType
-
getConnectionType
-
getSecurityMode
-
noteClose
public void noteClose()Lets the currentGroupCloseablenote a close.
-