public final class ProtocolImpl extends java.lang.Object implements Protocol, java.io.Externalizable
Protocol
.
Protocol
s can now be serialized, since it is too
difficult at bootstrap time to provide enough prior initialization
to allow Protocol
s to be looked up based on their
number. readResolve()
is implemented to deal with the
instance where we have a local version representing the same
protocol.Modifier and Type | Class and Description |
---|---|
(package private) static class |
ProtocolImpl.NullProtocolHandler |
Modifier and Type | Field and Description |
---|---|
private static byte |
dynamicPn |
private ProtocolHandler |
handler |
private java.lang.String |
name |
static byte |
NUM_PROTOCOLS |
static java.lang.String |
PROTOCOL_HTTPS_NAME |
static int |
PROTOCOL_T3_FLAG |
static java.lang.String |
PROTOCOL_T3_NAME |
static int |
PROTOCOL_T3S_FLAG |
static java.lang.String |
PROTOCOL_T3S_NAME |
static Protocol |
PROTOCOL_UNKNOWN |
private byte |
protocolNumber |
private boolean |
secure |
private static long |
serialVersionUID |
static byte |
UNKNOWN |
private java.lang.String |
urlPrefix |
Constructor and Description |
---|
ProtocolImpl() |
ProtocolImpl(byte pn,
java.lang.String name,
java.lang.String urlPrefix,
boolean secure,
ProtocolHandler handler) |
ProtocolImpl(java.lang.String name,
java.lang.String urlPrefix,
boolean secure,
ProtocolHandler handler)
Allocate a dynamic protocol.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAsURLPrefix()
Get a URL prefix for this protocol suitable for use in an
InitialContext url.
|
ProtocolHandler |
getHandler()
Get the discrimination handler for this protocol.
|
private static byte |
getNextProtocol() |
java.lang.String |
getProtocolName()
Get the indentifiable name of this protocol.
|
byte |
getQOS()
Return the QOS of this protocol.
|
int |
hashCode() |
boolean |
isEnabled()
Determine whether this protocol is suitable for use in the
Server.
|
boolean |
isSatisfactoryQOS(byte QOS)
Determine whether this protocol can satisfy the desired QOS.
|
boolean |
isSecure()
Determine whether this protocol is secure, i.e.
|
boolean |
isUnknown()
Determine whether this protocol is unknown.
|
void |
readExternal(java.io.ObjectInput in) |
java.lang.Object |
readResolve()
Try and replace a serialized protocol, with the local server's notion of the same protocol.
|
byte |
toByte()
Return the index of this Protocol.
|
java.lang.String |
toString() |
Protocol |
upgrade()
upgrade this protocol to a more secure version.
|
void |
writeExternal(java.io.ObjectOutput out) |
private static final long serialVersionUID
public static final byte UNKNOWN
public static final byte NUM_PROTOCOLS
public static final int PROTOCOL_T3_FLAG
public static final int PROTOCOL_T3S_FLAG
public static final java.lang.String PROTOCOL_T3_NAME
public static final java.lang.String PROTOCOL_T3S_NAME
public static final java.lang.String PROTOCOL_HTTPS_NAME
public static final Protocol PROTOCOL_UNKNOWN
private static byte dynamicPn
private java.lang.String name
private java.lang.String urlPrefix
private boolean secure
private byte protocolNumber
private ProtocolHandler handler
public ProtocolImpl()
ProtocolImpl(byte pn, java.lang.String name, java.lang.String urlPrefix, boolean secure, ProtocolHandler handler)
ProtocolImpl(java.lang.String name, java.lang.String urlPrefix, boolean secure, ProtocolHandler handler)
private static byte getNextProtocol()
public ProtocolHandler getHandler()
Protocol
getHandler
in interface Protocol
public java.lang.String getProtocolName()
Protocol
getProtocolName
in interface Protocol
public java.lang.String getAsURLPrefix()
Protocol
getAsURLPrefix
in interface Protocol
public byte toByte()
Protocol
public byte getQOS()
Protocol
public boolean isSatisfactoryQOS(byte QOS)
Protocol
isSatisfactoryQOS
in interface Protocol
public boolean isSecure()
Protocol
public boolean isUnknown()
Protocol
public boolean isEnabled()
Protocol
public Protocol upgrade()
Protocol
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
readExternal
in interface java.io.Externalizable
java.io.IOException
public java.lang.Object readResolve()