public class ProtocolFactory
extends java.lang.Object
Constructor and Description |
---|
ProtocolFactory() |
Modifier and Type | Method and Description |
---|---|
static Protocol |
createProtocol(java.lang.String name,
java.util.Properties props)
Creates a protocol.
|
static void |
register(java.lang.String name,
java.lang.String msgType)
Method to register the name of the message and the message type.
|
static void |
unregister(java.lang.String name)
Method to unregister a message.
|
public static void register(java.lang.String name, java.lang.String msgType) throws ProtocolException
name
- A string containing the name of the messagemsgType
- A string containing the type of the messageProtocolException
- The name is already registeredpublic static void unregister(java.lang.String name) throws ProtocolException
name
- A string containing the name of the message.ProtocolException
- the provided name is not registeredpublic static Protocol createProtocol(java.lang.String name, java.util.Properties props) throws ProtocolException
name
- A string which holds the name of the Protocolprops
- A Properties object which holds the properties of the ProtocolProtocolException
- provided name is not a valid Protocol