io.sarl.sre.janus.services.executor
Class SreConsumer<T>
Type Parameters:
T - the type of the result.
All Superinterfaces:
java.util.function.Consumer<T>
class SreConsumer<T>
extends SreExecutable
implements java.util.function.Consumer<T>
A specific SRE consumer that is catching the EarlyExitException.
Parameters:
<T> - the type of the result.
Maven Group Identifier:
io.sarl.sre.janus
Maven Artifact Identifier:
janus.kernel
Since:
0.7
See:
Runnables
Property Summary
Modifier and type Property and description
java.util.function.Consumer<T> wrappedConsumer
Replies the wrapped task.
Inherited: exception, logger
Field Summary
Inherited: exception
Constructor Summary
Constructor and description
new(Logger)
new(Consumer<T>,Logger)
Constructor.
Action Summary
Modifier and type Action and description
final void accept(T)
boolean equals(Object)
java.util.function.Consumer<T> getWrappedConsumer
Replies the wrapped task.
int hashCode
protected void internalAccept(T)
Run the task.
java.lang.String toString
Property Details
wrappedConsumer
val wrappedConsumer : java.util.function.Consumer<T>
Replies the wrapped task.

This property is an alias for the action: getWrappedConsumer

Returns:
the consumer.
Constructor Details
new(Logger)
new(Logger)
Parameters:
logger - the logger to use.
new(Consumer<T>,Logger)
protected new(Consumer<T>,Logger)
Constructor. See Runnables for creating an instance.
Parameters:
consumer - the wrapped task.
logger - the logger to use.
Action Details
accept(T)
def accept(T)
equals(Object)
def equals(Object) : boolean
getWrappedConsumer
def getWrappedConsumer : java.util.function.Consumer<T>
Replies the wrapped task.
Returns:
the consumer.
hashCode
def hashCode : int
internalAccept(T)
protected def internalAccept(T)
Run the task. The default implementation runs the attached Runnable.
Parameters:
t - the element to accept
toString
def toString : java.lang.String