public abstract class AFailFast extends Object implements IFailFast
The purpose of this is to ease the burden of concrete implementations.
To extend this in a concrete implementation is optional.
Modifier | Constructor and Description |
---|---|
protected |
AFailFast()
Default constructor.
|
protected |
AFailFast(IChecker checker,
IFailer failer,
ICallContractor callContractor)
Recommended constructor receiving required references (manual constructor dependency injection).
|
Modifier and Type | Method and Description |
---|---|
ICallContractor |
getCallContractor()
Retrieves the call contractor.
|
IChecker |
getChecker()
Retrieves checker.
|
IFailer |
getFailer()
Retrieves failer.
|
void |
setCallContractor(ICallContractor callContractor)
Sets the call contractor, or null to end an existing contract.
|
void |
setChecker(IChecker checker)
Sets the checker.
|
void |
setFailer(IFailer failer)
Sets the failer.
|
protected AFailFast()
After using this constructor remember to set Checker, Failer and CallContractor before use.
protected AFailFast(IChecker checker, IFailer failer, ICallContractor callContractor)
This is ready for use after this call.
checker
- checker to usefailer
- failer to usecallContractor
- call contractor to usepublic IChecker getChecker()
ICheckerReference
Call methods of this to check arguments.
getChecker
in interface ICheckerReference
public void setChecker(IChecker checker)
ICheckerReference
Call methods of this to check arguments.
setChecker
in interface ICheckerReference
checker
- checker to use.public IFailer getFailer()
IFailerReference
getFailer
in interface IFailerReference
public void setFailer(IFailer failer)
IFailerReference
setFailer
in interface IFailerReference
failer
- failer to use.public ICallContractor getCallContractor()
ICallContractorReference
getCallContractor
in interface ICallContractorReference
public void setCallContractor(ICallContractor callContractor)
ICallContractorReference
setCallContractor
in interface ICallContractorReference
callContractor
- contractor to use, or null, if no contract.The MIT License (MIT) - Copyright © 2014-2015 Keld Oelykke. All Rights Reserved.