1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.ws.extensions.wsrm.spi.protocol;
import javax.xml.datatype.Duration;
/**
* <p><b>CreateSequence</b> element requests creation of a new Sequence between the RM Source that sends it, and the
* RM Destination to which it is sent. The RM Source MUST NOT send this element as a header
* block. The RM Destination MUST respond either with a <b>CreateSequenceResponse</b> response
* message or a <b>CreateSequenceRefused</b> fault.</p>
*
* The following infoset defines its syntax:
* <p><blockquote><pre>
* <wsrm:CreateSequence ...>
* <wsrm:AcksTo> wsa:EndpointReferenceType </wsrm:AcksTo>
* <wsrm:Expires ...> xs:duration </wsrm:Expires> ?
* <wsrm:Offer ...>
* <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
* <wsrm:Endpoint> wsa:EndpointReferenceType </wsrm:Endpoint>
* <wsrm:Expires ...> xs:duration </wsrm:Expires> ?
* <wsrm:IncompleteSequenceBehavior>
* wsrm:IncompleteSequenceBehaviorType
* </wsrm:IncompleteSequenceBehavior> ?
* ...
* </wsrm:Offer> ?
* ...
* </wsrm:CreateSequence>
* </pre></blockquote></p>
*
* @author richard.opalka@jboss.com
*/
public interface RMCreateSequence extends RMSerializable
{
/**
* <p>The RM Source MUST include this element in any CreateSequence message it sends. This
* element is of type wsa:EndpointReferenceType (as specified by WS-Addressing). It specifies
* the endpoint reference to which messages containing SequenceAcknowledgement header
* blocks and faults related to the created Sequence are to be sent, unless otherwise noted in this
* specification.</p>
* <p>Implementations MUST NOT use an endpoint reference in the AcksTo element that would prevent
* the sending of Sequence Acknowledgements back to the RM Source. For example, using the WS-Addressing
* "http://www.w3.org/2005/08/addressing/none" URI would make it impossible for the RM
* Destination to ever send Sequence Acknowledgements.</p>
* @param address
*/
void setAcksTo(String address);
/**
* Getter
* @return address
*/
String getAcksTo();
/**
* This element, if present, of type <b>xs:duration</b> specifies the RM Source's requested duration for
* the Sequence. The RM Destination MAY either accept the requested duration or assign a lesser
* value of its choosing. A value of <b>"PT0S"</b> indicates that the Sequence will never expire. Absence of
* the element indicates an implied value of <b>"PT0S"</b>.
* @param duration
*/
void setExpires(Duration duration);
/**
* Getter
* @return duration
*/
Duration getExpires();
/**
* Factory method
* @return new instance of Offer
*/
RMOffer newOffer();
/**
* Setter
* @param offer
*/
void setOffer(RMOffer offer);
/**
* Getter
* @return offer
*/
RMOffer getOffer();
/**
* This element, if present, enables an RM Source to offer a corresponding Sequence for the reliable
* exchange of messages Transmitted from RM Destination to RM Source.
*/
interface RMOffer
{
/**
* The RM Source MUST set the value of this element to an absolute URI (conformant with
* RFC3986 [URI]) that uniquely identifies the offered Sequence.
* @param identifier
*/
void setIdentifier(String identifier);
/**
* Getter
* @return offered sequence identifier
*/
String getIdentifier();
/**
* <p>An RM Source MUST include this element, of type <b>wsa:EndpointReferenceType</b> (as
* specified by WS-Addressing). This element specifies the endpoint reference to which Sequence
* Lifecycle Messages, Acknowledgement Requests, and fault messages related to the offered
* Sequence are to be sent.</p>
*
* <p>Implementations MUST NOT use an endpoint reference in the Endpoint element that would
* prevent the sending of Sequence Lifecycle Message, etc. For example, using the WS-Addressing
* "http://www.w3.org/2005/08/addressing/none" URI would make it impossible for the RM Destination
* to ever send Sequence Lifecycle Messages (e.g. <b>TerminateSequence</b>) to the RM Source for
* the Offered Sequence.</p>
*
* <p>The Offer of an Endpoint containing the "http://www.w3.org/2005/08/addressing/anonymous" URI
* as its address is problematic due to the inability of a source to connect to this address and retry
* unacknowledged messages. Note that this specification does not
* define any mechanisms for providing this assurance. In the absence of an extension that
* addresses this issue, an RM Destination MUST NOT accept (via the
* <b>/wsrm:CreateSequenceResponse/wsrm:Accept</b>) an Offer that
* contains the "http://www.w3.org/2005/08/addressing/anonymous" URI as its address.</p>
* @param address
*/
void setEndpoint(String address);
/**
* Getter
* @return offered endpoint address
*/
String getEndpoint();
/**
* This element, if present, of type <b>xs:duration</b> specifies the duration for the offered Sequence. A
* value of <b>"PT0S"</b> indicates that the offered Sequence will never expire. Absence of the element
* indicates an implied value of <b>"PT0S"</b>.
* @param duration
*/
void setExpires(String duration);
/**
* Getter
* @return offered sequence duration
*/
String getExpires();
/**
* This element, if present, specifies the behavior that the destination will exhibit upon the closure or
* termination of an incomplete Sequence.
* @param incompleteSequenceBehavior
*/
void setIncompleteSequenceBehavior(RMIncompleteSequenceBehavior incompleteSequenceBehavior);
/**
* Getter
* @return offered incomplete sequence behavior
*/
RMIncompleteSequenceBehavior getIncompleteSequenceBehavior();
}
}
|