Factory class that allows you to register and unregister handler classes for various connection URI prefixes. Handler class is expected to create a transport when asked. Built-in transports such as "tcp" cannot be unregistered.
More...
Factory class that allows you to register and unregister handler classes for various connection URI prefixes. Handler class is expected to create a transport when asked. Built-in transports such as "tcp" cannot be unregistered.
◆ createTransport()
Creates a Transport using the parameters provided.
- Parameters
-
name | A string which contains the name of the future Transport |
messageType | A parameter of type Protocol which contains the classification of the message. |
props | A parameter of type Properties which contains the information about the message to be created. |
- Returns
- The newly-created Transport.
- Exceptions
-
TransportTypeException | Thrown when the requested transport type cannot be constructed. |
◆ register()
static void AMPS.Client.TransportFactory.register |
( |
string |
name, |
|
|
string |
className, |
|
|
Assembly |
assembly = null |
|
) |
| |
|
inlinestatic |
Registers a new Transport with the specified name, class name, and assembly.
- Parameters
-
name | The URI prefix to register for this transport. |
className | The name of the Java class to instantiate. |
assembly | The assembly containing the transport type (defaults to the executing assembly). |
- Exceptions
-
TransportTypeException | Thrown when this transport type is already registered. |
◆ unregister()
static void AMPS.Client.TransportFactory.unregister |
( |
string |
name | ) |
|
|
inlinestatic |
Unregisters a Transport from the AMPS client. Note: built-in transport types (e.g. 'tcp') cannot be unregistered.
- Parameters
-
name | The URI prefix to unregister. |
- Exceptions
-
TransportTypeException | Thrown when this transport type has not been registered. |
The documentation for this class was generated from the following file:
- AMPS.Client/TransportFactory.cs