public abstract class AbstractVendorPolicy extends Object implements VendorPolicy
Modifier | Constructor and Description |
---|---|
protected |
AbstractVendorPolicy(Provider provider)
This is the class constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
getFlowOwner()
This function returns the flow owner of this vendor policy.
|
Provider |
getProvider()
This function returns the vendor policy provider.
|
void |
initialize(Object flowOwner)
This function initializes the vendor policy.
|
protected abstract void |
initializeImpl()
This function initializes the vendor policy.
|
boolean |
invokePolicyForRequest(Object requestDataHolder)
This function invokes the vendor policy.
The policy may charge a customer for the service, or validate the user has permissions to invoke the action and so on. In case the policy takes over the flow and the fax bridge should not be invoked, this method should return false. |
protected abstract boolean |
invokePolicyForRequestImpl(Object requestDataHolder)
This function invokes the vendor policy.
The policy may charge a customer for the service, or validate the user has permissions to invoke the action and so on. In case the policy takes over the flow and the fax bridge should not be invoked, this method should return false. |
boolean |
invokePolicyForResponse(Object requestDataHolder,
FaxJob faxJob)
This function invokes the vendor policy.
The policy may charge a customer for the service, or validate the user has permissions to invoke the action and so on. In case the policy takes over the flow and the fax bridge should not be invoked, this method should return false. |
protected abstract boolean |
invokePolicyForResponseImpl(Object requestDataHolder,
FaxJob faxJob)
This function invokes the vendor policy.
The policy may charge a customer for the service, or validate the user has permissions to invoke the action and so on. In case the policy takes over the flow and the fax bridge should not be invoked, this method should return false. |
protected AbstractVendorPolicy(Provider provider)
provider
- The providerpublic final Provider getProvider()
getProvider
in interface VendorPolicy
protected Object getFlowOwner()
public final void initialize(Object flowOwner)
initialize
in interface VendorPolicy
flowOwner
- The flow owner (the servlet, CLI main, ....)public boolean invokePolicyForRequest(Object requestDataHolder)
invokePolicyForRequest
in interface VendorPolicy
requestDataHolder
- The request data holderpublic boolean invokePolicyForResponse(Object requestDataHolder, FaxJob faxJob)
invokePolicyForResponse
in interface VendorPolicy
requestDataHolder
- The request data holderfaxJob
- The submitted fax jobprotected abstract void initializeImpl()
protected abstract boolean invokePolicyForRequestImpl(Object requestDataHolder)
requestDataHolder
- The request data holderprotected abstract boolean invokePolicyForResponseImpl(Object requestDataHolder, FaxJob faxJob)
requestDataHolder
- The request data holderfaxJob
- The submitted fax jobCopyright © 2009–2020 fax4j. All rights reserved.