Construct a new CloseAction consisting of other then this.
Construct a new CloseAction consisting of other then this.
an action to prepend to this action
an action consisting of first executing other then this
Construct a new CloseAction consisting of this then other.
Construct a new CloseAction consisting of this then other.
an action to append to this action
an action consisting of first executing this then other
Execute the action and return any Exceptions that may have been raised during the execution of this method.
Execute the action and return any Exceptions that may have been raised during the execution of this method.
the resource being closed
the errors that occurred while executing the message.
A strategy object representing an action to take upon closing a scalax.io.Resource. CloseActions can be composed using the +: and :+ method and can be added to a scalax.io.Resource when it is created or added to an existing scalax.io.Resource object.
If an exception is raised by the CloseAction it will be cause by the apply method and will be returned to the Resource calling the exception. Normally the exception will be added to the collection of Throwables in the Resource so errors triggered by the CloseActions will be obtainable from the Resource.
Also related to exceptions is the fact that all CloseActions will be executed when they are combined. For example if CloseAction A and B are combined and A fails with an exception B will still be executed.
The easiest method for creating a close action is to simply call the scalax.io.CloseAction.apply factory method. It takes a function and contructs a CloseAction from it.
The type of object this action