Class HostInfo

  • All Implemented Interfaces:
    java.io.Serializable

    public class HostInfo
    extends java.lang.Object
    implements java.io.Serializable
    Information about the remote host. Persisting this in memcache or similar storage can improve performance on future TLS connections by skipping roundtrips and reducing CPU use in handshake. This class is used in both server and client mode. AprSocketContextLitener.getPeer(name) can be used to read from an external storage. TODO: also save the SPDY persistent settings here. TODO: fix tickets, don't seem to work anymore.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      byte[][] certs
      Raw cert data (x.509 format).
      java.lang.String host  
      (package private) byte[] npn
      Negotiated NPN.
      (package private) int npnLen  
      int port  
      boolean secure  
      private static long serialVersionUID  
      byte[] sessDer
      DER-encoded session data.
      java.lang.String sessionId  
      byte[] ticket  
      int ticketLen  
    • Constructor Summary

      Constructors 
      Constructor Description
      HostInfo()  
      HostInfo​(java.lang.String host, int port, boolean secure)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getNpn()  
      void setNpn​(java.lang.String npn)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • host

        public java.lang.String host
      • port

        public int port
      • secure

        public boolean secure
      • certs

        public byte[][] certs
        Raw cert data (x.509 format). This is retrieved when a full handshake happens - if session reuse or tickets are used you'll not receive the certs again.
      • ticket

        public byte[] ticket
      • ticketLen

        public int ticketLen
      • sessionId

        public java.lang.String sessionId
      • sessDer

        public byte[] sessDer
        DER-encoded session data.
      • npn

        byte[] npn
        Negotiated NPN.
      • npnLen

        int npnLen
    • Constructor Detail

      • HostInfo

        public HostInfo()
      • HostInfo

        public HostInfo​(java.lang.String host,
                        int port,
                        boolean secure)
    • Method Detail

      • getNpn

        public java.lang.String getNpn()
      • setNpn

        public void setNpn​(java.lang.String npn)