Methods Summary |
---|
public long | getAckRequestInterval()Accessor for ackRequestIterval field
return ackRequestInterval;
|
public java.lang.String | getAcksTo()Accessor for the acksTo property.
return acksTo;
|
public int | getBufferSize()Accessor for bufferSize property.
return bufferSize;
|
public long | getCloseTimeout()Accessor for the closeTimeout property.
return closeTimeout;
|
public RMConstants | getConstants()
return constants;
|
public boolean | getFlowControl()Accessor for flow control field
return flowControl;
|
public long | getInactivityTimeout()Accessor for inactivityTimeout property.
return inactivityTimeout;
|
public boolean | getOrdered()Accessor for ordered property.
return ordered;
|
public RMConstants | getRMConstants()Returns the RMConstants based on the AddressingVersion
return constants;
|
public long | getResendInterval()Accessor for resendIterval field
return resendInterval;
|
public com.sun.xml.ws.api.SOAPVersion | getSoapVersion()Returns the SOAPVersion obtained from the WSBinding
Defaulting to SOAP_12
if (soapVersion != null)
return soapVersion;
//TODO check if this defaulting is ok
else return SOAPVersion.SOAP_12;
|
private void | handleFlowAssertion(PolicyAssertion flowAssertion)
flowControl = true;
Iterator<PolicyAssertion> it = flowAssertion.getNestedAssertionsIterator();
while (it != null && it.hasNext()) {
PolicyAssertion assertion = it.next();
if (assertion.getName().equals(constants.getMaxReceiveBufferSizeQName())) {
bufferSize = Integer.parseInt(assertion.getValue());
break;
}
}
|
private void | handleRMAssertion(PolicyAssertion rmAssertion)
Iterator<PolicyAssertion> it = rmAssertion.getNestedAssertionsIterator();
while (it != null && it.hasNext()) {
PolicyAssertion assertion = it.next();
if (assertion.getName().equals(constants.getInactivityTimeoutQName())) {
String num = assertion.getAttributeValue(new QName("", "Milliseconds"));
if (num != null) {
inactivityTimeout = Long.parseLong(num);
}
} else if (assertion.getName().equals(constants.getAcknowledgementIntervalQName())) {
//don't have a member variable for it. Do we need it?
}
}
|
public void | init(com.sun.xml.ws.api.model.wsdl.WSDLPort port, PolicyMap policyMap)
try {
if (policyMap != null) {
PolicyMapKey endpointScopeKey =
policyMap.
createWsdlEndpointScopeKey(port.getOwner().getName(),
port.getName());
if (endpointScopeKey != null) {
AssertionSet policyAssertionSet = null;
Policy policy = policyMap.getEndpointEffectivePolicy(endpointScopeKey);
if (policy != null) {
for (AssertionSet set: policy) {
policyAssertionSet = set;
break;
}
}
if (policyAssertionSet != null) {
PolicyAssertion rmAssertion = null;
PolicyAssertion flowAssertion = null;
for (PolicyAssertion assertion : policyAssertionSet) {
QName qname = assertion.getName();
if (qname.equals(constants.getRMAssertionQName())) {
rmAssertion = assertion;
} else if (qname.equals(constants.getRMFlowControlQName())) {
flowAssertion = assertion;
} else if (qname.equals(constants.getOrderedQName())) {
ordered = true;
} else if (qname.equals (constants.getAllowDuplicatesQName())) {
allowDuplicates = true;
} else if (qname.equals(constants.getAckRequestIntervalQName())) {
String num = assertion.getAttributeValue(new QName("", "Milliseconds"));
if (num != null) {
ackRequestInterval = Long.parseLong(num);
}
} else if (qname.equals(constants.getResendIntervalQName())) {
String num = assertion.getAttributeValue(new QName("", "Milliseconds"));
if (num != null) {
resendInterval = Long.parseLong(num);
}
} else if (qname.equals(constants.getCloseTimeoutQName())) {
String num = assertion.getAttributeValue(new QName("", "Milliseconds"));
if (num != null) {
closeTimeout = Long.parseLong(num);
}
} else {
//TODO handle error condition here
}
}
if (rmAssertion != null) {
handleRMAssertion(rmAssertion);
}
if (flowAssertion != null)
handleFlowAssertion(flowAssertion);
}
}
}
} catch (PolicyException e) {
e.printStackTrace();
}
|
public boolean | isAllowDuplicates()
return allowDuplicates;
|
public void | setAckRequestInterval(long interval)Mutator for the ackRequestInterval field
ackRequestInterval = interval;
|
public void | setAcksTo(java.lang.String acksTo)Mutator for the AcksTo property.
this.acksTo = acksTo;
|
public void | setBufferSize(int bufferSize)Mutator for the bufferSize property.
this.bufferSize = bufferSize;
|
public void | setCloseTimeout(long timeout)Mutator for the closeTimeout property.
closeTimeout = timeout;
|
public void | setFlowControl(boolean use)Mutator for the flow control field
flowControl = use;
|
public void | setInactivityTimeout(long inactivityTimeout)Mutator for the inactivityTimeout property.
this.inactivityTimeout = inactivityTimeout;
|
public void | setOrdered(boolean ordered)Mutator for the ordered property.
this.ordered = ordered;
|
public void | setResendInterval(long interval)Mutator for the flow control field
resendInterval = interval;
|
public void | setSoapVersion(com.sun.xml.ws.api.SOAPVersion soapVersion)
this.soapVersion = soapVersion;
|