Author: richard.opalka(a)jboss.com
Date: 2007-09-05 10:06:53 -0400 (Wed, 05 Sep 2007)
New Revision: 4523
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/AbstractSerializable.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/ConstantsImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Constants.java
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/ProviderImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/ProviderImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java
Log:
refactoring - moving serialization to abstract class + added provider specific constants
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/AbstractSerializable.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/AbstractSerializable.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/AbstractSerializable.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -0,0 +1,65 @@
+/*
+ * 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.common;
+
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
+
+/**
+ * Utility class which should be used by all WS-RM protocol providers.
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable
+ */
+public abstract class AbstractSerializable implements Serializable
+{
+
+ protected AbstractSerializable()
+ {
+ // intended to be overriden
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
+ */
+ public final void deserializeFrom(SOAPMessage soapMessage)
+ {
+ // TODO: implement deserialization using object set methods
+ if (true) throw new NotImplementedException();
+ validate();
+ }
+
+ /*
+ * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
+ */
+ public final void serializeTo(SOAPMessage soapMessage)
+ {
+ validate();
+ // TODO implement serialization using object instance fields
+ throw new NotImplementedException();
+ }
+
+ public abstract Provider getProvider();
+
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/AbstractSerializable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/ConstantsImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/ConstantsImpl.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/ConstantsImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -0,0 +1,336 @@
+/*
+ * 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.common;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.extensions.wsrm.spi.Constants;
+
+/**
+ * Utility class which should be used by all WS-RM protocol providers.
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants
+ */
+public final class ConstantsImpl implements Constants
+{
+ // default namespace prefix
+ private static final String WSRM_PREFIX = "wsrm";
+ // heavily used constants
+ private final QName acceptQName;
+ private final QName ackRequestedQName;
+ private final QName acknowledgementRangeQName;
+ private final QName acksToQName;
+ private final QName closeSequenceQName;
+ private final QName closeSequenceResponseQName;
+ private final QName createSequenceQName;
+ private final QName createSequenceResponseQName;
+ private final QName detailQName;
+ private final QName endpointQName;
+ private final QName expiresQName;
+ private final QName faultCodeQName;
+ private final QName finalQName;
+ private final QName identifierQName;
+ private final QName incompleteSequenceBehaviorQName;
+ private final QName lastMessageNumberQName;
+ private final QName lastMessageQName;
+ private final QName lastMsgNumberQName;
+ private final QName lowerQName;
+ private final QName messageNumberQName;
+ private final QName nackQName;
+ private final QName noneQName;
+ private final QName offerQName;
+ private final QName sequenceAcknowledgementQName;
+ private final QName sequenceFaultQName;
+ private final QName equenceQName;
+ private final QName terminateSequenceQName;
+ private final QName terminateSequenceResponseQName;
+ private final QName upperQName;
+
+ public ConstantsImpl(String namespace)
+ {
+ if ((namespace == null) || (namespace.trim().equals("")))
+ throw new IllegalArgumentException();
+
+ acceptQName = new QName(WSRM_PREFIX, namespace, "Accept");
+ ackRequestedQName = new QName(WSRM_PREFIX, namespace, "AckRequested");
+ acknowledgementRangeQName = new QName(WSRM_PREFIX, namespace,
"AcknowledgementRange");
+ acksToQName = new QName(WSRM_PREFIX, namespace, "AcksTo");
+ closeSequenceQName = new QName(WSRM_PREFIX, namespace, "CloseSequence");
+ closeSequenceResponseQName = new QName(WSRM_PREFIX, namespace,
"CloseSequenceResponse");
+ createSequenceQName = new QName(WSRM_PREFIX, namespace,
"CreateSequence");
+ createSequenceResponseQName = new QName(WSRM_PREFIX, namespace,
"CreateSequenceResponse");
+ detailQName = new QName(WSRM_PREFIX, namespace, "Detail");
+ endpointQName = new QName(WSRM_PREFIX, namespace, "Endpoint");
+ expiresQName = new QName(WSRM_PREFIX, namespace, "Expires");
+ faultCodeQName = new QName(WSRM_PREFIX, namespace, "FaultCode");
+ finalQName = new QName(WSRM_PREFIX, namespace, "Final");
+ identifierQName = new QName(WSRM_PREFIX, namespace, "Identifier");
+ incompleteSequenceBehaviorQName = new QName(WSRM_PREFIX, namespace,
"IncompleteSequenceBehavior");
+ lastMessageNumberQName = new QName(WSRM_PREFIX, namespace,
"LastMessageNumber");
+ lastMessageQName = new QName(WSRM_PREFIX, namespace, "LastMessage");
+ lastMsgNumberQName = new QName(WSRM_PREFIX, namespace, "LastMsgNumber");
+ lowerQName = new QName(WSRM_PREFIX, namespace, "Lower");
+ messageNumberQName = new QName(WSRM_PREFIX, namespace, "MessageNumber");
+ nackQName = new QName(WSRM_PREFIX, namespace, "Nack");
+ noneQName = new QName(WSRM_PREFIX, namespace, "None");
+ offerQName = new QName(WSRM_PREFIX, namespace, "Offer");
+ sequenceAcknowledgementQName = new QName(WSRM_PREFIX, namespace,
"SequenceAcknowledgement");
+ sequenceFaultQName = new QName(WSRM_PREFIX, namespace, "SequenceFault");
+ equenceQName = new QName(WSRM_PREFIX, namespace, "Sequence");
+ terminateSequenceQName = new QName(WSRM_PREFIX, namespace,
"TerminateSequence");
+ terminateSequenceResponseQName = new QName(WSRM_PREFIX, namespace,
"TerminateSequenceResponse");
+ upperQName = new QName(WSRM_PREFIX, namespace, "Upper");
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getAcceptQName()
+ */
+ public final QName getAcceptQName()
+ {
+ return acceptQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getAckRequestedQName()
+ */
+ public final QName getAckRequestedQName()
+ {
+ return ackRequestedQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getAcknowledgementRangeQName()
+ */
+ public final QName getAcknowledgementRangeQName()
+ {
+ return acknowledgementRangeQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getAcksToQName()
+ */
+ public final QName getAcksToQName()
+ {
+ return acksToQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getCloseSequenceQName()
+ */
+ public final QName getCloseSequenceQName()
+ {
+ return closeSequenceQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getCloseSequenceResponseQName()
+ */
+ public final QName getCloseSequenceResponseQName()
+ {
+ return closeSequenceResponseQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getCreateSequenceQName()
+ */
+ public final QName getCreateSequenceQName()
+ {
+ return createSequenceQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getCreateSequenceResponseQName()
+ */
+ public final QName getCreateSequenceResponseQName()
+ {
+ return createSequenceResponseQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getDetailQName()
+ */
+ public final QName getDetailQName()
+ {
+ return detailQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getEndpointQName()
+ */
+ public final QName getEndpointQName()
+ {
+ return endpointQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getExpiresQName()
+ */
+ public final QName getExpiresQName()
+ {
+ return expiresQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getFaultCodeQName()
+ */
+ public final QName getFaultCodeQName()
+ {
+ return faultCodeQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getFinalQName()
+ */
+ public final QName getFinalQName()
+ {
+ return finalQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getIdentifierQName()
+ */
+ public final QName getIdentifierQName()
+ {
+ return identifierQName;
+ }
+
+ /**
+ * @see
org.jboss.ws.extensions.wsrm.spi.Constants#getIncompleteSequenceBehaviorQName()
+ */
+ public final QName getIncompleteSequenceBehaviorQName()
+ {
+ return incompleteSequenceBehaviorQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getLastMessageNumberQName()
+ */
+ public final QName getLastMessageNumberQName()
+ {
+ return lastMessageNumberQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getLastMessageQName()
+ */
+ public final QName getLastMessageQName()
+ {
+ return lastMessageQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getLastMsgNumberQName()
+ */
+ public final QName getLastMsgNumberQName()
+ {
+ return lastMsgNumberQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getLowerQName()
+ */
+ public final QName getLowerQName()
+ {
+ return lowerQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getMessageNumberQName()
+ */
+ public final QName getMessageNumberQName()
+ {
+ return messageNumberQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getNackQName()
+ */
+ public final QName getNackQName()
+ {
+ return nackQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getNoneQName()
+ */
+ public final QName getNoneQName()
+ {
+ return noneQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getOfferQName()
+ */
+ public final QName getOfferQName()
+ {
+ return offerQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getSequenceAcknowledgementQName()
+ */
+ public final QName getSequenceAcknowledgementQName()
+ {
+ return sequenceAcknowledgementQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getSequenceFaultQName()
+ */
+ public final QName getSequenceFaultQName()
+ {
+ return sequenceFaultQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getSequenceQName()
+ */
+ public final QName getSequenceQName()
+ {
+ return equenceQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getTerminateSequenceQName()
+ */
+ public final QName getTerminateSequenceQName()
+ {
+ return terminateSequenceQName;
+ }
+
+ /**
+ * @see
org.jboss.ws.extensions.wsrm.spi.Constants#getTerminateSequenceResponseQName()
+ */
+ public final QName getTerminateSequenceResponseQName()
+ {
+ return terminateSequenceResponseQName;
+ }
+
+ /**
+ * @see org.jboss.ws.extensions.wsrm.spi.Constants#getUpperQName()
+ */
+ public final QName getUpperQName()
+ {
+ return upperQName;
+ }
+
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/ConstantsImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested
*/
-final class AckRequestedImpl implements AckRequested
+final class AckRequestedImpl extends AbstractSerializable implements AckRequested
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
private long lastMessageNumber;
@@ -119,29 +122,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,18 +21,21 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence
*/
-final class CreateSequenceImpl implements CreateSequence
+final class CreateSequenceImpl extends AbstractSerializable implements CreateSequence
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String acksTo;
private String expires;
private Offer offer;
@@ -169,29 +172,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.acksTo == null)
throw new IllegalStateException();
}
@@ -199,7 +187,7 @@
/*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer
*/
- private static final class OfferImpl implements CreateSequence.Offer
+ private static class OfferImpl implements CreateSequence.Offer
{
private String duration;
@@ -326,32 +314,6 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
- {
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
- }
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
- {
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
- if (this.identifier == null)
- throw new IllegalStateException();
- }
-
}
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,18 +21,21 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse
*/
-final class CreateSequenceResponseImpl implements CreateSequenceResponse
+final class CreateSequenceResponseImpl extends AbstractSerializable implements
CreateSequenceResponse
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
private String expires;
private Accept accept;
@@ -183,29 +186,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
@@ -213,7 +201,7 @@
/*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept
*/
- private static final class AcceptImpl implements CreateSequenceResponse.Accept
+ private static class AcceptImpl implements CreateSequenceResponse.Accept
{
private String acksTo;
@@ -274,32 +262,6 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
- {
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
- }
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
- {
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
- if (this.acksTo == null)
- throw new IllegalStateException();
- }
-
}
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/ProviderImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/ProviderImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/ProviderImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,8 +21,10 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
+import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.MessageFactory;
import org.jboss.ws.extensions.wsrm.spi.Provider;
+import org.jboss.ws.extensions.wsrm.common.ConstantsImpl;
/*
* @author richard.opalka(a)jboss.com
@@ -31,7 +33,8 @@
public final class ProviderImpl extends Provider
{
- static final String IMPLEMENTATION_VERSION =
"http://schemas.xmlsoap.org/ws/2005/02/rm";
+ private static final String IMPLEMENTATION_VERSION =
"http://schemas.xmlsoap.org/ws/2005/02/rm";
+ private static final Constants CONSTANTS = new ConstantsImpl(IMPLEMENTATION_VERSION);
private static final Provider INSTANCE = new ProviderImpl();
private ProviderImpl()
@@ -41,7 +44,7 @@
public static Provider getInstance()
{
- return INSTANCE;
+ return INSTANCE;
}
/*
@@ -54,6 +57,15 @@
}
/*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getConstants()
+ */
+ @Override
+ public Constants getConstants()
+ {
+ return CONSTANTS;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.Provider#getNamespaceURI()
*/
@Override
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -25,18 +25,20 @@
import java.util.LinkedList;
import java.util.Collections;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
-import javax.xml.soap.SOAPMessage;
-
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement
*/
-final class SequenceAcknowledgementImpl implements SequenceAcknowledgement
+final class SequenceAcknowledgementImpl extends AbstractSerializable implements
SequenceAcknowledgement
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private final List<Long> nacks = new LinkedList<Long>();
private final List<AcknowledgementRange> acknowledgementRanges = new
LinkedList<AcknowledgementRange>();
private String identifier;
@@ -203,29 +205,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if ((this.acknowledgementRanges.size() == 0) && (this.nacks.size() == 0))
throw new IllegalStateException();
}
@@ -240,7 +227,7 @@
"Overlap detected: " + currentRange + " vs. " +
newRange);
}
- private static final class AcknowledgementRangeImpl implements
SequenceAcknowledgement.AcknowledgementRange
+ private static class AcknowledgementRangeImpl implements
SequenceAcknowledgement.AcknowledgementRange
{
private long lower;
@@ -325,39 +312,11 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
- {
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
- }
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
- {
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
public String toString()
{
return "<" + lower + "; " + upper + ">";
}
- private void ensureLegalState()
- {
- if (this.lower == 0)
- throw new IllegalStateException();
- if (this.upper == 0)
- throw new IllegalStateException();
- }
-
}
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,18 +21,21 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFaultCode;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault
*/
-final class SequenceFaultImpl implements SequenceFault
+final class SequenceFaultImpl extends AbstractSerializable implements SequenceFault
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private SequenceFaultCode faultCode;
private Exception detail;
@@ -125,29 +128,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.faultCode == null)
throw new IllegalStateException();
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
-import javax.xml.soap.SOAPMessage;
-import org.jboss.util.NotImplementedException;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence
*/
-final class SequenceImpl implements Sequence
+final class SequenceImpl extends AbstractSerializable implements Sequence
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
private long messageNumber;
private boolean isLastMessage;
@@ -139,29 +142,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
if (this.messageNumber == 0)
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence
*/
-final class TerminateSequenceImpl implements TerminateSequence
+final class TerminateSequenceImpl extends AbstractSerializable implements
TerminateSequence
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
TerminateSequenceImpl()
@@ -110,29 +113,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested
*/
-final class AckRequestedImpl implements AckRequested
+final class AckRequestedImpl extends AbstractSerializable implements AckRequested
{
-
+
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
AckRequestedImpl()
@@ -110,29 +113,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence
*/
-final class CloseSequenceImpl implements CloseSequence
+final class CloseSequenceImpl extends AbstractSerializable implements CloseSequence
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
private long lastMsgNumber;
@@ -119,29 +122,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse
*/
-final class CloseSequenceResponseImpl implements CloseSequenceResponse
+final class CloseSequenceResponseImpl extends AbstractSerializable implements
CloseSequenceResponse
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
CloseSequenceResponseImpl()
@@ -94,29 +97,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,18 +21,21 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence
*/
-final class CreateSequenceImpl implements CreateSequence
+final class CreateSequenceImpl extends AbstractSerializable implements CreateSequence
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String acksTo;
private String expires;
private Offer offer;
@@ -170,28 +173,13 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.acksTo == null)
throw new IllegalStateException();
}
@@ -199,7 +187,7 @@
/*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer
*/
- private static final class OfferImpl implements CreateSequence.Offer
+ private static class OfferImpl implements CreateSequence.Offer
{
private String endpoint;
@@ -354,34 +342,6 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
- {
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
- }
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
- {
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
- if (this.identifier == null)
- throw new IllegalStateException();
- if (this.endpoint == null)
- throw new IllegalStateException();
- }
-
}
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,18 +21,21 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse
*/
-final class CreateSequenceResponseImpl implements CreateSequenceResponse
+final class CreateSequenceResponseImpl extends AbstractSerializable implements
CreateSequenceResponse
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
private String expires;
private Accept accept;
@@ -197,29 +200,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
@@ -227,7 +215,7 @@
/*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept
*/
- private static final class AcceptImpl implements CreateSequenceResponse.Accept
+ private static class AcceptImpl implements CreateSequenceResponse.Accept
{
private String acksTo;
@@ -288,32 +276,6 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
- {
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
- }
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
- {
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
- if (this.acksTo == null)
- throw new IllegalStateException();
- }
-
}
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/ProviderImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/ProviderImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/ProviderImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.common.ConstantsImpl;
+import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.MessageFactory;
import org.jboss.ws.extensions.wsrm.spi.Provider;
@@ -31,7 +33,8 @@
public final class ProviderImpl extends Provider
{
- static final String IMPLEMENTATION_VERSION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702";
+ private static final String IMPLEMENTATION_VERSION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702";
+ private static final Constants CONSTANTS = new ConstantsImpl(IMPLEMENTATION_VERSION);
private static final Provider INSTANCE = new ProviderImpl();
private ProviderImpl()
@@ -41,7 +44,7 @@
public static Provider getInstance()
{
- return INSTANCE;
+ return INSTANCE;
}
/*
@@ -52,6 +55,15 @@
{
return MessageFactoryImpl.getInstance();
}
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getConstants()
+ */
+ @Override
+ public Constants getConstants()
+ {
+ return CONSTANTS;
+ }
/*
* @see org.jboss.ws.extensions.wsrm.spi.Provider#getNamespaceURI()
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -25,18 +25,20 @@
import java.util.LinkedList;
import java.util.Collections;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
-import javax.xml.soap.SOAPMessage;
-
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement
*/
-final class SequenceAcknowledgementImpl implements SequenceAcknowledgement
+final class SequenceAcknowledgementImpl extends AbstractSerializable implements
SequenceAcknowledgement
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private final List<Long> nacks = new LinkedList<Long>();
private final List<AcknowledgementRange> acknowledgementRanges = new
LinkedList<AcknowledgementRange>();
private String identifier;
@@ -225,29 +227,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if ((this.acknowledgementRanges.size() == 0) && (this.nacks.size() == 0)
&& (!this.isNone))
throw new IllegalStateException();
}
@@ -262,7 +249,7 @@
"Overlap detected: " + currentRange + " vs. " +
newRange);
}
- private static final class AcknowledgementRangeImpl implements
SequenceAcknowledgement.AcknowledgementRange
+ private static class AcknowledgementRangeImpl implements
SequenceAcknowledgement.AcknowledgementRange
{
private long lower;
@@ -347,39 +334,11 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
- {
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
- }
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
- {
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
public String toString()
{
return "<" + lower + "; " + upper + ">";
}
- private void ensureLegalState()
- {
- if (this.lower == 0)
- throw new IllegalStateException();
- if (this.upper == 0)
- throw new IllegalStateException();
- }
-
}
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,18 +21,21 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFaultCode;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault
*/
-final class SequenceFaultImpl implements SequenceFault
+final class SequenceFaultImpl extends AbstractSerializable implements SequenceFault
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private SequenceFaultCode faultCode;
private Exception detail;
@@ -126,28 +129,13 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.faultCode == null)
throw new IllegalStateException();
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
-import javax.xml.soap.SOAPMessage;
-import org.jboss.util.NotImplementedException;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence
*/
-final class SequenceImpl implements Sequence
+final class SequenceImpl extends AbstractSerializable implements Sequence
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
private long messageNumber;
@@ -135,29 +138,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
if (this.messageNumber == 0)
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence
*/
-final class TerminateSequenceImpl implements TerminateSequence
+final class TerminateSequenceImpl extends AbstractSerializable implements
TerminateSequence
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
private long lastMsgNumber;
@@ -119,29 +122,14 @@
return false;
return true;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -21,17 +21,20 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.extensions.wsrm.common.AbstractSerializable;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse;
-import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse
*/
-final class TerminateSequenceResponseImpl implements TerminateSequenceResponse
+final class TerminateSequenceResponseImpl extends AbstractSerializable implements
TerminateSequenceResponse
{
+ // provider used by de/serialization framework
+ private static final Provider PROVIDER = ProviderImpl.getInstance();
+ // internal fields
private String identifier;
TerminateSequenceResponseImpl()
@@ -95,28 +98,13 @@
return true;
}
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
- */
- public void deserializeFrom(SOAPMessage soapMessage)
+ public Provider getProvider()
{
- // TODO: implement deserialization using object set methods
- if (true) throw new NotImplementedException();
- ensureLegalState();
+ return PROVIDER;
}
-
- /*
- * @see
org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
- */
- public void serializeTo(SOAPMessage soapMessage)
+
+ public void validate()
{
- ensureLegalState();
- // TODO implement serialization using object instance fields
- throw new NotImplementedException();
- }
-
- private void ensureLegalState()
- {
if (this.identifier == null)
throw new IllegalStateException();
}
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Constants.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Constants.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Constants.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.wsrm.spi;
+
+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 Constants
+{
+
+ /**
+ * 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>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/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Constants.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -38,10 +38,12 @@
{
REGISTERED_PROVIDERS.put(
org.jboss.ws.extensions.wsrm.spec200702.ProviderImpl.getInstance().getNamespaceURI(),
- org.jboss.ws.extensions.wsrm.spec200702.ProviderImpl.getInstance());
+ org.jboss.ws.extensions.wsrm.spec200702.ProviderImpl.getInstance()
+ );
REGISTERED_PROVIDERS.put(
org.jboss.ws.extensions.wsrm.spec200502.ProviderImpl.getInstance().getNamespaceURI(),
- org.jboss.ws.extensions.wsrm.spec200502.ProviderImpl.getInstance());
+ org.jboss.ws.extensions.wsrm.spec200502.ProviderImpl.getInstance()
+ );
}
/**
@@ -65,12 +67,18 @@
public abstract MessageFactory getMessageFactory();
/**
+ * Returns WS-RM provider specific constants
+ * @return constants
+ */
+ public abstract Constants getConstants();
+
+ /**
* Gets WS-RM provider by <b>wsrmNamespace</b>
* @param namespace associated with the WS-RM provider
* @return WS-RM provider instance
* @throws IllegalArgumentException if specified <b>wsrmNamespace</b> has
no associated WS-RM provider
*/
- public static Provider getInstance(String wsrmNamespace)
+ public static final Provider getInstance(String wsrmNamespace)
{
if (!REGISTERED_PROVIDERS.keySet().contains(wsrmNamespace))
throw new IllegalArgumentException("No WS-RM provider registered for
namespace " + wsrmNamespace);
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -106,7 +106,7 @@
* 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 Offer extends Serializable
+ interface Offer
{
/**
* The RM Source MUST set the value of this element to an absolute URI (conformant
with
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -119,7 +119,7 @@
* <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 Accept extends Serializable
+ interface Accept
{
/**
* <p>The RM Destination MUST include this element, of type
<b>wsa:EndpointReferenceType</b> (as
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -139,7 +139,7 @@
* 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 AcknowledgementRange extends Serializable
+ interface AcknowledgementRange
{
/**
* The RM Destination MUST set the value of this attribute equal to the message
number of the
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java 2007-09-04
15:28:06 UTC (rev 4522)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java 2007-09-05
14:06:53 UTC (rev 4523)
@@ -30,6 +30,7 @@
*/
public interface Serializable
{
+
/**
* Serialize object instance to SOAP message
* @param soapMessage
@@ -41,4 +42,10 @@
* @param soapMessage
*/
void deserializeFrom(SOAPMessage soapMessage);
+
+ /**
+ * Validate object state if everything is all right
+ */
+ void validate();
+
}