public abstract class AbstractConstantRestrictor extends Object implements Restrictor
Modifier | Constructor and Description |
---|---|
protected |
AbstractConstantRestrictor(boolean pAllowed)
Create restrictor which always returns the given value on every check
method.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAttributeReadAllowed(ObjectName pName,
String pAttribute)
Check whether reading of an attribute is allowed
|
boolean |
isAttributeWriteAllowed(ObjectName pName,
String pAttribute)
Check whether writing of an attribute is allowed
|
boolean |
isHttpMethodAllowed(HttpMethod pMethod)
Check whether the HTTP method with which the request
was sent is allowed.
|
boolean |
isOperationAllowed(ObjectName pName,
String pOperation)
Check whether execution of an operation is allowed
|
boolean |
isOriginAllowed(String pOrigin,
boolean pIsStrictCheck)
Check whether cross browser access via CORS is allowed.
|
boolean |
isRemoteAccessAllowed(String... pHostOrAddress)
Check whether access from the connected client is allowed.
|
boolean |
isTypeAllowed(RequestType pType)
Check whether the provided command type is allowed in principal
|
protected AbstractConstantRestrictor(boolean pAllowed)
pAllowed
- whether access is allowed or deniedpublic boolean isHttpMethodAllowed(HttpMethod pMethod)
isHttpMethodAllowed
in interface Restrictor
pMethod
- method to checkpublic boolean isTypeAllowed(RequestType pType)
isTypeAllowed
in interface Restrictor
pType
- type to checkpublic boolean isAttributeReadAllowed(ObjectName pName, String pAttribute)
isAttributeReadAllowed
in interface Restrictor
pName
- MBean namepAttribute
- attribute to checkpublic boolean isAttributeWriteAllowed(ObjectName pName, String pAttribute)
isAttributeWriteAllowed
in interface Restrictor
pName
- MBean namepAttribute
- attribute to checkpublic boolean isOperationAllowed(ObjectName pName, String pOperation)
isOperationAllowed
in interface Restrictor
pName
- MBean namepOperation
- attribute to checkpublic boolean isRemoteAccessAllowed(String... pHostOrAddress)
isRemoteAccessAllowed
in interface Restrictor
pHostOrAddress
- one or more host or address names.public boolean isOriginAllowed(String pOrigin, boolean pIsStrictCheck)
isOriginAllowed
in interface Restrictor
pOrigin
- the "Origin:" header provided within the requestpIsStrictCheck
- whether doing a strict checkCopyright © 2017. All rights reserved.