Class JdkSslEngine

java.lang.Object
javax.net.ssl.SSLEngine
io.netty.handler.ssl.JdkSslEngine
All Implemented Interfaces:
ApplicationProtocolAccessor
Direct Known Subclasses:
JdkAlpnSslEngine

class JdkSslEngine extends javax.net.ssl.SSLEngine implements ApplicationProtocolAccessor
  • Field Details

    • engine

      private final javax.net.ssl.SSLEngine engine
    • applicationProtocol

      private volatile java.lang.String applicationProtocol
  • Constructor Details

    • JdkSslEngine

      JdkSslEngine(javax.net.ssl.SSLEngine engine)
  • Method Details

    • getNegotiatedApplicationProtocol

      public java.lang.String getNegotiatedApplicationProtocol()
      Description copied from interface: ApplicationProtocolAccessor
      Returns the name of the negotiated application-level protocol.
      Specified by:
      getNegotiatedApplicationProtocol in interface ApplicationProtocolAccessor
      Returns:
      the application-level protocol name or null if the negotiation failed or the client does not have ALPN/NPN extension
    • setNegotiatedApplicationProtocol

      void setNegotiatedApplicationProtocol(java.lang.String applicationProtocol)
    • getSession

      public javax.net.ssl.SSLSession getSession()
      Specified by:
      getSession in class javax.net.ssl.SSLEngine
    • getWrappedEngine

      public javax.net.ssl.SSLEngine getWrappedEngine()
    • closeInbound

      public void closeInbound() throws javax.net.ssl.SSLException
      Specified by:
      closeInbound in class javax.net.ssl.SSLEngine
      Throws:
      javax.net.ssl.SSLException
    • closeOutbound

      public void closeOutbound()
      Specified by:
      closeOutbound in class javax.net.ssl.SSLEngine
    • getPeerHost

      public java.lang.String getPeerHost()
      Overrides:
      getPeerHost in class javax.net.ssl.SSLEngine
    • getPeerPort

      public int getPeerPort()
      Overrides:
      getPeerPort in class javax.net.ssl.SSLEngine
    • wrap

      public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer byteBuffer2) throws javax.net.ssl.SSLException
      Overrides:
      wrap in class javax.net.ssl.SSLEngine
      Throws:
      javax.net.ssl.SSLException
    • wrap

      public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[] byteBuffers, java.nio.ByteBuffer byteBuffer) throws javax.net.ssl.SSLException
      Overrides:
      wrap in class javax.net.ssl.SSLEngine
      Throws:
      javax.net.ssl.SSLException
    • wrap

      public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[] byteBuffers, int i, int i2, java.nio.ByteBuffer byteBuffer) throws javax.net.ssl.SSLException
      Specified by:
      wrap in class javax.net.ssl.SSLEngine
      Throws:
      javax.net.ssl.SSLException
    • unwrap

      public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer byteBuffer2) throws javax.net.ssl.SSLException
      Overrides:
      unwrap in class javax.net.ssl.SSLEngine
      Throws:
      javax.net.ssl.SSLException
    • unwrap

      public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer[] byteBuffers) throws javax.net.ssl.SSLException
      Overrides:
      unwrap in class javax.net.ssl.SSLEngine
      Throws:
      javax.net.ssl.SSLException
    • unwrap

      public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer[] byteBuffers, int i, int i2) throws javax.net.ssl.SSLException
      Specified by:
      unwrap in class javax.net.ssl.SSLEngine
      Throws:
      javax.net.ssl.SSLException
    • getDelegatedTask

      public java.lang.Runnable getDelegatedTask()
      Specified by:
      getDelegatedTask in class javax.net.ssl.SSLEngine
    • isInboundDone

      public boolean isInboundDone()
      Specified by:
      isInboundDone in class javax.net.ssl.SSLEngine
    • isOutboundDone

      public boolean isOutboundDone()
      Specified by:
      isOutboundDone in class javax.net.ssl.SSLEngine
    • getSupportedCipherSuites

      public java.lang.String[] getSupportedCipherSuites()
      Specified by:
      getSupportedCipherSuites in class javax.net.ssl.SSLEngine
    • getEnabledCipherSuites

      public java.lang.String[] getEnabledCipherSuites()
      Specified by:
      getEnabledCipherSuites in class javax.net.ssl.SSLEngine
    • setEnabledCipherSuites

      public void setEnabledCipherSuites(java.lang.String[] strings)
      Specified by:
      setEnabledCipherSuites in class javax.net.ssl.SSLEngine
    • getSupportedProtocols

      public java.lang.String[] getSupportedProtocols()
      Specified by:
      getSupportedProtocols in class javax.net.ssl.SSLEngine
    • getEnabledProtocols

      public java.lang.String[] getEnabledProtocols()
      Specified by:
      getEnabledProtocols in class javax.net.ssl.SSLEngine
    • setEnabledProtocols

      public void setEnabledProtocols(java.lang.String[] strings)
      Specified by:
      setEnabledProtocols in class javax.net.ssl.SSLEngine
    • getHandshakeSession

      public javax.net.ssl.SSLSession getHandshakeSession()
      Overrides:
      getHandshakeSession in class javax.net.ssl.SSLEngine
    • beginHandshake

      public void beginHandshake() throws javax.net.ssl.SSLException
      Specified by:
      beginHandshake in class javax.net.ssl.SSLEngine
      Throws:
      javax.net.ssl.SSLException
    • getHandshakeStatus

      public javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus()
      Specified by:
      getHandshakeStatus in class javax.net.ssl.SSLEngine
    • setUseClientMode

      public void setUseClientMode(boolean b)
      Specified by:
      setUseClientMode in class javax.net.ssl.SSLEngine
    • getUseClientMode

      public boolean getUseClientMode()
      Specified by:
      getUseClientMode in class javax.net.ssl.SSLEngine
    • setNeedClientAuth

      public void setNeedClientAuth(boolean b)
      Specified by:
      setNeedClientAuth in class javax.net.ssl.SSLEngine
    • getNeedClientAuth

      public boolean getNeedClientAuth()
      Specified by:
      getNeedClientAuth in class javax.net.ssl.SSLEngine
    • setWantClientAuth

      public void setWantClientAuth(boolean b)
      Specified by:
      setWantClientAuth in class javax.net.ssl.SSLEngine
    • getWantClientAuth

      public boolean getWantClientAuth()
      Specified by:
      getWantClientAuth in class javax.net.ssl.SSLEngine
    • setEnableSessionCreation

      public void setEnableSessionCreation(boolean b)
      Specified by:
      setEnableSessionCreation in class javax.net.ssl.SSLEngine
    • getEnableSessionCreation

      public boolean getEnableSessionCreation()
      Specified by:
      getEnableSessionCreation in class javax.net.ssl.SSLEngine
    • getSSLParameters

      public javax.net.ssl.SSLParameters getSSLParameters()
      Overrides:
      getSSLParameters in class javax.net.ssl.SSLEngine
    • setSSLParameters

      public void setSSLParameters(javax.net.ssl.SSLParameters sslParameters)
      Overrides:
      setSSLParameters in class javax.net.ssl.SSLEngine