Class ConnectionManagerHelper


  • public final class ConnectionManagerHelper
    extends java.lang.Object
    Helper methods to work in a 'safer' way with the ConnectionManager of 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>
      T
      safeGetFirstConnection​(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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 empty Collection in 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.ConnectionCannotBeObtained
        Returns the first connection between the objects specified, such that the type of the connection is assignable from the given connectionType. Throw ConnectionCannotBeObtained in case no connection is available. Does NOT try to automatically create a connection.
        Parameters:
        connectionManager -
        connectionType -
        objects -
        Returns:
        Throws:
        org.processmining.framework.connections.ConnectionCannotBeObtained