public abstract class AbstractRxPEP<T> extends Object implements RxPEP<T>
| Modifier and Type | Field and Description |
|---|---|
protected Class<T> |
pepInterfaceDescription
The documentation API.
|
protected AtomicReference<RxPEPState> |
pepState
The pep state.
|
protected de.fraunhofer.iese.ind2uce.api.component.interfaces.IPolicyEnforcementPoint |
policyEnforcementPoint
The policy enforcement point.
|
| Constructor and Description |
|---|
AbstractRxPEP(de.fraunhofer.iese.ind2uce.api.component.interfaces.IPolicyEnforcementPoint policyEnforcementPoint,
Class<T> pepInterfaceDescription)
Instantiates a new Rx PEP.
|
| Modifier and Type | Method and Description |
|---|---|
T |
createInstanceAPI() |
rx.Observable<Boolean> |
doRegisterAtPMP()
Registers the PEP at PMP.
|
protected abstract Object |
enforceDecision(Method method,
Object[] args) |
de.fraunhofer.iese.ind2uce.api.component.interfaces.IPolicyEnforcementPoint |
getPolicyEnforcementPoint()
It returns a valid instance of
IPolicyEnforcementPoint |
RxPEPState |
isReady()
Returns one of the following RxPEP states:
REGISTRATION_DONE_SUCCESSFULLY: PEP is already registered at PMP.
REGISTRATION_FAILED: PEP failed to register at PMP.
REGISTRATION_NOT_STARTED: Registration has not been started yet and PEP
needs to be initialized for the registration to be started.
REGISTRATION_UNDER_PROCESS: Registration is being processed.
|
protected abstract void |
postSuccessfulRegistration() |
protected de.fraunhofer.iese.ind2uce.api.policy.Event |
readAndCreateEvent(Method method,
Object[] methodArguments)
Gets the action id from the given method and creates a new event with
specific UUID and parameters set.
|
protected de.fraunhofer.iese.ind2uce.api.policy.identifier.ActionId |
readEventDescription(Method method)
Gets the platform, context and action values from the event specification
of the given method and creates the action id and returns it.
|
protected de.fraunhofer.iese.ind2uce.api.policy.parameter.ParameterList |
readParameterList(Class<?>[] parametersType,
Annotation[][] parametersAnnotations,
Object[] methodArguments)
Returns the annotations of type PEPParamKey with their corresponding method
argument.
|
protected final AtomicReference<RxPEPState> pepState
protected final de.fraunhofer.iese.ind2uce.api.component.interfaces.IPolicyEnforcementPoint policyEnforcementPoint
public AbstractRxPEP(de.fraunhofer.iese.ind2uce.api.component.interfaces.IPolicyEnforcementPoint policyEnforcementPoint,
Class<T> pepInterfaceDescription)
pepInterfaceDescription - the documentation APIpolicyEnforcementPoint - the policy enforcement pointpublic T createInstanceAPI()
createInstanceAPI in interface RxPEP<T>public rx.Observable<Boolean> doRegisterAtPMP()
RxPEPdoRegisterAtPMP in interface RxPEP<T>public de.fraunhofer.iese.ind2uce.api.component.interfaces.IPolicyEnforcementPoint getPolicyEnforcementPoint()
RxPEPIPolicyEnforcementPointgetPolicyEnforcementPoint in interface RxPEP<T>IPolicyEnforcementPointpublic RxPEPState isReady()
RxPEPprotected abstract void postSuccessfulRegistration()
protected de.fraunhofer.iese.ind2uce.api.policy.Event readAndCreateEvent(Method method, Object[] methodArguments) throws IncorrectPEPDescriptionError
method - the methodmethodArguments - the method argumentsIncorrectPEPDescriptionError - the incorrect PEP description errorprotected de.fraunhofer.iese.ind2uce.api.policy.identifier.ActionId readEventDescription(Method method)
method - the methodprotected de.fraunhofer.iese.ind2uce.api.policy.parameter.ParameterList readParameterList(Class<?>[] parametersType, Annotation[][] parametersAnnotations, Object[] methodArguments)
parametersType - parameter typeparametersAnnotations - the parameters annotationsmethodArguments - the method argumentsCopyright © 2018. All rights reserved.