public final class PolicyUtils extends Object
Modifier and Type | Field and Description |
---|---|
static QName |
HTTPCLIENTPOLICY_ASSERTION_QNAME |
static String |
HTTPCONF_NAMESPACE |
static QName |
HTTPSERVERPOLICY_ASSERTION_QNAME |
Modifier and Type | Method and Description |
---|---|
static void |
assertClientPolicy(Message message,
HTTPClientPolicy client)
Asserts all HTTPClientPolicy assertions that are compatible with the specified
client policy.
|
static void |
assertServerPolicy(Message message,
HTTPServerPolicy server)
Asserts all HTTPServerPolicy assertions that are equal to the specified
server policy.
|
static boolean |
compatible(HTTPClientPolicy p1,
HTTPClientPolicy p2)
Checks if two HTTPClientPolicy objects are compatible.
|
static boolean |
compatible(HTTPServerPolicy p1,
HTTPServerPolicy p2)
Checks if two HTTPServerPolicy objects are compatible.
|
static boolean |
equals(HTTPClientPolicy p1,
HTTPClientPolicy p2)
Determines if two HTTPClientPolicy objects are equal.
|
static boolean |
equals(HTTPServerPolicy p1,
HTTPServerPolicy p2)
Determines if two HTTPServerPolicy objects are equal.
|
static HTTPClientPolicy |
getClient(Message message,
HTTPClientPolicy confPolicy)
Returns a HTTPClientPolicy that is compatible with the assertions included in the
service, endpoint, operation and message policy subjects AND the HTTPClientPolicy
passed as a second argument.
|
static HTTPClientPolicy |
getClient(PolicyEngine pe,
EndpointInfo ei,
Conduit c)
Returns a HTTPClientPolicy that is compatible with the assertions included in the
service and endpoint policy subjects, or null if there are no such assertions.
|
static HTTPServerPolicy |
getServer(Message message,
HTTPServerPolicy confPolicy)
Returns a HTTPServerPolicy that is compatible with the assertions included in the
service, endpoint, operation and message policy subjects AND the HTTPServerPolicy
passed as a second argument.
|
static HTTPServerPolicy |
getServer(PolicyEngine pe,
EndpointInfo ei,
Destination d)
Returns a HTTPServerPolicy that is compatible with the assertions included in the
service and endpoint policy subjects, or null if there are no such assertions.
|
static HTTPClientPolicy |
intersect(HTTPClientPolicy p1,
HTTPClientPolicy p2)
Returns a new HTTPClientPolicy that is compatible with the two specified policies or
null if no compatible policy can be determined.
|
static HTTPServerPolicy |
intersect(HTTPServerPolicy p1,
HTTPServerPolicy p2)
Returns a new HTTPServerPolicy that is compatible with the two specified policies or
null if no compatible policy can be determined.
|
static String |
toString(HTTPClientPolicy p) |
static String |
toString(HTTPServerPolicy p) |
public static final String HTTPCONF_NAMESPACE
public static final QName HTTPCLIENTPOLICY_ASSERTION_QNAME
public static final QName HTTPSERVERPOLICY_ASSERTION_QNAME
public static HTTPClientPolicy getClient(Message message, HTTPClientPolicy confPolicy)
message
- the messageconfPolicy
- the additional policy to be compatible withPolicyException
- if no compatible HTTPClientPolicy can be determinedpublic static HTTPServerPolicy getServer(Message message, HTTPServerPolicy confPolicy)
message
- the messageconfPolicy
- the additional policy to be compatible withPolicyException
- if no compatible HTTPServerPolicy can be determinedpublic static HTTPClientPolicy getClient(PolicyEngine pe, EndpointInfo ei, Conduit c)
pe
- the policy engineei
- the endpoint infoc
- the conduitPolicyException
- if no compatible HTTPClientPolicy can be determinedpublic static HTTPServerPolicy getServer(PolicyEngine pe, EndpointInfo ei, Destination d)
pe
- the policy engineei
- the endpoint infod
- the destinationPolicyException
- if no compatible HTTPServerPolicy can be determinedpublic static void assertClientPolicy(Message message, HTTPClientPolicy client)
message
- the current messageclient
- the client policypublic static void assertServerPolicy(Message message, HTTPServerPolicy server)
message
- the current messageserver
- the server policypublic static boolean compatible(HTTPClientPolicy p1, HTTPClientPolicy p2)
p1
- one client policyp2
- another client policypublic static HTTPClientPolicy intersect(HTTPClientPolicy p1, HTTPClientPolicy p2)
p1
- one policyp2
- another policypublic static boolean equals(HTTPClientPolicy p1, HTTPClientPolicy p2)
p1
- one client policyp2
- another client policypublic static boolean compatible(HTTPServerPolicy p1, HTTPServerPolicy p2)
p1
- one server policyp2
- another server policypublic static HTTPServerPolicy intersect(HTTPServerPolicy p1, HTTPServerPolicy p2)
p1
- one policyp2
- another policypublic static boolean equals(HTTPServerPolicy p1, HTTPServerPolicy p2)
p1
- one server policyp2
- another server policypublic static String toString(HTTPClientPolicy p)
public static String toString(HTTPServerPolicy p)
Apache CXF