Package org.pipservices3.commons.run
Class Opener
java.lang.Object
org.pipservices3.commons.run.Opener
Helper class that opens components.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if all components are opened.static boolean
Checks if specified component is opened.static void
Opens multiple components.static void
Opens specific component.
-
Constructor Details
-
Opener
public Opener()
-
-
Method Details
-
isOpenOne
Checks if specified component is opened.To be checked components must implement IOpenable interface. If they don't the call to this method returns true.
- Parameters:
component
- the component that is to be checked.- Returns:
- true if component is opened and false otherwise.
- See Also:
-
isOpen
Checks if all components are opened.To be checked components must implement IOpenable interface. If they don't the call to this method returns true.
- Parameters:
components
- a list of components that are to be checked.- Returns:
- true if all components are opened and false if at least one component is closed.
- See Also:
-
openOne
Opens specific component.To be opened components must implement IOpenable interface. If they don't the call to this method has no effect.
- Parameters:
correlationId
- (optional) transaction id to trace execution through call chain.component
- the component that is to be opened.- Throws:
ApplicationException
- when error or null no errors occured.- See Also:
-
open
public static void open(String correlationId, Iterable<Object> components) throws ApplicationException Opens multiple components.To be opened components must implement IOpenable interface. If they don't the call to this method has no effect.
- Parameters:
correlationId
- (optional) transaction id to trace execution through call chain.components
- the list of components that are to be closed.- Throws:
ApplicationException
- when error or null no errors occured.- See Also:
-