AMPS C# Client  5.3.5.0
AMPS C# Client for .NET
AMPS.Client.TransportFactory Class Reference

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...

Static Public Member Functions

static void register (string name, string className, Assembly assembly=null)
 Registers a new Transport with the specified name, class name, and assembly. More...
 
static void unregister (string name)
 Unregisters a Transport from the AMPS client. Note: built-in transport types (e.g. 'tcp') cannot be unregistered. More...
 
static Transport createTransport (string name, Protocol messageType, Properties props)
 Creates a Transport using the parameters provided. More...
 

Detailed Description

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.

Member Function Documentation

◆ createTransport()

static Transport AMPS.Client.TransportFactory.createTransport ( string  name,
Protocol  messageType,
Properties  props 
)
inlinestatic

Creates a Transport using the parameters provided.

Parameters
nameA string which contains the name of the future Transport
messageTypeA parameter of type Protocol which contains the classification of the message.
propsA parameter of type Properties which contains the information about the message to be created.
Returns
The newly-created Transport.
Exceptions
TransportTypeExceptionThrown 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
nameThe URI prefix to register for this transport.
classNameThe name of the Java class to instantiate.
assemblyThe assembly containing the transport type (defaults to the executing assembly).
Exceptions
TransportTypeExceptionThrown 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
nameThe URI prefix to unregister.
Exceptions
TransportTypeExceptionThrown when this transport type has not been registered.

The documentation for this class was generated from the following file: