com.crankuptheamps.client
Class TransportFactory
java.lang.Object
com.crankuptheamps.client.TransportFactory
public class TransportFactory
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransportFactory
public TransportFactory()
register
public static void register(String name,
String className)
throws TransportTypeException
- Registers a new
Transport
and URI prefix with the AMPS Client.
- Parameters:
name
- The URI prefix to register for this transport.className
- The name of the Java class to instantiate.
- Throws:
TransportTypeException
- Thrown when this transport type is already registered.
unregister
public static void unregister(String name)
throws TransportTypeException
- 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.
- Throws:
TransportTypeException
- Thrown when this transport type has not been registered.
reset
public static void reset()
- Resets self to the default state, unregistering any
Transport
s registered at runtime.
createTransport
public static Transport createTransport(String name,
Protocol messageType,
Properties props)
throws TransportTypeException
- Throws:
TransportTypeException