Module swim.io
Package swim.io

Interface IpContext

All Known Subinterfaces:
HttpClientContext, HttpRequesterContext, HttpResponderContext, HttpServerContext, IpModemContext<I,O>, IpSocketContext, IpSocketRef, MqttSocketContext<I,O>, WarpSocketContext, WebSocketContext<I,O>
All Known Implementing Classes:
AbstractHttpClient, AbstractHttpRequester, AbstractHttpResponder, AbstractHttpServer, AbstractIpModem, AbstractIpSocket, AbstractMqttSocket, AbstractWarpClient, AbstractWarpServer, AbstractWarpSocket, AbstractWebSocket, AbstractWsClient, AbstractWsServer, HttpClientModem, HttpClientRequester, HttpServerModem, HttpServerResponder, HttpWebResponder, IpSocketModem, MqttSocketModem, StaticHttpResponder, WarpWebSocket, WebServer, WebSocketModem, WsUpgradeRequester, WsUpgradeResponder

public interface IpContext
IP network connection context.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the cryptographic cipher suite used by the underlying network connection.
    boolean
    Returns true if the underlying network channel initiated an outgoing connection.
    boolean
    Returns true if the underlying network channel is currently connected.
    boolean
    Returns true if the underlying network transport is encrypted.
    boolean
    Returns true if the underlying network channel accepted an incoming connection.
    Returns the IP address and port of the local endpoint of the underlying network connection.
    Returns the certificate chain used to authenticate the local endpoint of the underlying network connection.
    Returns the authenticated identity of the local endpoint of the underlying network connection.
    Returns the IP address and port of the remote endpoint of the underlying network connection.
    Returns the certificate chain used to authenticate the remote endpoint of the underlying network connection.
    Returns the authenticated identity of the remote endpoint of the underlying network connection.
    Returns the name of the transport-layer security protocol used by the underlying network connection.
  • Method Details

    • isConnected

      boolean isConnected()
      Returns true if the underlying network channel is currently connected.
    • isClient

      boolean isClient()
      Returns true if the underlying network channel initiated an outgoing connection.
    • isServer

      boolean isServer()
      Returns true if the underlying network channel accepted an incoming connection.
    • isSecure

      boolean isSecure()
      Returns true if the underlying network transport is encrypted.
    • securityProtocol

      String securityProtocol()
      Returns the name of the transport-layer security protocol used by the underlying network connection. Returns null if the underlying network channel is not currently connected, or if the underlying network connection is not secure.
    • cipherSuite

      String cipherSuite()
      Returns the cryptographic cipher suite used by the underlying network connection. Returns null if the underlying network channel is not currently connected, or if the underlying network connection is not secure.
    • localAddress

      InetSocketAddress localAddress()
      Returns the IP address and port of the local endpoint of the underlying network connection. Returns null if the underlying network channel is not currently connected.
    • localPrincipal

      Principal localPrincipal()
      Returns the authenticated identity of the local endpoint of the underlying network connection. Returns null if the underlying network channel is not currently connected, or if the underlying network connection is not authenticated.
    • localCertificates

      Collection<Certificate> localCertificates()
      Returns the certificate chain used to authenticate the local endpoint of the underlying network connection. Returns null if the underlying network channel is not currently connected, or if the underlying network connection is not authenticated.
    • remoteAddress

      InetSocketAddress remoteAddress()
      Returns the IP address and port of the remote endpoint of the underlying network connection. Returns null if the underlying network channel is not currently connected.
    • remotePrincipal

      Principal remotePrincipal()
      Returns the authenticated identity of the remote endpoint of the underlying network connection. Returns null if the underlying network channel is not currently connected, or if the underlying network connection is not authenticated.
    • remoteCertificates

      Collection<Certificate> remoteCertificates()
      Returns the certificate chain used to authenticate the remote endpoint of the underlying network connection. Returns null if the underlying network channel is not currently connected, or if the underlying network connection is not authenticated.