Package org.processmining.plugins.utils
Class ConnectionManagerHelper
- java.lang.Object
-
- org.processmining.plugins.utils.ConnectionManagerHelper
-
public final class ConnectionManagerHelper extends java.lang.ObjectHelper methods to work in a 'safer' way with theConnectionManagerof ProM.- Author:
- F. Mannhardt
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends org.processmining.framework.connections.Connection>
java.util.Collection<T>safeGetConnections(org.processmining.framework.connections.ConnectionManager connectionManager, java.lang.Class<T> connectionType, java.lang.Object... objects)Returns a collection of connections between the objects specified, such that the type of the connection is assignable from the given connectionType.static <T extends org.processmining.framework.connections.Connection>
TsafeGetFirstConnection(org.processmining.framework.connections.ConnectionManager connectionManager, java.lang.Class<T> connectionType, java.lang.Object... objects)Returns the first connection between the objects specified, such that the type of the connection is assignable from the given connectionType.
-
-
-
Method Detail
-
safeGetConnections
public static <T extends org.processmining.framework.connections.Connection> java.util.Collection<T> safeGetConnections(org.processmining.framework.connections.ConnectionManager connectionManager, java.lang.Class<T> connectionType, java.lang.Object... objects)Returns a collection of connections between the objects specified, such that the type of the connection is assignable from the given connectionType. Returns an emptyCollectionin case no connection is available. Does NOT try to automatically create a connection.- Parameters:
connectionManager-connectionType-objects-- Returns:
-
safeGetFirstConnection
public static <T extends org.processmining.framework.connections.Connection> T safeGetFirstConnection(org.processmining.framework.connections.ConnectionManager connectionManager, java.lang.Class<T> connectionType, java.lang.Object... objects) throws org.processmining.framework.connections.ConnectionCannotBeObtainedReturns the first connection between the objects specified, such that the type of the connection is assignable from the given connectionType. ThrowConnectionCannotBeObtainedin case no connection is available. Does NOT try to automatically create a connection.- Parameters:
connectionManager-connectionType-objects-- Returns:
- Throws:
org.processmining.framework.connections.ConnectionCannotBeObtained
-
-