Author: richard.opalka(a)jboss.com
Date: 2008-03-10 09:27:04 -0400 (Mon, 10 Mar 2008)
New Revision: 5907
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMConstants.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMMessageFactory.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMProvider.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMAckRequestedImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceResponseImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMMessageFactoryImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMProviderImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceAcknowledgementImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceFaultImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMTerminateSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMAckRequestedImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceResponseImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceResponseImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMMessageFactoryImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMProviderImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceAcknowledgementImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceFaultImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceResponseImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMAckRequested.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequence.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequenceResponse.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequence.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequenceResponse.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMIncompleteSequenceBehavior.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequence.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceAcknowledgement.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFault.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFaultCode.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSerializable.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequence.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequenceResponse.java
Removed:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/
Log:
refactoring WS-RM protocol
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMConstants.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMConstants.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMConstants.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,226 @@
+/*
+ * 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.protocol;
+
+import javax.xml.namespace.QName;
+
+/**
+ * WS-RM protocol elements SPI facade. Each WS-RM provider must implement this
interface.
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMConstants
+{
+
+ /**
+ * getter
+ * @return wsrm <b>prefix</b>
+ */
+ String getPrefix();
+
+ /**
+ * getter
+ * @return wsrm <b>namespace</b>
+ */
+ String getNamespaceURI();
+
+ /**
+ * getter
+ * @return <b>LastMessage</b> QName
+ */
+ QName getLastMessageQName();
+
+ /**
+ * getter
+ * @return <b>CreateSequence</b> QName
+ */
+ QName getCreateSequenceQName();
+
+ /**
+ * getter
+ * @return <b>AcksTo</b> QName
+ */
+ QName getAcksToQName();
+
+ /**
+ * getter
+ * @return <b>Expires</b> QName
+ */
+ QName getExpiresQName();
+
+ /**
+ * getter
+ * @return <b>Offer</b> QName
+ */
+ QName getOfferQName();
+
+ /**
+ * getter
+ * @return <b>Identifier</b> QName
+ */
+ QName getIdentifierQName();
+
+ /**
+ * getter
+ * @return <b>Endpoint</b> QName
+ */
+ QName getEndpointQName();
+
+ /**
+ * getter
+ * @return <b>IncompleteSequenceBehavior</b> QName
+ */
+ QName getIncompleteSequenceBehaviorQName();
+
+ /**
+ * getter
+ * @return <b>CreateSequenceResponse</b> QName
+ */
+ QName getCreateSequenceResponseQName();
+
+ /**
+ * getter
+ * @return <b>Accept</b> QName
+ */
+ QName getAcceptQName();
+
+ /**
+ * getter
+ * @return <b>CloseSequence</b> QName
+ */
+ QName getCloseSequenceQName();
+
+ /**
+ * getter
+ * @return <b>LastMessageNumber</b> QName
+ */
+ QName getLastMessageNumberQName();
+
+ /**
+ * getter
+ * @return <b>CloseSequenceResponse</b> QName
+ */
+ QName getCloseSequenceResponseQName();
+
+ /**
+ * getter
+ * @return <b>TerminateSequence</b> QName
+ */
+ QName getTerminateSequenceQName();
+
+ /**
+ * getter
+ * @return <b>LastMsgNumber</b> QName
+ */
+ QName getLastMsgNumberQName();
+
+ /**
+ * getter
+ * @return <b>TerminateSequenceResponse</b> QName
+ */
+ QName getTerminateSequenceResponseQName();
+
+ /**
+ * getter
+ * @return <b>Sequence</b> QName
+ */
+ QName getSequenceQName();
+
+ /**
+ * getter
+ * @return <b>MessageNumber</b> QName
+ */
+ QName getMessageNumberQName();
+
+ /**
+ * getter
+ * @return <b>MaxMessageNumber</b> QName
+ */
+ QName getMaxMessageNumberQName();
+
+ /**
+ * getter
+ * @return <b>AckRequested</b> QName
+ */
+ QName getAckRequestedQName();
+
+ /**
+ * getter
+ * @return <b>SequenceAcknowledgement</b> QName
+ */
+ QName getSequenceAcknowledgementQName();
+
+ /**
+ * getter
+ * @return <b>AcknowledgementRange</b> QName
+ */
+ QName getAcknowledgementRangeQName();
+
+ /**
+ * getter
+ * @return <b>Upper</b> QName
+ */
+ QName getUpperQName();
+
+ /**
+ * getter
+ * @return <b>Lower</b> QName
+ */
+ QName getLowerQName();
+
+ /**
+ * getter
+ * @return <b>None</b> QName
+ */
+ QName getNoneQName();
+
+ /**
+ * getter
+ * @return <b>Final</b> QName
+ */
+ QName getFinalQName();
+
+ /**
+ * getter
+ * @return <b>Nack</b> QName
+ */
+ QName getNackQName();
+
+ /**
+ * getter
+ * @return <b>SequenceFault</b> QName
+ */
+ QName getSequenceFaultQName();
+
+ /**
+ * getter
+ * @return <b>FaultCode</b> QName
+ */
+ QName getFaultCodeQName();
+
+ /**
+ * getter
+ * @return <b>Detail</b> QName
+ */
+ QName getDetailQName();
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMConstants.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMMessageFactory.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMMessageFactory.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMMessageFactory.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,101 @@
+/*
+ * 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.protocol;
+
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMAckRequested;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequenceResponse;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceFault;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequenceResponse;
+
+/**
+ * WS-RM protocol elements SPI facade. Each WS-RM provider must implement this
interface.
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMMessageFactory
+{
+ /**
+ * Factory method
+ * @return new CreateSequence instance
+ */
+ RMCreateSequence newCreateSequence();
+
+ /**
+ * Factory method
+ * @return new CreateSequenceResponse instance
+ */
+ RMCreateSequenceResponse newCreateSequenceResponse();
+
+ /**
+ * Factory method
+ * @return new CloseSequence instance or null if this message is not supported by
underlying WS-RM provider
+ */
+ RMCloseSequence newCloseSequence();
+
+ /**
+ * Factory method
+ * @return new CloseSequenceResponse instance or null if this message is not supported
by underlying WS-RM provider
+ */
+ RMCloseSequenceResponse newCloseSequenceResponse();
+
+ /**
+ * Factory method
+ * @return new TerminateSequence instance
+ */
+ RMTerminateSequence newTerminateSequence();
+
+ /**
+ * Factory method
+ * @return new TerminateSequenceResponse instance or null if this message is not
supported by underlying WS-RM provider
+ */
+ RMTerminateSequenceResponse newTerminateSequenceResponse();
+
+ /**
+ * Factory method
+ * @return new Sequence instance
+ */
+ RMSequence newSequence();
+
+ /**
+ * Factory method
+ * @return new AckRequested instance
+ */
+ RMAckRequested newAckRequested();
+
+ /**
+ * Factory method
+ * @return new SequenceAcknowledgement instance
+ */
+ RMSequenceAcknowledgement newSequenceAcknowledgement();
+
+ /**
+ * Factory method
+ * @return new SequenceFault instance
+ */
+ RMSequenceFault newSequenceFault();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMMessageFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMProvider.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMProvider.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMProvider.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,69 @@
+/*
+ * 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.protocol;
+
+import org.jboss.wsf.spi.util.ServiceLoader;
+
+/**
+ * WS-RM Provider SPI facade. Each WS-RM provider must override this class.
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public abstract class RMProvider
+{
+
+ private static final RMProvider rmProviderImpl = (RMProvider)
ServiceLoader.loadService(
+ RMProvider.class.getName(),
+
org.jboss.ws.extensions.wsrm.protocol.spec200702.RMProviderImpl.class.getName());
+
+ /**
+ * Must be overriden in subclasses
+ * @param targetNamespace
+ */
+ protected RMProvider()
+ {
+ }
+
+ /**
+ * Returns the namespace associated with current WS-RM provider implementation
+ * @return
+ */
+ public abstract String getNamespaceURI();
+
+ /**
+ * Returns WS-RM provider specific message factory
+ * @return message factory
+ */
+ public abstract RMMessageFactory getMessageFactory();
+
+ /**
+ * Returns WS-RM provider specific constants
+ * @return constants
+ */
+ public abstract RMConstants getConstants();
+
+ public static final RMProvider get()
+ {
+ return rmProviderImpl;
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/RMProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMAckRequestedImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMAckRequestedImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMAckRequestedImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,138 @@
+/*
+ * 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.protocol.spec200502;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMAckRequested;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested
+ */
+final class RMAckRequestedImpl extends RMAbstractSerializable implements RMAckRequested
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+ private long lastMessageNumber;
+
+ RMAckRequestedImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested#getMessage()
+ */
+ public long getMessageNumber()
+ {
+ return this.lastMessageNumber;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested#setMessage(long)
+ */
+ public void setMessageNumber(long lastMessageNumber)
+ {
+ if (lastMessageNumber <= 0)
+ throw new IllegalArgumentException("Value must be greater than 0");
+ if (this.lastMessageNumber > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.lastMessageNumber = lastMessageNumber;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + (int)(lastMessageNumber ^ (lastMessageNumber >>>
32));
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMAckRequestedImpl))
+ return false;
+ final RMAckRequestedImpl other = (RMAckRequestedImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (lastMessageNumber != other.lastMessageNumber)
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMAckRequestedImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,322 @@
+/*
+ * 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.protocol.spec200502;
+
+import javax.xml.datatype.Duration;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMIncompleteSequenceBehavior;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence
+ */
+final class RMCreateSequenceImpl extends RMAbstractSerializable implements
RMCreateSequence
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String acksTo;
+ private Duration expires;
+ private RMOffer offer;
+
+ RMCreateSequenceImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#getAcksTo()
+ */
+ public String getAcksTo()
+ {
+ return this.acksTo;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#getExpires()
+ */
+ public Duration getExpires()
+ {
+ return this.expires;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#getOffer()
+ */
+ public RMOffer getOffer()
+ {
+ return this.offer;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#newOffer()
+ */
+ public RMOffer newOffer()
+ {
+ return new OfferImpl();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#setAcksTo(java.lang.String)
+ */
+ public void setAcksTo(String address)
+ {
+ if ((address == null) || (address.trim().equals("")))
+ throw new IllegalArgumentException("Address cannot be null nor empty
string");
+ if (this.acksTo != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.acksTo = address;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#setExpires(java.lang.String)
+ */
+ public void setExpires(Duration duration)
+ {
+ if ((duration == null) || (duration.toString().equals("")))
+ throw new IllegalArgumentException("Duration cannot be null nor empty
string");
+ if (this.expires != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.expires = duration;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#setOffer(org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer)
+ */
+ public void setOffer(RMOffer offer)
+ {
+ if (offer == null)
+ throw new IllegalArgumentException("Offer cannot be null");
+ if (!(offer instanceof OfferImpl))
+ throw new IllegalArgumentException();
+ if (offer.getIdentifier() == null)
+ throw new IllegalArgumentException("Offer identifier must be
specified");
+ if (offer.getEndpoint() == null)
+ throw new IllegalArgumentException("Offer endpoint address must be
specified");
+ if (this.offer != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.offer = offer;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((acksTo == null) ? 0 : acksTo.hashCode());
+ result = prime * result + ((expires == null) ? 0 : expires.hashCode());
+ result = prime * result + ((offer == null) ? 0 : offer.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMCreateSequenceImpl))
+ return false;
+ final RMCreateSequenceImpl other = (RMCreateSequenceImpl)obj;
+ if (acksTo == null)
+ {
+ if (other.acksTo != null)
+ return false;
+ }
+ else if (!acksTo.equals(other.acksTo))
+ return false;
+ if (expires == null)
+ {
+ if (other.expires != null)
+ return false;
+ }
+ else if (!expires.equals(other.expires))
+ return false;
+ if (offer == null)
+ {
+ if (other.offer != null)
+ return false;
+ }
+ else if (!offer.equals(other.offer))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.acksTo == null)
+ throw new RMException("AcksTo must be set");
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer
+ */
+ private static class OfferImpl implements RMCreateSequence.RMOffer
+ {
+
+ private String duration;
+ private String identifier;
+
+ private OfferImpl()
+ {
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#getEndpoint()
+ */
+ public String getEndpoint()
+ {
+ return null; // always return null for this version of the RM protocol
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#getExpires()
+ */
+ public String getExpires()
+ {
+ return this.duration;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#getIncompleteSequenceBehavior()
+ */
+ public RMIncompleteSequenceBehavior getIncompleteSequenceBehavior()
+ {
+ return null; // always return null for this version of the RM protocol
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#setEndpoint(java.lang.String)
+ */
+ public void setEndpoint(String address)
+ {
+ // do nothing for this version of the RM protocol
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#setExpires(java.lang.String)
+ */
+ public void setExpires(String duration)
+ {
+ if ((duration == null) || (duration.trim().equals("")))
+ throw new IllegalArgumentException("Duration cannot be null nor empty
string");
+ if (this.duration != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.duration = duration;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#setIncompleteSequenceBehavior(org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior)
+ */
+ public void setIncompleteSequenceBehavior(RMIncompleteSequenceBehavior
incompleteSequenceBehavior)
+ {
+ // do nothing for this version of the RM protocol
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((duration == null) ? 0 : duration.hashCode());
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof OfferImpl))
+ return false;
+ final OfferImpl other = (OfferImpl)obj;
+ if (duration == null)
+ {
+ if (other.duration != null)
+ return false;
+ }
+ else if (!duration.equals(other.duration))
+ return false;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceResponseImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceResponseImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceResponseImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,270 @@
+/*
+ * 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.protocol.spec200502;
+
+import javax.xml.datatype.Duration;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMIncompleteSequenceBehavior;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse
+ */
+final class RMCreateSequenceResponseImpl extends RMAbstractSerializable implements
RMCreateSequenceResponse
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+ private Duration expires;
+ private RMAccept accept;
+
+ RMCreateSequenceResponseImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getAccept()
+ */
+ public RMAccept getAccept()
+ {
+ return this.accept;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getDuration()
+ */
+ public Duration getExpires()
+ {
+ return this.expires;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getIncompleteSequenceBehavior()
+ */
+ public RMIncompleteSequenceBehavior getIncompleteSequenceBehavior()
+ {
+ return null; // always return null for this version of the RM protocol
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#newAccept()
+ */
+ public RMAccept newAccept()
+ {
+ return new AcceptImpl();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#setAccept(org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept)
+ */
+ public void setAccept(RMAccept accept)
+ {
+ if (accept == null)
+ throw new IllegalArgumentException("Accept cannot be null");
+ if (!(accept instanceof AcceptImpl))
+ throw new IllegalArgumentException();
+ if (accept.getAcksTo() == null)
+ throw new IllegalArgumentException("Accept acksTo must be
specified");
+ if (this.accept != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.accept = accept;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#setExpires(java.lang.String)
+ */
+ public void setExpires(Duration duration)
+ {
+ if ((duration == null) || (duration.toString().equals("")))
+ throw new IllegalArgumentException("Duration cannot be null nor empty
string");
+ if (this.expires != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.expires = duration;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#setIncompleteSequenceBehavior(org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior)
+ */
+ public void setIncompleteSequenceBehavior(RMIncompleteSequenceBehavior
incompleteSequenceBehavior)
+ {
+ // do nothing for this version of the RM protocol
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((accept == null) ? 0 : accept.hashCode());
+ result = prime * result + ((expires == null) ? 0 : expires.hashCode());
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMCreateSequenceResponseImpl))
+ return false;
+ final RMCreateSequenceResponseImpl other = (RMCreateSequenceResponseImpl)obj;
+ if (accept == null)
+ {
+ if (other.accept != null)
+ return false;
+ }
+ else if (!accept.equals(other.accept))
+ return false;
+ if (expires == null)
+ {
+ if (other.expires != null)
+ return false;
+ }
+ else if (!expires.equals(other.expires))
+ return false;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier must be set");
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept
+ */
+ private static class AcceptImpl implements RMCreateSequenceResponse.RMAccept
+ {
+
+ private String acksTo;
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept#getAcksTo()
+ */
+ public String getAcksTo()
+ {
+ return this.acksTo;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept#setAcksTo(java.lang.String)
+ */
+ public void setAcksTo(String address)
+ {
+ if ((address == null) || (address.trim().equals("")))
+ throw new IllegalArgumentException("Address cannot be null nor empty
string");
+ if (this.acksTo != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.acksTo = address;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((acksTo == null) ? 0 : acksTo.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof AcceptImpl))
+ return false;
+ final AcceptImpl other = (AcceptImpl)obj;
+ if (acksTo == null)
+ {
+ if (other.acksTo != null)
+ return false;
+ }
+ else if (!acksTo.equals(other.acksTo))
+ return false;
+ return true;
+ }
+
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMCreateSequenceResponseImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMMessageFactoryImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMMessageFactoryImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMMessageFactoryImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,135 @@
+/*
+ * 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.protocol.spec200502;
+
+import org.jboss.ws.extensions.wsrm.protocol.RMMessageFactory;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMAckRequested;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequenceResponse;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceFault;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequenceResponse;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory
+ */
+final class RMMessageFactoryImpl implements RMMessageFactory
+{
+
+ private static final RMMessageFactory INSTANCE = new RMMessageFactoryImpl();
+
+ private RMMessageFactoryImpl()
+ {
+ // forbidden inheritance
+ }
+
+ public static RMMessageFactory getInstance()
+ {
+ return INSTANCE;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newAckRequested()
+ */
+ public RMAckRequested newAckRequested()
+ {
+ return new RMAckRequestedImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCloseSequence()
+ */
+ public RMCloseSequence newCloseSequence()
+ {
+ return null; // not supported by this version of the RM protocol
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCloseSequenceResponse()
+ */
+ public RMCloseSequenceResponse newCloseSequenceResponse()
+ {
+ return null; // not supported by this version of the RM protocol
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCreateSequence()
+ */
+ public RMCreateSequence newCreateSequence()
+ {
+ return new RMCreateSequenceImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCreateSequenceResponse()
+ */
+ public RMCreateSequenceResponse newCreateSequenceResponse()
+ {
+ return new RMCreateSequenceResponseImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequence()
+ */
+ public RMSequence newSequence()
+ {
+ return new RMSequenceImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequenceAcknowledgement()
+ */
+ public RMSequenceAcknowledgement newSequenceAcknowledgement()
+ {
+ return new RMSequenceAcknowledgementImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequenceFault()
+ */
+ public RMSequenceFault newSequenceFault()
+ {
+ return new RMSequenceFaultImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newTerminateSequence()
+ */
+ public RMTerminateSequence newTerminateSequence()
+ {
+ return new RMTerminateSequenceImpl();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.MessageFactory#newTerminateSequenceResponse()
+ */
+ public RMTerminateSequenceResponse newTerminateSequenceResponse()
+ {
+ return null; // not supported by this version of the RM protocol
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMMessageFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMProviderImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMProviderImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMProviderImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,77 @@
+/*
+ * 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.protocol.spec200502;
+
+import org.jboss.ws.extensions.wsrm.protocol.RMConstants;
+import org.jboss.ws.extensions.wsrm.protocol.RMMessageFactory;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.common.RMConstantsImpl;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider
+ */
+public final class RMProviderImpl extends RMProvider
+{
+
+ public static final String IMPLEMENTATION_VERSION =
"http://schemas.xmlsoap.org/ws/2005/02/rm";
+ private static final RMConstants CONSTANTS = new RMConstantsImpl("wsrm10",
IMPLEMENTATION_VERSION);
+ private static final RMProvider INSTANCE = new RMProviderImpl();
+
+ public RMProviderImpl()
+ {
+ // forbidden inheritance
+ }
+
+ public static RMProvider getInstance()
+ {
+ return INSTANCE;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getMessageFactory()
+ */
+ @Override
+ public RMMessageFactory getMessageFactory()
+ {
+ return RMMessageFactoryImpl.getInstance();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getConstants()
+ */
+ @Override
+ public RMConstants getConstants()
+ {
+ return CONSTANTS;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getNamespaceURI()
+ */
+ @Override
+ public String getNamespaceURI()
+ {
+ return IMPLEMENTATION_VERSION;
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMProviderImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceAcknowledgementImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceAcknowledgementImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceAcknowledgementImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,325 @@
+/*
+ * 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.protocol.spec200502;
+
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Collections;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceAcknowledgement;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement
+ */
+final class RMSequenceAcknowledgementImpl extends RMAbstractSerializable implements
RMSequenceAcknowledgement
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private final List<Long> nacks = new LinkedList<Long>();
+ private final List<RMAcknowledgementRange> acknowledgementRanges = new
LinkedList<RMAcknowledgementRange>();
+ private String identifier;
+
+ RMSequenceAcknowledgementImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#addAcknowledgementRange(org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange)
+ */
+ public void addAcknowledgementRange(RMAcknowledgementRange newAcknowledgementRange)
+ {
+ if ((newAcknowledgementRange == null) || (!(newAcknowledgementRange instanceof
AcknowledgementRangeImpl)))
+ throw new IllegalArgumentException();
+ if (this.nacks.size() != 0)
+ throw new IllegalStateException("There are already some nacks
specified");
+ if ((newAcknowledgementRange.getLower() == 0) ||
(newAcknowledgementRange.getUpper() == 0))
+ throw new IllegalArgumentException("Both, lower and upper values must be
specified");
+ for (RMAcknowledgementRange alreadyAccepted : acknowledgementRanges)
+ checkOverlap(alreadyAccepted, newAcknowledgementRange);
+
+ this.acknowledgementRanges.add(newAcknowledgementRange);
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#addNack(long)
+ */
+ public void addNack(long messageNumber)
+ {
+ if (this.acknowledgementRanges.size() != 0)
+ throw new IllegalStateException("There are already some acknowledgement
ranges specified");
+ if (this.nacks.contains(messageNumber))
+ throw new IllegalArgumentException("There is already nack with value "
+ messageNumber + " specified");
+
+ this.nacks.add(messageNumber);
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#getAcknowledgementRanges()
+ */
+ public List<RMAcknowledgementRange> getAcknowledgementRanges()
+ {
+ return Collections.unmodifiableList(acknowledgementRanges);
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#getNacks()
+ */
+ public List<Long> getNacks()
+ {
+ return Collections.unmodifiableList(nacks);
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#isFinal()
+ */
+ public boolean isFinal()
+ {
+ return false; // always return false for this version of the RM protocol
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#isNone()
+ */
+ public boolean isNone()
+ {
+ return false; // always return false for this version of the RM protocol
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#newAcknowledgementRange()
+ */
+ public RMAcknowledgementRange newAcknowledgementRange()
+ {
+ return new AcknowledgementRangeImpl();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#setFinal(boolean)
+ */
+ public void setFinal()
+ {
+ // do nothing for this version of the RM protocol
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#setNone(boolean)
+ */
+ public void setNone()
+ {
+ // do nothing for this version of the RM protocol
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + ((nacks == null) ? 0 : nacks.hashCode());
+ result = prime * result + ((acknowledgementRanges == null) ? 0 :
acknowledgementRanges.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMSequenceAcknowledgementImpl))
+ return false;
+ final RMSequenceAcknowledgementImpl other = (RMSequenceAcknowledgementImpl)obj;
+ if (acknowledgementRanges == null)
+ {
+ if (other.acknowledgementRanges != null)
+ return false;
+ }
+ else if (!acknowledgementRanges.equals(other.acknowledgementRanges))
+ return false;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (nacks == null)
+ {
+ if (other.nacks != null)
+ return false;
+ }
+ else if (!nacks.equals(other.nacks))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ if ((this.acknowledgementRanges.size() == 0) && (this.nacks.size() == 0))
+ throw new RMException("AcknowledgementRange or Nack must be set");
+ }
+
+ private static void checkOverlap(RMAcknowledgementRange currentRange,
RMAcknowledgementRange newRange)
+ {
+ if ((currentRange.getLower() <= newRange.getLower()) &&
(newRange.getLower() <= currentRange.getUpper()))
+ throw new IllegalArgumentException(
+ "Overlap detected: " + currentRange + " vs. " +
newRange);
+ if ((currentRange.getLower() <= newRange.getUpper()) &&
(newRange.getUpper() <= currentRange.getUpper()))
+ throw new IllegalArgumentException(
+ "Overlap detected: " + currentRange + " vs. " +
newRange);
+ }
+
+ private static class AcknowledgementRangeImpl implements
RMSequenceAcknowledgement.RMAcknowledgementRange
+ {
+
+ private long lower;
+ private long upper;
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange#getLower()
+ */
+ public long getLower()
+ {
+ return this.lower;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange#getUpper()
+ */
+ public long getUpper()
+ {
+ return this.upper;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange#setLower(long)
+ */
+ public void setLower(long lower)
+ {
+ if (lower <= 0)
+ throw new IllegalArgumentException("Value must be greater than
0");
+ if (this.lower > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+ if ((this.upper > 0) && (lower > this.upper))
+ throw new IllegalArgumentException("Value must be lower or equal to
" + this.upper);
+
+ this.lower = lower;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange#setUpper(long)
+ */
+ public void setUpper(long upper)
+ {
+ if (upper <= 0)
+ throw new IllegalArgumentException("Value must be greater than
0");
+ if (this.upper > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+ if ((this.lower > 0) && (this.lower > upper))
+ throw new IllegalArgumentException("Value must be greater or equal to
" + this.lower);
+
+ this.upper = upper;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (int)(lower ^ (lower >>> 32));
+ result = prime * result + (int)(upper ^ (upper >>> 32));
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof AcknowledgementRangeImpl))
+ return false;
+ final AcknowledgementRangeImpl other = (AcknowledgementRangeImpl)obj;
+ if (lower != other.lower)
+ return false;
+ if (upper != other.upper)
+ return false;
+ return true;
+ }
+
+ public String toString()
+ {
+ return "<" + lower + "; " + upper + ">";
+ }
+
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceAcknowledgementImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceFaultImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceFaultImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceFaultImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,144 @@
+/*
+ * 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.protocol.spec200502;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceFault;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceFaultCode;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault
+ */
+final class RMSequenceFaultImpl extends RMAbstractSerializable implements
RMSequenceFault
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private RMSequenceFaultCode faultCode;
+ private Exception detail;
+
+ RMSequenceFaultImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault#getDetail()
+ */
+ public Exception getDetail()
+ {
+ return this.detail;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault#getFaultCode()
+ */
+ public RMSequenceFaultCode getFaultCode()
+ {
+ return this.faultCode;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault#setDetail(java.lang.Exception)
+ */
+ public void setDetail(Exception detail)
+ {
+ if (detail == null)
+ throw new IllegalArgumentException("Detail cannot be null");
+ if (this.detail != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.detail = detail;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault#setFaultCode(org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFaultCode)
+ */
+ public void setFaultCode(RMSequenceFaultCode faultCode)
+ {
+ if (faultCode == null)
+ throw new IllegalArgumentException("Fault code cannot be null");
+ if (this.faultCode != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.faultCode = faultCode;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((detail == null) ? 0 : detail.getMessage().hashCode());
+ result = prime * result + ((faultCode == null) ? 0 : faultCode.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMSequenceFaultImpl))
+ return false;
+ final RMSequenceFaultImpl other = (RMSequenceFaultImpl)obj;
+ if (detail == null)
+ {
+ if (other.detail != null)
+ return false;
+ }
+ else if (!detail.getMessage().equals(other.detail.getMessage()))
+ return false;
+ if (faultCode == null)
+ {
+ if (other.faultCode != null)
+ return false;
+ }
+ else if (!faultCode.equals(other.faultCode))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.faultCode == null)
+ throw new RMException("FaultCode must be set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceFaultImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,160 @@
+/*
+ * 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.protocol.spec200502;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequence;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence
+ */
+final class RMSequenceImpl extends RMAbstractSerializable implements RMSequence
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+ private long messageNumber;
+ private boolean isLastMessage;
+
+ RMSequenceImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#getMessageNumber()
+ */
+ public long getMessageNumber()
+ {
+ return messageNumber;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#isLastMessage()
+ */
+ public boolean isLastMessage()
+ {
+ return this.isLastMessage;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#setLastMessage(boolean)
+ */
+ public void setLastMessage()
+ {
+ this.isLastMessage = true;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#setMessageNumber(long)
+ */
+ public void setMessageNumber(long messageNumber)
+ {
+ if (messageNumber <= 0)
+ throw new IllegalArgumentException("Value must be greater than 0");
+ if (this.messageNumber > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.messageNumber = messageNumber;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + (isLastMessage ? 1231 : 1237);
+ result = prime * result + (int)(messageNumber ^ (messageNumber >>> 32));
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMSequenceImpl))
+ return false;
+ final RMSequenceImpl other = (RMSequenceImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (isLastMessage != other.isLastMessage)
+ return false;
+ if (messageNumber != other.messageNumber)
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier must be set");
+ if (this.messageNumber == 0)
+ throw new RMException("MessageNumber must be set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMSequenceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMTerminateSequenceImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMTerminateSequenceImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMTerminateSequenceImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,129 @@
+/*
+ * 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.protocol.spec200502;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequence;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence
+ */
+final class RMTerminateSequenceImpl extends RMAbstractSerializable implements
RMTerminateSequence
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+
+ RMTerminateSequenceImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence#getLastMsgNumber()
+ */
+ public long getLastMsgNumber()
+ {
+ return 0; // always return zero for this version of the RM protocol
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence#setLastMsgNumber(long)
+ */
+ public void setLastMsgNumber(long lastMsgNumber)
+ {
+ // do nothing for this version of the RM protocol
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMTerminateSequenceImpl))
+ return false;
+ final RMTerminateSequenceImpl other = (RMTerminateSequenceImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200502/RMTerminateSequenceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMAckRequestedImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMAckRequestedImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMAckRequestedImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,129 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMAckRequested;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested
+ */
+final class RMAckRequestedImpl extends RMAbstractSerializable implements RMAckRequested
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+
+ RMAckRequestedImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested#getMessage()
+ */
+ public long getMessageNumber()
+ {
+ return 0; // always return zero for this version of the RM protocol
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested#setMessage(long)
+ */
+ public void setMessageNumber(long lastMessageNumber)
+ {
+ // do nothing for this version of the RM protocol
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMAckRequestedImpl))
+ return false;
+ final RMAckRequestedImpl other = (RMAckRequestedImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMAckRequestedImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,138 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequence;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence
+ */
+final class RMCloseSequenceImpl extends RMAbstractSerializable implements
RMCloseSequence
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+ private long lastMsgNumber;
+
+ RMCloseSequenceImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence#getLastMsgNumber()
+ */
+ public long getLastMsgNumber()
+ {
+ return this.lastMsgNumber;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence#setLastMsgNumber(long)
+ */
+ public void setLastMsgNumber(long lastMsgNumber)
+ {
+ if (lastMsgNumber <= 0)
+ throw new IllegalArgumentException("Value must be greater than 0");
+ if (this.lastMsgNumber > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.lastMsgNumber = lastMsgNumber;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + (int)(lastMsgNumber ^ (lastMsgNumber >>> 32));
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMCloseSequenceImpl))
+ return false;
+ final RMCloseSequenceImpl other = (RMCloseSequenceImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (lastMsgNumber != other.lastMsgNumber)
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceResponseImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceResponseImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceResponseImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,113 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequenceResponse;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse
+ */
+final class RMCloseSequenceResponseImpl extends RMAbstractSerializable implements
RMCloseSequenceResponse
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+
+ RMCloseSequenceResponseImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMCloseSequenceResponseImpl))
+ return false;
+ final RMCloseSequenceResponseImpl other = (RMCloseSequenceResponseImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCloseSequenceResponseImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,350 @@
+/*
+ * 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.protocol.spec200702;
+
+import javax.xml.datatype.Duration;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMIncompleteSequenceBehavior;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence
+ */
+final class RMCreateSequenceImpl extends RMAbstractSerializable implements
RMCreateSequence
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String acksTo;
+ private Duration expires;
+ private RMOffer offer;
+
+ RMCreateSequenceImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#getAcksTo()
+ */
+ public String getAcksTo()
+ {
+ return this.acksTo;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#getExpires()
+ */
+ public Duration getExpires()
+ {
+ return this.expires;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#getOffer()
+ */
+ public RMOffer getOffer()
+ {
+ return this.offer;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#newOffer()
+ */
+ public RMOffer newOffer()
+ {
+ return new OfferImpl();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#setAcksTo(java.lang.String)
+ */
+ public void setAcksTo(String address)
+ {
+ if ((address == null) || (address.trim().equals("")))
+ throw new IllegalArgumentException("Address cannot be null nor empty
string");
+ if (this.acksTo != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.acksTo = address;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#setExpires(java.lang.String)
+ */
+ public void setExpires(Duration duration)
+ {
+ if ((duration == null) || (duration.toString().equals("")))
+ throw new IllegalArgumentException("Duration cannot be null nor empty
string");
+ if (this.expires != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.expires = duration;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#setOffer(org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer)
+ */
+ public void setOffer(RMOffer offer)
+ {
+ if (offer == null)
+ throw new IllegalArgumentException("Offer cannot be null");
+ if (!(offer instanceof OfferImpl))
+ throw new IllegalArgumentException();
+ if (offer.getIdentifier() == null)
+ throw new IllegalArgumentException("Offer identifier must be
specified");
+ if (offer.getEndpoint() == null)
+ throw new IllegalArgumentException("Offer endpoint address must be
specified");
+ if (this.offer != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.offer = offer;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((acksTo == null) ? 0 : acksTo.hashCode());
+ result = prime * result + ((expires == null) ? 0 : expires.hashCode());
+ result = prime * result + ((offer == null) ? 0 : offer.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMCreateSequenceImpl))
+ return false;
+ final RMCreateSequenceImpl other = (RMCreateSequenceImpl)obj;
+ if (acksTo == null)
+ {
+ if (other.acksTo != null)
+ return false;
+ }
+ else if (!acksTo.equals(other.acksTo))
+ return false;
+ if (expires == null)
+ {
+ if (other.expires != null)
+ return false;
+ }
+ else if (!expires.equals(other.expires))
+ return false;
+ if (offer == null)
+ {
+ if (other.offer != null)
+ return false;
+ }
+ else if (!offer.equals(other.offer))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.acksTo == null)
+ throw new RMException("AcksTo must be set");
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer
+ */
+ private static class OfferImpl implements RMCreateSequence.RMOffer
+ {
+
+ private String endpoint;
+ private String duration;
+ private String identifier;
+ private RMIncompleteSequenceBehavior incompleteSequenceBehavior;
+
+ private OfferImpl()
+ {
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#getEndpoint()
+ */
+ public String getEndpoint()
+ {
+ return this.endpoint;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#getExpires()
+ */
+ public String getExpires()
+ {
+ return this.duration;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#getIncompleteSequenceBehavior()
+ */
+ public RMIncompleteSequenceBehavior getIncompleteSequenceBehavior()
+ {
+ return this.incompleteSequenceBehavior;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#setEndpoint(java.lang.String)
+ */
+ public void setEndpoint(String address)
+ {
+ if ((address == null) || (address.trim().equals("")))
+ throw new IllegalArgumentException("Address cannot be null nor empty
string");
+ if (this.endpoint != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.endpoint = address;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#setExpires(java.lang.String)
+ */
+ public void setExpires(String duration)
+ {
+ if ((duration == null) || (duration.trim().equals("")))
+ throw new IllegalArgumentException("Duration cannot be null nor empty
string");
+ if (this.duration != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.duration = duration;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer#setIncompleteSequenceBehavior(org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior)
+ */
+ public void setIncompleteSequenceBehavior(RMIncompleteSequenceBehavior
incompleteSequenceBehavior)
+ {
+ if (incompleteSequenceBehavior == null)
+ throw new IllegalArgumentException("Sequence behavior type cannot be
null");
+ if (this.incompleteSequenceBehavior != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.incompleteSequenceBehavior = incompleteSequenceBehavior;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((duration == null) ? 0 : duration.hashCode());
+ result = prime * result + ((endpoint == null) ? 0 : endpoint.hashCode());
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + ((incompleteSequenceBehavior == null) ? 0 :
incompleteSequenceBehavior.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof OfferImpl))
+ return false;
+ final OfferImpl other = (OfferImpl)obj;
+ if (duration == null)
+ {
+ if (other.duration != null)
+ return false;
+ }
+ else if (!duration.equals(other.duration))
+ return false;
+ if (endpoint == null)
+ {
+ if (other.endpoint != null)
+ return false;
+ }
+ else if (!endpoint.equals(other.endpoint))
+ return false;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (incompleteSequenceBehavior == null)
+ {
+ if (other.incompleteSequenceBehavior != null)
+ return false;
+ }
+ else if (!incompleteSequenceBehavior.equals(other.incompleteSequenceBehavior))
+ return false;
+ return true;
+ }
+
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceResponseImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceResponseImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceResponseImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,284 @@
+/*
+ * 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.protocol.spec200702;
+
+import javax.xml.datatype.Duration;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMIncompleteSequenceBehavior;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse
+ */
+final class RMCreateSequenceResponseImpl extends RMAbstractSerializable implements
RMCreateSequenceResponse
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+ private Duration expires;
+ private RMAccept accept;
+ private RMIncompleteSequenceBehavior incompleteSequenceBehavior;
+
+ RMCreateSequenceResponseImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getAccept()
+ */
+ public RMAccept getAccept()
+ {
+ return this.accept;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getDuration()
+ */
+ public Duration getExpires()
+ {
+ return this.expires;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getIncompleteSequenceBehavior()
+ */
+ public RMIncompleteSequenceBehavior getIncompleteSequenceBehavior()
+ {
+ return this.incompleteSequenceBehavior;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#newAccept()
+ */
+ public RMAccept newAccept()
+ {
+ return new AcceptImpl();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#setAccept(org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept)
+ */
+ public void setAccept(RMAccept accept)
+ {
+ if (accept == null)
+ throw new IllegalArgumentException("Accept cannot be null");
+ if (!(accept instanceof AcceptImpl))
+ throw new IllegalArgumentException();
+ if (accept.getAcksTo() == null)
+ throw new IllegalArgumentException("Accept acksTo must be
specified");
+ if (this.accept != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.accept = accept;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#setExpires(java.lang.String)
+ */
+ public void setExpires(Duration duration)
+ {
+ if ((duration == null) || (duration.toString().equals("")))
+ throw new IllegalArgumentException("Duration cannot be null nor empty
string");
+ if (this.expires != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.expires = duration;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#setIncompleteSequenceBehavior(org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior)
+ */
+ public void setIncompleteSequenceBehavior(RMIncompleteSequenceBehavior
incompleteSequenceBehavior)
+ {
+ if (incompleteSequenceBehavior == null)
+ throw new IllegalArgumentException("Sequence behavior type cannot be
null");
+ if (this.incompleteSequenceBehavior != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.incompleteSequenceBehavior = incompleteSequenceBehavior;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((accept == null) ? 0 : accept.hashCode());
+ result = prime * result + ((expires == null) ? 0 : expires.hashCode());
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + ((incompleteSequenceBehavior == null) ? 0 :
incompleteSequenceBehavior.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMCreateSequenceResponseImpl))
+ return false;
+ final RMCreateSequenceResponseImpl other = (RMCreateSequenceResponseImpl)obj;
+ if (accept == null)
+ {
+ if (other.accept != null)
+ return false;
+ }
+ else if (!accept.equals(other.accept))
+ return false;
+ if (expires == null)
+ {
+ if (other.expires != null)
+ return false;
+ }
+ else if (!expires.equals(other.expires))
+ return false;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (incompleteSequenceBehavior == null)
+ {
+ if (other.incompleteSequenceBehavior != null)
+ return false;
+ }
+ else if (!incompleteSequenceBehavior.equals(other.incompleteSequenceBehavior))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier must be set");
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept
+ */
+ private static class AcceptImpl implements RMCreateSequenceResponse.RMAccept
+ {
+
+ private String acksTo;
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept#getAcksTo()
+ */
+ public String getAcksTo()
+ {
+ return this.acksTo;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept#setAcksTo(java.lang.String)
+ */
+ public void setAcksTo(String address)
+ {
+ if ((address == null) || (address.trim().equals("")))
+ throw new IllegalArgumentException("Address cannot be null nor empty
string");
+ if (this.acksTo != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.acksTo = address;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((acksTo == null) ? 0 : acksTo.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof AcceptImpl))
+ return false;
+ final AcceptImpl other = (AcceptImpl)obj;
+ if (acksTo == null)
+ {
+ if (other.acksTo != null)
+ return false;
+ }
+ else if (!acksTo.equals(other.acksTo))
+ return false;
+ return true;
+ }
+
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMCreateSequenceResponseImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMMessageFactoryImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMMessageFactoryImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMMessageFactoryImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,135 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.protocol.RMMessageFactory;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMAckRequested;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequenceResponse;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceFault;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequence;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequenceResponse;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory
+ */
+final class RMMessageFactoryImpl implements RMMessageFactory
+{
+
+ private static final RMMessageFactory INSTANCE = new RMMessageFactoryImpl();
+
+ private RMMessageFactoryImpl()
+ {
+ // forbidden inheritance
+ }
+
+ public static RMMessageFactory getInstance()
+ {
+ return INSTANCE;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newAckRequested()
+ */
+ public RMAckRequested newAckRequested()
+ {
+ return new RMAckRequestedImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCloseSequence()
+ */
+ public RMCloseSequence newCloseSequence()
+ {
+ return new RMCloseSequenceImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCloseSequenceResponse()
+ */
+ public RMCloseSequenceResponse newCloseSequenceResponse()
+ {
+ return new RMCloseSequenceResponseImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCreateSequence()
+ */
+ public RMCreateSequence newCreateSequence()
+ {
+ return new RMCreateSequenceImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCreateSequenceResponse()
+ */
+ public RMCreateSequenceResponse newCreateSequenceResponse()
+ {
+ return new RMCreateSequenceResponseImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequence()
+ */
+ public RMSequence newSequence()
+ {
+ return new RMSequenceImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequenceAcknowledgement()
+ */
+ public RMSequenceAcknowledgement newSequenceAcknowledgement()
+ {
+ return new RMSequenceAcknowledgementImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequenceFault()
+ */
+ public RMSequenceFault newSequenceFault()
+ {
+ return new RMSequenceFaultImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newTerminateSequence()
+ */
+ public RMTerminateSequence newTerminateSequence()
+ {
+ return new RMTerminateSequenceImpl();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.MessageFactory#newTerminateSequenceResponse()
+ */
+ public RMTerminateSequenceResponse newTerminateSequenceResponse()
+ {
+ return new RMTerminateSequenceResponseImpl();
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMMessageFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMProviderImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMProviderImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMProviderImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,77 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.common.RMConstantsImpl;
+import org.jboss.ws.extensions.wsrm.protocol.RMConstants;
+import org.jboss.ws.extensions.wsrm.protocol.RMMessageFactory;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider
+ */
+public final class RMProviderImpl extends RMProvider
+{
+
+ public static final String IMPLEMENTATION_VERSION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702";
+ private static final RMConstants CONSTANTS = new
RMConstantsImpl("wsrm11",IMPLEMENTATION_VERSION);
+ private static final RMProvider INSTANCE = new RMProviderImpl();
+
+ public RMProviderImpl()
+ {
+ // forbidden inheritance
+ }
+
+ public static RMProvider getInstance()
+ {
+ return INSTANCE;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getMessageFactory()
+ */
+ @Override
+ public RMMessageFactory getMessageFactory()
+ {
+ return RMMessageFactoryImpl.getInstance();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getConstants()
+ */
+ @Override
+ public RMConstants getConstants()
+ {
+ return CONSTANTS;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getNamespaceURI()
+ */
+ @Override
+ public String getNamespaceURI()
+ {
+ return IMPLEMENTATION_VERSION;
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMProviderImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceAcknowledgementImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceAcknowledgementImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceAcknowledgementImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,347 @@
+/*
+ * 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.protocol.spec200702;
+
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Collections;
+
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement
+ */
+final class RMSequenceAcknowledgementImpl extends RMAbstractSerializable implements
RMSequenceAcknowledgement
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private final List<Long> nacks = new LinkedList<Long>();
+ private final List<RMAcknowledgementRange> acknowledgementRanges = new
LinkedList<RMAcknowledgementRange>();
+ private String identifier;
+ private boolean isFinal;
+ private boolean isNone;
+
+ RMSequenceAcknowledgementImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#addAcknowledgementRange(org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange)
+ */
+ public void addAcknowledgementRange(RMAcknowledgementRange newAcknowledgementRange)
+ {
+ if ((newAcknowledgementRange == null) || (!(newAcknowledgementRange instanceof
AcknowledgementRangeImpl)))
+ throw new IllegalArgumentException();
+ if (this.nacks.size() != 0)
+ throw new IllegalStateException("There are already some nacks
specified");
+ if (this.isNone)
+ throw new IllegalStateException("There is already none specified");
+ if ((newAcknowledgementRange.getLower() == 0) ||
(newAcknowledgementRange.getUpper() == 0))
+ throw new IllegalArgumentException("Both, lower and upper values must be
specified");
+ for (RMAcknowledgementRange alreadyAccepted : acknowledgementRanges)
+ checkOverlap(alreadyAccepted, newAcknowledgementRange);
+
+ this.acknowledgementRanges.add(newAcknowledgementRange);
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#addNack(long)
+ */
+ public void addNack(long messageNumber)
+ {
+ if (this.isFinal)
+ throw new IllegalStateException("There is already final specified");
+ if (this.isNone)
+ throw new IllegalStateException("There is already none specified");
+ if (this.acknowledgementRanges.size() != 0)
+ throw new IllegalStateException("There are already some acknowledgement
ranges specified");
+ if (this.nacks.contains(messageNumber))
+ throw new IllegalArgumentException("There is already nack with value "
+ messageNumber + " specified");
+
+ this.nacks.add(messageNumber);
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#getAcknowledgementRanges()
+ */
+ public List<RMAcknowledgementRange> getAcknowledgementRanges()
+ {
+ return Collections.unmodifiableList(acknowledgementRanges);
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#getNacks()
+ */
+ public List<Long> getNacks()
+ {
+ return Collections.unmodifiableList(nacks);
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#isFinal()
+ */
+ public boolean isFinal()
+ {
+ return this.isFinal;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#isNone()
+ */
+ public boolean isNone()
+ {
+ return this.isNone;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#newAcknowledgementRange()
+ */
+ public RMAcknowledgementRange newAcknowledgementRange()
+ {
+ return new AcknowledgementRangeImpl();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#setFinal(boolean)
+ */
+ public void setFinal()
+ {
+ if (this.nacks.size() != 0)
+ throw new IllegalStateException("There are already some nacks
specified");
+
+ this.isFinal = true;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement#setNone(boolean)
+ */
+ public void setNone()
+ {
+ if (this.acknowledgementRanges.size() != 0)
+ throw new IllegalStateException("There are already some acknowledgement
ranges specified");
+ if (this.nacks.size() != 0)
+ throw new IllegalStateException("There are already some nacks
specified");
+
+ this.isNone = true;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + (isFinal ? 1231 : 1237);
+ result = prime * result + (isNone ? 1231 : 1237);
+ result = prime * result + ((nacks == null) ? 0 : nacks.hashCode());
+ result = prime * result + ((acknowledgementRanges == null) ? 0 :
acknowledgementRanges.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMSequenceAcknowledgementImpl))
+ return false;
+ final RMSequenceAcknowledgementImpl other = (RMSequenceAcknowledgementImpl)obj;
+ if (acknowledgementRanges == null)
+ {
+ if (other.acknowledgementRanges != null)
+ return false;
+ }
+ else if (!acknowledgementRanges.equals(other.acknowledgementRanges))
+ return false;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (isFinal != other.isFinal)
+ return false;
+ if (isNone != other.isNone)
+ return false;
+ if (nacks == null)
+ {
+ if (other.nacks != null)
+ return false;
+ }
+ else if (!nacks.equals(other.nacks))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ if ((this.acknowledgementRanges.size() == 0) && (this.nacks.size() == 0)
&& (!this.isNone))
+ throw new RMException("AcknowledgementRange or Nack or None must be
set");
+ }
+
+ private static void checkOverlap(RMAcknowledgementRange currentRange,
RMAcknowledgementRange newRange)
+ {
+ if ((currentRange.getLower() <= newRange.getLower()) &&
(newRange.getLower() <= currentRange.getUpper()))
+ throw new IllegalArgumentException(
+ "Overlap detected: " + currentRange + " vs. " +
newRange);
+ if ((currentRange.getLower() <= newRange.getUpper()) &&
(newRange.getUpper() <= currentRange.getUpper()))
+ throw new IllegalArgumentException(
+ "Overlap detected: " + currentRange + " vs. " +
newRange);
+ }
+
+ private static class AcknowledgementRangeImpl implements
RMSequenceAcknowledgement.RMAcknowledgementRange
+ {
+
+ private long lower;
+ private long upper;
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange#getLower()
+ */
+ public long getLower()
+ {
+ return this.lower;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange#getUpper()
+ */
+ public long getUpper()
+ {
+ return this.upper;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange#setLower(long)
+ */
+ public void setLower(long lower)
+ {
+ if (lower <= 0)
+ throw new IllegalArgumentException("Value must be greater than
0");
+ if (this.lower > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+ if ((this.upper > 0) && (lower > this.upper))
+ throw new IllegalArgumentException("Value must be lower or equal to
" + this.upper);
+
+ this.lower = lower;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement.AcknowledgementRange#setUpper(long)
+ */
+ public void setUpper(long upper)
+ {
+ if (upper <= 0)
+ throw new IllegalArgumentException("Value must be greater than
0");
+ if (this.upper > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+ if ((this.lower > 0) && (this.lower > upper))
+ throw new IllegalArgumentException("Value must be greater or equal to
" + this.lower);
+
+ this.upper = upper;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (int)(lower ^ (lower >>> 32));
+ result = prime * result + (int)(upper ^ (upper >>> 32));
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof AcknowledgementRangeImpl))
+ return false;
+ final AcknowledgementRangeImpl other = (AcknowledgementRangeImpl)obj;
+ if (lower != other.lower)
+ return false;
+ if (upper != other.upper)
+ return false;
+ return true;
+ }
+
+ public String toString()
+ {
+ return "<" + lower + "; " + upper + ">";
+ }
+
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceAcknowledgementImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceFaultImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceFaultImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceFaultImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,144 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceFault;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceFaultCode;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault
+ */
+final class RMSequenceFaultImpl extends RMAbstractSerializable implements
RMSequenceFault
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private RMSequenceFaultCode faultCode;
+ private Exception detail;
+
+ RMSequenceFaultImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault#getDetail()
+ */
+ public Exception getDetail()
+ {
+ return this.detail;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault#getFaultCode()
+ */
+ public RMSequenceFaultCode getFaultCode()
+ {
+ return this.faultCode;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault#setDetail(java.lang.Exception)
+ */
+ public void setDetail(Exception detail)
+ {
+ if (detail == null)
+ throw new IllegalArgumentException("Detail cannot be null");
+ if (this.detail != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.detail = detail;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault#setFaultCode(org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFaultCode)
+ */
+ public void setFaultCode(RMSequenceFaultCode faultCode)
+ {
+ if (faultCode == null)
+ throw new IllegalArgumentException("Fault code cannot be null");
+ if (this.faultCode != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.faultCode = faultCode;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((detail == null) ? 0 : detail.getMessage().hashCode());
+ result = prime * result + ((faultCode == null) ? 0 : faultCode.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMSequenceFaultImpl))
+ return false;
+ final RMSequenceFaultImpl other = (RMSequenceFaultImpl)obj;
+ if (detail == null)
+ {
+ if (other.detail != null)
+ return false;
+ }
+ else if (!detail.getMessage().equals(other.detail.getMessage()))
+ return false;
+ if (faultCode == null)
+ {
+ if (other.faultCode != null)
+ return false;
+ }
+ else if (!faultCode.equals(other.faultCode))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.faultCode == null)
+ throw new RMException("FaultCode must be set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceFaultImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,156 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequence;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence
+ */
+final class RMSequenceImpl extends RMAbstractSerializable implements RMSequence
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+ private long messageNumber;
+
+ RMSequenceImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#getMessageNumber()
+ */
+ public long getMessageNumber()
+ {
+ return messageNumber;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#isLastMessage()
+ */
+ public boolean isLastMessage()
+ {
+ return false; // always return false for this version of the RM protocol
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#setLastMessage(boolean)
+ */
+ public void setLastMessage()
+ {
+ // do nothing for this version of the RM protocol
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#setMessageNumber(long)
+ */
+ public void setMessageNumber(long messageNumber)
+ {
+ if (messageNumber <= 0)
+ throw new IllegalArgumentException("Value must be greater than 0");
+ if (this.messageNumber > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.messageNumber = messageNumber;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + (int)(messageNumber ^ (messageNumber >>> 32));
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMSequenceImpl))
+ return false;
+ final RMSequenceImpl other = (RMSequenceImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (messageNumber != other.messageNumber)
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier must be set");
+ if (this.messageNumber == 0)
+ throw new RMException("MessageNumber must be set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMSequenceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,138 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequence;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence
+ */
+final class RMTerminateSequenceImpl extends RMAbstractSerializable implements
RMTerminateSequence
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+ private long lastMsgNumber;
+
+ RMTerminateSequenceImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence#getLastMsgNumber()
+ */
+ public long getLastMsgNumber()
+ {
+ return this.lastMsgNumber;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence#setLastMsgNumber(long)
+ */
+ public void setLastMsgNumber(long lastMsgNumber)
+ {
+ if (lastMsgNumber <= 0)
+ throw new IllegalArgumentException("Value must be greater than 0");
+ if (this.lastMsgNumber > 0)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.lastMsgNumber = lastMsgNumber;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ result = prime * result + (int)(lastMsgNumber ^ (lastMsgNumber >>> 32));
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMTerminateSequenceImpl))
+ return false;
+ final RMTerminateSequenceImpl other = (RMTerminateSequenceImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ if (lastMsgNumber != other.lastMsgNumber)
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceResponseImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceResponseImpl.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceResponseImpl.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,113 @@
+/*
+ * 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.protocol.spec200702;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+import org.jboss.ws.extensions.wsrm.common.serialization.RMAbstractSerializable;
+import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMTerminateSequenceResponse;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse
+ */
+final class RMTerminateSequenceResponseImpl extends RMAbstractSerializable implements
RMTerminateSequenceResponse
+{
+
+ // provider used by de/serialization framework
+ private static final RMProvider PROVIDER = RMProviderImpl.getInstance();
+ // internal fields
+ private String identifier;
+
+ RMTerminateSequenceResponseImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ return this.identifier;
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse#setIdentifier(java.lang.String)
+ */
+ public void setIdentifier(String identifier)
+ {
+ if ((identifier == null) || (identifier.trim().equals("")))
+ throw new IllegalArgumentException("Identifier cannot be null nor empty
string");
+ if (this.identifier != null)
+ throw new UnsupportedOperationException("Value already set, cannot be
overriden");
+
+ this.identifier = identifier;
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof RMTerminateSequenceResponseImpl))
+ return false;
+ final RMTerminateSequenceResponseImpl other =
(RMTerminateSequenceResponseImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ public RMProvider getProvider()
+ {
+ return PROVIDER;
+ }
+
+ public void validate()
+ {
+ if (this.identifier == null)
+ throw new RMException("Identifier not set");
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spec200702/RMTerminateSequenceResponseImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMAckRequested.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMAckRequested.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMAckRequested.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,69 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * <p><b>AckRequested</b> element requests an Acknowledgement for the
identified Sequence.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:AckRequested ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:MessageNumber> xs:unsignedLong
</wsrm:MessageNumber> ?
+ * ...
+ * </wsrm:AckRequested>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMAckRequested extends RMSerializable
+{
+ /**
+ * An RM Source that includes an <b>AckRequested</b> header block in a
SOAP envelope MUST include
+ * this element in that header block. The RM Source MUST set the value of this element
to the
+ * absolute URI, (conformant with RFC3986), that uniquely identifies the Sequence to
which the
+ * request applies.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * This optional element, if present, MUST contain an
<b>xs:unsignedLong</b> representing the highest
+ * <b>MessageNumber</b> sent by the RM Source within a Sequence. If
present, it MAY be treated
+ * as a hint to the RM Destination as an optimization to the process of preparing to
transmit a
+ * <b>SequenceAcknowledgement</b>.
+ * @param lastMessageNumber
+ */
+ void setMessageNumber(long lastMessageNumber);
+
+ /**
+ * Getter
+ * @return last message number in the sequence
+ */
+ long getMessageNumber();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMAckRequested.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequence.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequence.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequence.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,69 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * <p><b>CloseSequence</b> element MAY be sent by an RM Source to
indicate that the RM Destination MUST NOT
+ * accept any new messages for this Sequence This element MAY also be sent by an RM
+ * Destination to indicate that it will not accept any new messages for this
Sequence.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:CloseSequence ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:LastMsgNumber> wsrm:MessageNumberType
</wsrm:LastMsgNumber> ?
+ * ...
+ * </wsrm:CloseSequence>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMCloseSequence extends RMSerializable
+{
+ /**
+ * The RM Source or RM Destination MUST include this element in any
<b>CloseSequence</b> messages it
+ * sends. The RM Source or RM Destination MUST set the value of this element to the
absolute URI
+ * (conformant with RFC3986) of the closing Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * The RM Source SHOULD include this element in any <b>CloseSequence</b>
message it sends. The
+ * <b>LastMsgNumber</b> element specifies the highest assigned message
number of all the Sequence
+ * Traffic Messages for the closing Sequence.
+ * @param lastMsgNumber
+ */
+ void setLastMsgNumber(long lastMsgNumber);
+
+ /**
+ * Getter
+ * @return last message number
+ */
+ long getLastMsgNumber();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequenceResponse.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequenceResponse.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequenceResponse.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,53 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * <p><b>CloseSequenceResponse</b> element is sent in the body of a
message in response to receipt of a <b>CloseSequence</b>
+ * request message. It indicates that the responder has closed the Sequence.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:CloseSequenceResponse ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * ...
+ * </wsrm:CloseSequenceResponse>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMCloseSequenceResponse extends RMSerializable
+{
+ /**
+ * The responder (RM Source or RM Destination) MUST include this element in any
+ * <b>CloseSequenceResponse</b> message it sends. The responder MUST set
the value of this
+ * element to the absolute URI (conformant with RFC3986) of the closing Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCloseSequenceResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequence.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequence.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequence.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,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.protocol.spi;
+
+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(a)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();
+ }
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequenceResponse.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequenceResponse.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequenceResponse.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,146 @@
+/*
+ * 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.protocol.spi;
+
+import javax.xml.datatype.Duration;
+
+/**
+ * <p><b>CreateSequenceResponse</b> element is sent in the body of the
response message in response to a <b>CreateSequence</b>
+ * request message. It indicates that the RM Destination has created a new Sequence at
the
+ * request of the RM Source. The RM Destination MUST NOT send this element as a header
block.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <CreateSequenceResponse ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:Expires ...> xs:duration </wsrm:Expires> ?
+ * <wsrm:IncompleteSequenceBehavior>
+ * wsrm:IncompleteSequenceBehaviorType
+ * </wsrm:IncompleteSequenceBehavior> ?
+ * <wsrm:Accept ...>
+ * <wsrm:AcksTo> wsa:EndpointReferenceType
</wsrm:AcksTo>
+ * ...
+ * </wsrm:Accept> ?
+ * ...
+ * </CreateSequenceResponse>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMCreateSequenceResponse extends RMSerializable
+{
+ /**
+ * The RM Destination MUST include this element within any CreateSequenceResponse
message it
+ * sends. The RM Destination MUST set the value of this element to the absolute URI
(conformant
+ * with RFC3986) that uniquely identifies the Sequence that has been created by the RM
Destination.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * This element, if present, of type <b>xs:duration</b> accepts or refines
the RM Source's requested
+ * duration for the Sequence. It specifies the amount of time after which any
resources associated
+ * with the Sequence SHOULD be reclaimed thus causing the Sequence to be silently
terminated. At
+ * the RM Destination this duration is measured from a point proximate to Sequence
creation and at
+ * the RM Source this duration is measured from a point approximate to the successful
processing of
+ * the <b>CreateSequenceResponse</b>. A value of "PT0S"
indicates that the Sequence will never
+ * expire. Absence of the element indicates an implied value of "PT0S". The
RM Destination MUST
+ * set the value of this element to be equal to or less than the value requested by
the RM Source in
+ * the corresponding <b>CreateSequence</b> message.
+ * @param duration
+ */
+ void setExpires(Duration duration);
+
+ /**
+ * Getter
+ * @return sequence duration
+ */
+ Duration 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 used incomplete sequence behavior type
+ */
+ RMIncompleteSequenceBehavior getIncompleteSequenceBehavior();
+
+ /**
+ * Factory method
+ * @return new instance of accept
+ */
+ RMAccept newAccept();
+
+ /**
+ * Setter
+ * @param accept
+ */
+ void setAccept(RMAccept accept);
+
+ /**
+ * Getter
+ * @return accept
+ */
+ RMAccept getAccept();
+
+ /**
+ * <p>This element, if present, enables an RM Destination to accept the offer of
a corresponding
+ * Sequence for the reliable exchange of messages Transmitted from RM Destination to
RM Source.</p>
+ *
+ * <p>Note: If a <b>CreateSequenceResponse</b> is returned without a
child Accept in response to a
+ * <b>CreateSequence</b> that did contain a child Offer, then the RM
Source MAY immediately reclaim
+ * any resources associated with the unused offered Sequence.</p>
+ */
+ interface RMAccept
+ {
+ /**
+ * <p>The RM Destination MUST include this element, of type
<b>wsa:EndpointReferenceType</b> (as
+ * specified by WS-Addressing). It specifies the endpoint reference to which
messages containing
+ * <b>SequenceAcknowledgement</b> 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();
+ }
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMCreateSequenceResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMIncompleteSequenceBehavior.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMIncompleteSequenceBehavior.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMIncompleteSequenceBehavior.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,87 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * <p>This element, if present, specifies the behavior that the destination will
exhibit upon the closure or
+ * termination of an incomplete Sequence. For the purposes of defining the values used,
the term
+ * "discard" refers to behavior equivalent to the Application Destination never
processing a particular message.</p>
+ *
+ * The following schema snippet defines allowed values:
+ * <p><blockquote><pre>
+ * <xs:simpleType name="IncompleteSequenceBehaviorType">
+ * <xs:restriction base="xs:string">
+ * <xs:enumeration
value="DiscardEntireSequence"/>
+ * <xs:enumeration
value="DiscardFollowingFirstGap"/>
+ * <xs:enumeration value="NoDiscard"/>
+ * </xs:restriction>
+ * </xs:simpleType>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public enum RMIncompleteSequenceBehavior
+{
+ /**
+ * A value of <b>"DiscardEntireSequence"</b> indicates
that the entire Sequence MUST be discarded if the
+ * Sequence is closed, or terminated, when there are one or more gaps in the final
<b>SequenceAcknowledgement</b>.
+ */
+ DISCARD_ENTIRE_SEQUENCE("DiscardEntireSequence"),
+
+ /**
+ * A value of <b>"DiscardFollowingFirstGap"</b>
indicates that messages in the Sequence beyond the first
+ * gap MUST be discarded when there are one or more gaps in the final
<b>SequenceAcknowledgement</b>.
+ */
+ DISCARD_FOLLOWING_FIRST_GAP("DiscardFollowingFirstGap"),
+
+ /**
+ * The default value of <b>"NoDiscard"</b> indicates
that no acknowledged messages in the Sequence will
+ * be discarded.
+ */
+ NO_DISCARD("NoDiscard");
+
+ private final String value;
+
+ RMIncompleteSequenceBehavior(String value)
+ {
+ this.value = value;
+ }
+
+ public String toString()
+ {
+ return value;
+ }
+
+ /**
+ * Returns this enum instance if value string matches, <b>null</b>
otherwise
+ * @param stringValue value in the form of string
+ * @return enum or null if string not recognized
+ */
+ public static RMIncompleteSequenceBehavior getValue(String stringValue)
+ {
+ if (DISCARD_ENTIRE_SEQUENCE.toString().equals(stringValue)) return
DISCARD_ENTIRE_SEQUENCE;
+ if (DISCARD_FOLLOWING_FIRST_GAP.toString().equals(stringValue)) return
DISCARD_FOLLOWING_FIRST_GAP;
+ if (NO_DISCARD.toString().equals(stringValue)) return NO_DISCARD;
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMIncompleteSequenceBehavior.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequence.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequence.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequence.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,86 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * <p><b>Sequence</b> protocol element associates the message in which
it is contained with a previously
+ * established RM Sequence. It contains the Sequence's unique identifier and the
containing
+ * message's ordinal position within that Sequence. The RM Destination MUST
understand the
+ * <b>Sequence</b> header block. The RM Source MUST assign a
<b>mustUnderstand</b> attribute with a
+ * value 1/true (from the namespace corresponding to the version of SOAP to which the
<b>Sequence</b>
+ * SOAP header block is bound) to the <b>Sequence</b> header block
element.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:Sequence ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:MessageNumber> wsrm:MessageNumberType
</wsrm:MessageNumber>
+ * <wsrm:LastMessage/> ?
+ * ...
+ * </wsrm:Sequence>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMSequence extends RMSerializable
+{
+ /**
+ * An RM Source that includes a <b>Sequence</b> header block in a SOAP
envelope MUST include this
+ * element in that header block. The RM Source MUST set the value of this element to
the absolute
+ * URI (conformant with RFC3986) that uniquely identifies the Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * The RM Source MUST include this element within any Sequence headers it creates.
This element
+ * is of type <b>MessageNumberType</b>. It represents the ordinal position
of the message within a
+ * Sequence. Sequence message numbers start at 1 and monotonically increase by 1
throughout
+ * the Sequence.
+ * @param messageNumber
+ */
+ void setMessageNumber(long messageNumber);
+
+ /**
+ * Getter
+ * @return message number within specified sequence
+ */
+ long getMessageNumber();
+
+ /**
+ * This element MAY be included by the RM Source endpoint. The
<b>LastMessage</b> element has no content.
+ * @param lastMessage
+ */
+ void setLastMessage();
+
+ /**
+ * Getter
+ * @return last message indicator
+ */
+ boolean isLastMessage();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceAcknowledgement.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceAcknowledgement.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceAcknowledgement.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,170 @@
+/*
+ * 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.protocol.spi;
+
+import java.util.List;
+
+/**
+ *
+ * <p><b>wsrm:SequenceAcknowledgement</b> element contains the sequence
acknowledgement information</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:SequenceAcknowledgement ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * [ [ [ <wsrm:AcknowledgementRange ...
+ * Upper="wsrm:MessageNumberType"
+ * Lower="wsrm:MessageNumberType"/> +
+ * | <wsrm:None/> ]
+ * <wsrm:Final/> ? ]
+ * | <wsrm:Nack> wsrm:MessageNumberType </wsrm:Nack> + ]
+ *
+ * ...
+ * </wsrm:SequenceAcknowledgement>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMSequenceAcknowledgement extends RMSerializable
+{
+ /**
+ * An RM Destination that includes a <b>SequenceAcknowledgement</b> header
block in a SOAP
+ * envelope MUST include this element in that header block. The RM Destination MUST
set the
+ * value of this element to the absolute URI (conformant with RFC3986) that uniquely
identifies the
+ * Sequence. The RM Destination MUST NOT include multiple
<b>SequenceAcknowledgement</b>
+ * header blocks that share the same value for <b>Identifier</b> within
the same SOAP envelope.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * The RM Destination MAY include this element within a
<b>SequenceAcknowledgement</b> header
+ * block. This element indicates that the RM Destination is not receiving new messages
for the
+ * specified Sequence. The RM Source can be assured that the ranges of messages
acknowledged
+ * by this SequenceAcknowledgement header block will not change in the future. The RM
+ * Destination MUST include this element when the Sequence is closed. The RM
Destination MUST
+ * NOT include this element when sending a <b>Nack</b>; it can only be
used when sending
+ * <b>AcknowledgementRange</b> elements or a <b>None</b>.
+ */
+ void setFinal();
+
+ /**
+ * Getter
+ * @return true if <b>SequenceAcknowledgement</b> is
<b>Final</b>, false otherwise
+ */
+ boolean isFinal();
+
+ /**
+ * The RM Destination MUST include this element within a
<b>SequenceAcknowledgement</b> header
+ * block if the RM Destination has not accepted any messages for the specified
Sequence. The RM
+ * Destination MUST NOT include this element if a sibling
<b>AcknowledgementRange</b> or <b>Nack</b>
+ * element is also present as a child of the
<b>SequenceAcknowledgement</b>.
+ */
+ void setNone();
+
+ /**
+ * Getter
+ * @return true if <b>SequenceAcknowledgement</b> is
<b>None</b>, false otherwise
+ */
+ boolean isNone();
+
+ /**
+ * The RM Destination MAY include this element within a
<b>SequenceAcknowledgement</b> header
+ * block. If used, the RM Destination MUST set the value of this element to a
<b>MessageNumberType</b>
+ * representing the <b>MessageNumber</b> of an unreceived message in a
Sequence. The RM Destination
+ * MUST NOT include a <b>Nack</b> element if a sibling
<b>AcknowledgementRange</b> or <b>None</b> element is
+ * also present as a child of <b>SequenceAcknowledgement</b>. Upon the
receipt of a <b>Nack</b>, an RM
+ * Source SHOULD retransmit the message identified by the <b>Nack</b>. The
RM Destination MUST NOT
+ * issue a <b>SequenceAcknowledgement</b> containing a
<b>Nack</b> for a message that it has previously
+ * acknowledged within an <b>AcknowledgementRange</b>. The RM Source
SHOULD ignore a
+ * <b>SequenceAcknowledgement</b> containing a <b>Nack</b> for
a message that has previously been
+ * acknowledged within an <b>AcknowledgementRange</b>.
+ * @param messageNumber
+ */
+ void addNack(long messageNumber);
+
+ /**
+ * Getter
+ * @return list of not ackonwledged message numbers
+ */
+ List<Long> getNacks();
+
+ /**
+ * Factory method
+ * @return new instance of AcknowledgementRange
+ */
+ RMAcknowledgementRange newAcknowledgementRange();
+
+ /**
+ * Setter
+ * @param acknowledgementRange
+ */
+ void addAcknowledgementRange(RMAcknowledgementRange acknowledgementRange);
+
+ /**
+ * Getter
+ * @return list of acknowledged ranges
+ */
+ List<RMAcknowledgementRange> getAcknowledgementRanges();
+
+ /**
+ * The RM Destination MAY include one or more instances of this element within a
+ * <b>SequenceAcknowledgement</b> header block. It contains a range of
Sequence message numbers
+ * successfully accepted by the RM Destination. The ranges MUST NOT overlap. The RM
+ * Destination MUST NOT include this element if a sibling <b>Nack</b> or
<b>None</b> element is also present as
+ * a child of <b>SequenceAcknowledgement</b>.
+ */
+ interface RMAcknowledgementRange
+ {
+ /**
+ * The RM Destination MUST set the value of this attribute equal to the message
number of the
+ * highest contiguous message in a Sequence range accepted by the RM Destination.
+ * @param upper
+ */
+ void setUpper(long upper);
+
+ /**
+ * Getter
+ * @return upper value
+ */
+ long getUpper();
+
+ /**
+ * The RM Destination MUST set the value of this attribute equal to the message
number of the
+ * lowest contiguous message in a Sequence range accepted by the RM Destination.
+ * @param lower
+ */
+ void setLower(long lower);
+
+ /**
+ * Getter
+ * @return lower value
+ */
+ long getLower();
+ }
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceAcknowledgement.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFault.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFault.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFault.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,69 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * <p><b>SequenceFault</b> element purpose is to carry the specific
details of a fault generated during the
+ * reliable messaging specific processing of a message belonging to a Sequence.
WS-ReliableMessaging
+ * nodes MUST use the <b>SequenceFault</b> container only in conjunction with
the SOAP 1.1 fault mechanism.
+ * WS-ReliableMessaging nodes MUST NOT use the <b>SequenceFault</b> container
in conjunction with the
+ * SOAP 1.2 binding.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <SequenceFault ...>
+ * <wsrm:FaultCode> wsrm:FaultCode </wsrm:FaultCode>
+ * <wsrm:Detail> ... </wsrm:Detail> ?
+ * ...
+ * </SequenceFault>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMSequenceFault extends RMSerializable
+{
+ /**
+ * WS-ReliableMessaging nodes that generate a <b>SequenceFault</b> MUST
set the value of this
+ * element to a qualified name from the set of faults [Subcodes] defined below.
+ * @param faultCode
+ */
+ void setFaultCode(RMSequenceFaultCode faultCode);
+
+ /**
+ * Getter
+ * @return sequence fault code
+ */
+ RMSequenceFaultCode getFaultCode();
+
+ /**
+ * This element, if present, carries application specific error information
+ * related to the fault being described.
+ * @param detail
+ */
+ void setDetail(Exception detail);
+
+ /**
+ * Getter
+ * @return application specific fault detail
+ */
+ Exception getDetail();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFault.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFaultCode.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFaultCode.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFaultCode.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,85 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * WS-ReliableMessaging nodes that generate a <b>SequenceFault</b> MUST set
the value of this
+ * element to a qualified name from the set of faults [Subcodes] defined below.
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public enum RMSequenceFaultCode
+{
+
+ /**
+ * Sequence terminated
+ */
+ SEQUENCE_TERMINATED("SequenceTerminated"),
+
+ /**
+ * Unknown sequence
+ */
+ UNKNOWN_SEQUENCE("UnknownSequence"),
+
+ /**
+ * Invalid acknowledgement
+ */
+ INVALID_ACKNOWLEDGEMENT("InvalidAcknowledgement"),
+
+ /**
+ * Message number rollover
+ */
+ MESSAGE_NUMBER_ROLLOVER("MessageNumberRollover"),
+
+ /**
+ * Create sequence refused
+ */
+ CREATE_SEQUENCE_REFUSED("CreateSequenceRefused"),
+
+ /**
+ * Sequence closed
+ */
+ SEQUENCE_CLOSED("SequenceClosed"),
+
+ /**
+ * WSRM required
+ */
+ WSRM_REQUIRED("WSRMRequired"),
+
+ /**
+ * Last message number exceeded
+ */
+ LAST_MESSAGE_NUMBER_EXCEEDED("LastMessageNumberExceeded");
+
+ private final String value;
+
+ RMSequenceFaultCode(String value)
+ {
+ this.value = value;
+ }
+
+ public final String getValue()
+ {
+ return this.value;
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSequenceFaultCode.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSerializable.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSerializable.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSerializable.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,55 @@
+/*
+ * 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.protocol.spi;
+
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ws.extensions.wsrm.api.RMException;
+
+/**
+ * This interface identifies classes that are de/serializable from/to SOAP messages
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMSerializable
+{
+
+ /**
+ * Serialize object instance to SOAP message
+ * @param soapMessage
+ * @throws RMException is something went wrong
+ */
+ void serializeTo(SOAPMessage soapMessage) throws RMException;
+
+ /**
+ * Deserialize object instance from SOAP message
+ * @param soapMessage ReliableMessagingException is something went wrong
+ */
+ void deserializeFrom(SOAPMessage soapMessage) throws RMException;
+
+ /**
+ * Validate object state if everything is all right
+ * @throws RMException if object is in incorrect state
+ */
+ void validate() throws RMException;
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMSerializable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequence.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequence.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequence.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,78 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * <p><b>TerminateSequence</b> MAY be sent by an RM Source to indicate
it has completed its use of the Sequence.
+ * It indicates that the RM Destination can safely reclaim any resources related to the
identified
+ * Sequence. The RM Source MUST NOT send this element as a header block. The RM Source
+ * MAY retransmit this element. Once this element is sent, other than this element, the
RM Source
+ * MUST NOT send any additional message to the RM Destination referencing this
Sequence.</p>
+ *
+ * <p>This element MAY also be sent by the RM Destination to indicate that it has
unilaterally
+ * terminated the Sequence. Upon sending this message the RM Destination MUST NOT accept
+ * any additional messages (with the exception of the corresponding
+ * <b>TerminateSequenceResponse</b>) for this Sequence. Upon receipt of a
<b>TerminateSequence</b>
+ * the RM Source MUST NOT send any additional messages (with the exception of the
+ * corresponding <b>TerminateSequenceResponse</b>) for this
Sequence.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:TerminateSequence ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:LastMsgNumber> wsrm:MessageNumberType
</wsrm:LastMsgNumber> ?
+ * ...
+ * </wsrm:TerminateSequence>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMTerminateSequence extends RMSerializable
+{
+ /**
+ * The RM Source or RM Destination MUST include this element in any TerminateSequence
+ * message it sends. The RM Source or RM Destination MUST set the value of this
element to the
+ * absolute URI (conformant with RFC3986) of the terminating Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * The RM Source SHOULD include this element in any TerminateSequence message it
sends. The
+ * <b>LastMsgNumber</b> element specifies the highest assigned message
number of all the Sequence
+ * Traffic Messages for the terminating Sequence.
+ * @param lastMsgNumber
+ */
+ void setLastMsgNumber(long lastMsgNumber);
+
+ /**
+ * Getter
+ * @return last message number
+ */
+ long getLastMsgNumber();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequenceResponse.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequenceResponse.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequenceResponse.java 2008-03-10
13:27:04 UTC (rev 5907)
@@ -0,0 +1,54 @@
+/*
+ * 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.protocol.spi;
+
+/**
+ * <p><b>TerminateSequenceResponse</b> is sent in the body of a message
in response to receipt of a <b>TerminateSequence</b>
+ * request message. It indicates that the responder has terminated the Sequence. The
responder
+ * MUST NOT send this element as a header block.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:TerminateSequenceResponse ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * ...
+ * </wsrm:TerminateSequenceResponse>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RMTerminateSequenceResponse extends RMSerializable
+{
+ /**
+ * The responder (RM Source or RM Destination) MUST include this element in any
+ * <b>TerminateSequenceResponse</b> message it sends. The responder MUST
set the value of this
+ * element to the absolute URI (conformant with RFC3986) of the terminating Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/protocol/spi/RMTerminateSequenceResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF