org.mc4j.ems.connection
Class ConnectionFactory
java.lang.Object
org.mc4j.ems.connection.ConnectionFactory
public class ConnectionFactory
- extends java.lang.Object
- Version:
- $Revision: 602 $($Author: ianpspringer $ / $Date: 2009-07-14 16:25:40 -0400 (Tue, 14 Jul 2009) $)
- Author:
- Greg Hinkle (ghinkle@users.sourceforge.net), Apr 5, 2005
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPY_JARS_TO_TEMP
public static final java.lang.String COPY_JARS_TO_TEMP
- See Also:
- Constant Field Values
JAR_TEMP_DIR
public static final java.lang.String JAR_TEMP_DIR
- See Also:
- Constant Field Values
USE_CONTEXT_CLASSLOADER
public static final java.lang.String USE_CONTEXT_CLASSLOADER
- See Also:
- Constant Field Values
CONNECTION_DESCRIPTORS
public static final ConnectionTypeDescriptor[] CONNECTION_DESCRIPTORS
ConnectionFactory
public ConnectionFactory()
getConnectionTypes
public static java.util.List<ConnectionTypeDescriptor> getConnectionTypes()
getConnectionProvider
public ConnectionProvider getConnectionProvider(ConnectionSettings connectionSettings)
- Build a connection provider given the settings. This should be the prefrence over connect.
Each request to connect will reuse the same classloader and provider rather than rebuilding
from scratch.
- Parameters:
connectionSettings - the connection settings for the connection
- Returns:
- a ConnectionProvider that you can get live connection from.
connect
public EmsConnection connect(ConnectionSettings connectionSettings)
- Deprecated. Use getConnectionProvider.connect... hold on to the connection provider to reopen the connection
- Parameters:
connectionSettings - the settings to build the connection on
- Returns:
- a live connection
discoverServerClasses
public void discoverServerClasses(ConnectionSettings connectionSettings)
- This will find server classes for a ConnectionSettings by using the supplied
LibraryURI of the ConnectionSettings and searching for the ConnectClassPathEntries
of the ConnectionType supplied with the settings.
This method should only be called once. If the entries need to be reset, you should
first clear the settings' classpath entries. This method appends class path entries
to the existing list.
- Parameters:
connectionSettings - the ConnectionSettings to update with recommeneded class
path entries
getChild
public java.io.File getChild(java.io.File directory,
java.lang.String childName)