- java.lang.Object
-
- swim.api.policy.AbstractPolicy
-
- All Implemented Interfaces:
AgentPolicy,AgentRoutePolicy,DownlinkPolicy,HttpPolicy,LanePolicy,PlanePolicy,Policy,UplinkPolicy
public class AbstractPolicy extends Object implements Policy, PlanePolicy, AgentRoutePolicy, AgentPolicy, LanePolicy, UplinkPolicy, DownlinkPolicy
-
-
Constructor Summary
Constructors Constructor Description AbstractPolicy()
-
Method Summary
-
-
-
Method Detail
-
agentRoutePolicy
public AgentRoutePolicy agentRoutePolicy(AgentRoute<?> agentRoute)
- Specified by:
agentRoutePolicyin interfacePlanePolicy
-
agentPolicy
public AgentPolicy agentPolicy(Agent agent)
- Specified by:
agentPolicyin interfaceAgentRoutePolicy
-
lanePolicy
public LanePolicy lanePolicy(Lane lane)
- Specified by:
lanePolicyin interfaceAgentPolicy
-
uplinkPolicy
public UplinkPolicy uplinkPolicy(Uplink uplink)
- Specified by:
uplinkPolicyin interfaceLanePolicy
-
downlinkPolicy
public DownlinkPolicy downlinkPolicy(Downlink downlink)
- Specified by:
downlinkPolicyin interfaceAgentPolicy- Specified by:
downlinkPolicyin interfaceAgentRoutePolicy- Specified by:
downlinkPolicyin interfacePlanePolicy
-
canConnect
public PolicyDirective<Object> canConnect(Uri requestUri)
- Specified by:
canConnectin interfacePlanePolicy
-
canLink
public PolicyDirective<LinkRequest> canLink(LinkRequest request, Identity identity)
-
canSync
public PolicyDirective<SyncRequest> canSync(SyncRequest request, Identity identity)
-
canUplink
public PolicyDirective<EventMessage> canUplink(EventMessage message, Identity identity)
-
canDownlink
public PolicyDirective<CommandMessage> canDownlink(CommandMessage message, Identity identity)
- Specified by:
canDownlinkin interfacePolicy
-
canRequest
public PolicyDirective<HttpMessage<?>> canRequest(HttpRequest<?> request)
- Specified by:
canRequestin interfaceHttpPolicy- Specified by:
canRequestin interfacePolicy
-
canRespond
public PolicyDirective<HttpResponse<?>> canRespond(HttpRequest<?> request, HttpResponse<?> response)
- Specified by:
canRespondin interfaceHttpPolicy- Specified by:
canRespondin interfacePolicy
-
authorize
protected <T> PolicyDirective<T> authorize(Envelope envelope, Identity identity)
-
allow
public <T> PolicyDirective<T> allow(T value)
-
allow
public <T> PolicyDirective<T> allow()
-
deny
public <T> PolicyDirective<T> deny(Object reason)
-
deny
public <T> PolicyDirective<T> deny()
-
forbid
public <T> PolicyDirective<T> forbid(Object reason)
-
forbid
public <T> PolicyDirective<T> forbid()
-
-