Package org.refcodes.component
Interface Digester<J>
-
- Type Parameters:
J
- the generic type
- All Known Subinterfaces:
DigesterComponent<J>
public interface Digester<J>
ADigester
provides the functionality to consume a job (which is pushed from the outside) for further processing. Job instances may reflect (parts of) a protocol or signals from another system. TheDigester
is similar to an observer (listener) with the semantic difference of usually being bound to exactly one job providing system (whereas an observer may be one of many observers observing the same observable).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
digest(J aJob)
Thedigest(Object)
method is invoked in order to trigger processing of the provided job, e.g. start execution depending on the job instance being provided from the outside.default void
digestUnchecked(J aJob)
Digests the job by callingdigest(Object)
without you to require catching aDigestException
.
-
-
-
Method Detail
-
digest
void digest(J aJob) throws DigestException
Thedigest(Object)
method is invoked in order to trigger processing of the provided job, e.g. start execution depending on the job instance being provided from the outside.- Parameters:
aJob
- The job to be digested.- Throws:
DigestException
- thrown in case digesting (processing) a job by adigest(Object)
caused problems;he cause is usually wrapped by thisException
.
-
digestUnchecked
default void digestUnchecked(J aJob)
Digests the job by callingdigest(Object)
without you to require catching aDigestException
.- Parameters:
aJob
- The job to be digested.- Throws:
org.refcodes.exception.HiddenException
- encapsulates the cause and is thrown upon encountering aDigestException
exception
-
-