01: package org.objectweb.celtix.transports;
02:
03: import org.objectweb.celtix.BusException;
04:
05: /**
06: * The TransportFactoryManager provides an interface to register and retrieve
07: * transport factories.
08: */
09: public interface TransportFactoryManager {
10:
11: /**
12: * Associates a name, often a URI, with a <code>TransportFactory</code>
13: * when registering with the <code>Bus</code>'s <code>TransportRegistry</code>.
14: * @param name A string containing the name used to identify the
15: * <code>TransportFactory</code>
16: * @param factory The <code>TransportFactory</code> to be registered.
17: * @throws BusException If there is an error registering transport factory.
18: */
19: void registerTransportFactory(String name, TransportFactory factory)
20: throws BusException;
21:
22: /**
23: * Unregister a <code>TransportFactory</code>.
24: * @param name A string containing the name of the
25: * <code>TransportFactory</code>.
26: * @throws BusException If there is an error deregistering
27: * the transport factory.
28: */
29: void deregisterTransportFactory(String name) throws BusException;
30:
31: /**
32: * Returns the <code>TransportFactory</code> registered with the specified name,
33: * loading the appropriate plugin if necessary.
34: *
35: * @param name
36: * @return the registered <code>TransportFactory</code>
37: * @throws BusException
38: */
39: TransportFactory getTransportFactory(String name)
40: throws BusException;
41:
42: /**
43: * Shuts down the TransportFactoryManager and do clean up things.
44: */
45: void shutdown();
46: }
|