- 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:
agentRoutePolicy
in interfacePlanePolicy
-
agentPolicy
public AgentPolicy agentPolicy(Agent agent)
- Specified by:
agentPolicy
in interfaceAgentRoutePolicy
-
lanePolicy
public LanePolicy lanePolicy(Lane lane)
- Specified by:
lanePolicy
in interfaceAgentPolicy
-
uplinkPolicy
public UplinkPolicy uplinkPolicy(Uplink uplink)
- Specified by:
uplinkPolicy
in interfaceLanePolicy
-
downlinkPolicy
public DownlinkPolicy downlinkPolicy(Downlink downlink)
- Specified by:
downlinkPolicy
in interfaceAgentPolicy
- Specified by:
downlinkPolicy
in interfaceAgentRoutePolicy
- Specified by:
downlinkPolicy
in interfacePlanePolicy
-
canConnect
public PolicyDirective<Object> canConnect(Uri requestUri)
- Specified by:
canConnect
in 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:
canDownlink
in interfacePolicy
-
canRequest
public PolicyDirective<HttpMessage<?>> canRequest(HttpRequest<?> request)
- Specified by:
canRequest
in interfaceHttpPolicy
- Specified by:
canRequest
in interfacePolicy
-
canRespond
public PolicyDirective<HttpResponse<?>> canRespond(HttpRequest<?> request, HttpResponse<?> response)
- Specified by:
canRespond
in interfaceHttpPolicy
- Specified by:
canRespond
in 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()
-
-