|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.limitless.nmc.Client.MuConnectionFactory
public class MuConnectionFactory
This is a factory that allows "connector" factories to be registered and which creates MuConnector's on demand. It acts as a singleton. The URL format for a MuConnection is: mu-type://loginName:password@address:port/muck-short-name For example: muck://male:guest@nameless.muck.limitless.org/nmcguest The muck-short-name is basically optional...it's not used anywhere.
| Nested Class Summary | |
|---|---|
static interface |
MuConnectionFactory.ConnectionFactory
A ConnectionFactory creates a connection channel object on demand. |
static class |
MuConnectionFactory.PropertyLoadFails
This is thrown if a request to load properties can't be done. |
| Field Summary | |
|---|---|
private java.util.Map |
factoryMap
This map has (String,ConnectionFactory) format and is used to hold all the known factories |
private static MuConnectionFactory |
instance
Singleton instance attribute |
(package private) static org.apache.log4j.Logger |
logger
Log4J Logger |
private static java.lang.String |
MuKeyPrefix
|
| Constructor Summary | |
|---|---|
MuConnectionFactory()
|
|
| Method Summary | |
|---|---|
void |
addFactory(java.lang.String key,
MuConnectionFactory.ConnectionFactory factory)
add a new connection factory |
MuConnector |
create(java.lang.String serverType,
MuLoginDescription description)
This creates a new MU connector given the parts seperately constructed, and is used mostly for debugging. |
MuConnector |
create(UriIdentifier id)
This creates a connector given a URL |
private MuConnectionFactory.ConnectionFactory |
findFactory(java.lang.String key)
This locates a factory given a key |
static MuConnectionFactory |
Instance()
Singleton instancing method |
void |
setupFromPropertyFile(java.lang.String propertyFilename)
This reads in a property file of protocol to class mappings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static org.apache.log4j.Logger logger
private static final java.lang.String MuKeyPrefix
private static MuConnectionFactory instance
private java.util.Map factoryMap
| Constructor Detail |
|---|
public MuConnectionFactory()
| Method Detail |
|---|
public void addFactory(java.lang.String key,
MuConnectionFactory.ConnectionFactory factory)
public static MuConnectionFactory Instance()
public MuConnector create(java.lang.String serverType,
MuLoginDescription description)
throws NMCNotFound,
java.net.UnknownHostException
NMCNotFound
java.net.UnknownHostException
public MuConnector create(UriIdentifier id)
throws java.net.MalformedURLException,
NMCNotFound,
java.net.UnknownHostException
java.net.MalformedURLException
NMCNotFound
java.net.UnknownHostException
private MuConnectionFactory.ConnectionFactory findFactory(java.lang.String key)
throws NMCNotFound
NMCNotFound
public void setupFromPropertyFile(java.lang.String propertyFilename)
throws MuConnectionFactory.PropertyLoadFails
The format in the file is: mu.type=class
Such as: mu.muck=MuckConnection.Factory
MuConnectionFactory.PropertyLoadFails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||