|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.objectxp.mms.MMSServiceFactory
Factory for constructing MMS Service objects.
Use this class to create MMSService objects. The factory depends on
user-provided configuration properties for its operation. The factory offers
two methods for acquiring an MMSService implementation:
getService(String name) for acquiring a MMSService object by name.
getDefaultService() which returns the default service.
MMSServiceFactory factory = MMSServiceFactory.createFactory(this.getClass().getResourceAsStream("mms.configuration");
MMSService service = factory.getDefaultService();
| Method Summary | |
static MMSServiceFactory |
createFactory(java.io.File configuration)
Construct a new MMSServiceFactory. |
static MMSServiceFactory |
createFactory(java.io.InputStream in)
Construct a new MMSServiceFactory. |
static MMSServiceFactory |
createFactory(java.util.Properties configuration)
Construct a new MMSServiceFactory. |
MMSService |
getDefaultService()
Construct (if necessary) and return the default MMSService.
|
MMSService |
getService(java.lang.String name)
Construct (if necessary) and return a named MMS Service. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static MMSServiceFactory createFactory(java.io.InputStream in)
throws java.io.IOException
InputStream must provide
the factory configuration using key=value pairs. The stream will be
closed after reading the configuration.
in - the configuration input stream.
java.io.IOException - if an I/O error occurs while reading from the InputStream.public static MMSServiceFactory createFactory(java.util.Properties configuration)
Properties supplied will be used
when constructing MMSService objects.
configuration - the MMS configuration.
public static MMSServiceFactory createFactory(java.io.File configuration)
throws java.io.IOException
File passed as argument must contain
key=value pairs holding the configuration.
configuration - the configuration file.
java.io.IOException
public MMSService getDefaultService()
throws ConfigurationException
MMSService.
The default MMSService configuration can be specified by using the
configuration property mms.default.service. If set, the
factory will use the prefix "mms.name. when looking
for the service configuration. If no default service is specified, the
factory will use the prefix "mms".
The factory configuration must contain at least the following properties:
prefix.transport.class |
Name of the class implementing the Transport
interface. Look at the Transport interface to see the available
implementations |
|
prefix.protocol.name |
Name of the Protocol to use. Available Protocols are:
|
See MM1Service for a list of configuration properties supported by
the MM1 implementation.
See MM7Service for a list of configuration properties supported by
the MM7 implementation.
ConfigurationException - if the service cannot be obtained due to
a wrong or incomplete configuration.
public MMSService getService(java.lang.String name)
throws ConfigurationException
The factory configuration must contain at least the following properties:
mms.name.transport.class | Name of the class implementing the Transport
interface. Look at the Transport interface to see the available
implementations |
|
prefix.protocol.name |
Name of the Protocol to use. Available Protocols are:
|
See MM1Service for a list of configuration properties supported by
the MM1 implementation.
See MM7Service for a list of configuration properties supported by
the MM7 implementation.
name - a Properties object holding the configuration required
to construct and configure the Service and its associated protocol
and transport objects. If this parameter is null, the default
service will be returned.
ConfigurationException - if the service cannot be obtained due to
a wrong or incomplete configuration.getDefaultService()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||