|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface ProtocolInfo.ID
Defines a unique identification of a protocol. There are 2 forms of identification possible. The first is a unique string. The protocol name should include company or organization or suite name in a form of a java package and class naming conventions.
For example protocols.lan.Ethernet describes uniquely Ethernet 2 protocol. com.slytechs.protocols.jnetstream.server uniqueuely identifies the custom protocol utilized by the jNetStream's RemoteServer communication. The string does not signify that there exists such a real package or class. It is simply means of unqiuely assigning, non conflicting names that carry the organization which is responsible for the protocol.
The integer based ID is generated based on the above metioned unique string based id. If the string ID changes the numerical ID will change as well. The integer ID is a complex hash of the string, not the hash function provided by java's implementation of hash on string, but a more refined function that guarrantees uniqueness for each different string and also guarrantees that the id will always be the same for the same string on any platform.
| Method Summary | ||
|---|---|---|
int |
bitIndex()
Returns a special bit index for core protocols. |
|
java.lang.String |
getIdString()
A java style ID as a string that uniquely identifies the protocol |
|
java.lang.String |
getName()
|
|
|
getProtocol()
|
|
java.lang.Class<? extends Header> |
getType()
Returns the type, as an instance of a class type, which is also a unique type for this protocol. |
|
int |
hashValue()
Overrides and implements a more efficient and stringent hash value. |
|
| Method Detail |
|---|
java.lang.String getIdString()
int hashValue()
<T extends Header> ProtocolInfo<T> getProtocol()
java.lang.String getName()
java.lang.Class<? extends Header> getType()
int bitIndex()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||