JBossWS SVN: r4522 - in stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm: deserialization and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-04 11:28:06 -0400 (Tue, 04 Sep 2007)
New Revision: 4522
Added:
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/deserialization/
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/deserialization/WSRMDeSerializationTestCase.java
Log:
adding new test
Added: stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/deserialization/WSRMDeSerializationTestCase.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/deserialization/WSRMDeSerializationTestCase.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/deserialization/WSRMDeSerializationTestCase.java 2007-09-04 15:28:06 UTC (rev 4522)
@@ -0,0 +1,247 @@
+package org.jboss.test.ws.jaxws.wsrm.deserialization;
+
+import java.io.ByteArrayInputStream;
+import javax.xml.soap.SOAPMessage;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
+import org.jboss.ws.extensions.wsrm.spi.MessageFactory;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
+import org.jboss.wsf.test.JBossWSTest;
+
+public final class WSRMDeSerializationTestCase extends JBossWSTest
+{
+ private static final String WSRM_200702_NS = "http://docs.oasis-open.org/ws-rx/wsrm/200702";
+ private static final MessageFactory WSRM_200702_FACTORY = Provider.getInstance(WSRM_200702_NS).getMessageFactory();
+
+ private static final String CREATE_SEQUENCE_MESSAGE
+ = "<soap:Envelope "
+ + " xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\""
+ + " xmlns:wsrm=\"http://docs.oasis-open.org/ws-rx/wsrm/200702\""
+ + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
+ + " <soap:Header>"
+ + " <wsa:MessageID>http://Business456.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:MessageID>"
+ + " <wsa:To>http://example.com/serviceB/123</wsa:To>"
+ + " <wsa:Action>http://docs.oasis-open.org/ws-rx/wsrm/200702/CreateSequence</wsa:Action>"
+ + " <wsa:ReplyTo>"
+ + " <wsa:Address>http://Business456.com/serviceA/789</wsa:Address>"
+ + " </wsa:ReplyTo>"
+ + " </soap:Header>"
+ + " <soap:Body>"
+ + " <wsrm:CreateSequence>"
+ + " <wsrm:AcksTo>"
+ + " <wsa:Address>http://Business456.com/serviceA/789</wsa:Address>"
+ + " </wsrm:AcksTo>"
+ + " <wsrm:Expires>PT0S</wsrm:Expires>"
+ + " <wsrm:Offer>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " <wsrm:Endpoint>http://Business456.com/serviceA/ASDF</wsrm:Endpoint>"
+ + " <wsrm:Expires>PT1S</wsrm:Expires>"
+ + " <wsrm:IncompleteSequenceBehavior>DiscardEntireSequence</wsrm:IncompleteSequenceBehavior>"
+ + " </wsrm:Offer>"
+ + " </wsrm:CreateSequence>"
+ + " </soap:Body>"
+ + "</soap:Envelope>";
+
+ private static final String createSequenceResponseMessage
+ = "<soap:Envelope"
+ + " xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\""
+ + " xmlns:wsrm=\"http://docs.oasis-open.org/ws-rx/wsrm/200702\""
+ + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
+ + " <soap:Header>"
+ + " <wsa:To>http://Business456.com/serviceA/789</wsa:To>"
+ + " <wsa:RelatesTo>http://Business456.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:RelatesTo>"
+ + " <wsa:Action>http://docs.oasis-open.org/ws-rx/wsrm/200702/CreateSequenceResponse</wsa:Action>"
+ + " </soap:Header>"
+ + " <soap:Body>"
+ + " <wsrm:CreateSequenceResponse>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " </wsrm:CreateSequenceResponse>"
+ + " </soap:Body>"
+ + "</soap:Envelope>";
+
+ private static final String sequencePlusAckRequestedMessage
+ = "<soap:Envelope"
+ + " xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\""
+ + " xmlns:wsrm=\"http://docs.oasis-open.org/ws-rx/wsrm/200702\""
+ + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
+ + " <soap:Header>"
+ + " <wsa:MessageID>http://Business456.com/guid/71e0654e-5ce8-477b-bb9d</wsa:MessageID>"
+ + " <wsa:To>http://example.com/serviceB/123</wsa:To>"
+ + " <wsa:From>"
+ + " <wsa:Address>http://Business456.com/serviceA/789</wsa:Address>"
+ + " </wsa:From>"
+ + " <wsa:Action>http://example.com/serviceB/123/request</wsa:Action>"
+ + " <wsrm:Sequence>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " <wsrm:MessageNumber>1</wsrm:MessageNumber>"
+ + " </wsrm:Sequence>"
+ + " <wsrm:AckRequested>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " </wsrm:AckRequested>"
+ + " </soap:Header>"
+ + " <soap:Body><!-- Some Application Data --></soap:Body>"
+ + "</soap:Envelope>";
+
+ private static final String sequenceAcknowledgementMessage
+ = "<soap:Envelope"
+ + " xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\""
+ + " xmlns:wsrm=\"http://docs.oasis-open.org/ws-rx/wsrm/200702\""
+ + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
+ + " <soap:Header>"
+ + " <wsa:MessageID>http://example.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:MessageID>"
+ + " <wsa:To>http://Business456.com/serviceA/789</wsa:To>"
+ + " <wsa:From>"
+ + " <wsa:Address>http://example.com/serviceB/123</wsa:Address>"
+ + " </wsa:From>"
+ + " <wsa:Action>http://docs.oasis-open.org/ws-rx/wsrm/200702/SequenceAcknowledgement</wsa:Action>"
+ + " <wsrm:SequenceAcknowledgement>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " <wsrm:AcknowledgementRange Upper='1' Lower='1'/>"
+ + " <wsrm:AcknowledgementRange Upper='3' Lower='3'/>"
+ + " </wsrm:SequenceAcknowledgement>"
+ + " </soap:Header>"
+ + " <soap:Body/>"
+ + "</soap:Envelope>";
+
+ private static final String closeSequenceMessage
+ = "<soap:Envelope"
+ + " xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\""
+ + " xmlns:wsrm=\"http://docs.oasis-open.org/ws-rx/wsrm/200702\""
+ + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
+ + " <soap:Header>"
+ + " <wsa:MessageID>http://Business456.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:MessageID>"
+ + " <wsa:To>http://example.com/serviceB/123</wsa:To>"
+ + " <wsa:Action>http://docs.oasis-open.org/ws-rx/wsrm/200702/TerminateSequence</wsa:Action>"
+ + " <wsa:From>"
+ + " <wsa:Address>http://Business456.com/serviceA/789</wsa:Address>"
+ + " </wsa:From>"
+ + " </soap:Header>"
+ + " <soap:Body>"
+ + " <wsrm:CloseSequence>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " <wsrm:LastMsgNumber>3</wsrm:LastMsgNumber>"
+ + " </wsrm:CloseSequence>"
+ + " </soap:Body>"
+ + "</soap:Envelope>";
+
+ private static final String terminateSequenceMessage
+ = "<soap:Envelope"
+ + " xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\""
+ + " xmlns:wsrm=\"http://docs.oasis-open.org/ws-rx/wsrm/200702\""
+ + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
+ + " <soap:Header>"
+ + " <wsa:MessageID>http://Business456.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:MessageID>"
+ + " <wsa:To>http://example.com/serviceB/123</wsa:To>"
+ + " <wsa:Action>http://docs.oasis-open.org/ws-rx/wsrm/200702/TerminateSequence</wsa:Action>"
+ + " <wsa:From>"
+ + " <wsa:Address>http://Business456.com/serviceA/789</wsa:Address>"
+ + " </wsa:From>"
+ + " </soap:Header>"
+ + " <soap:Body>"
+ + " <wsrm:TerminateSequence>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " <wsrm:LastMsgNumber>3</wsrm:LastMsgNumber>"
+ + " </wsrm:TerminateSequence>"
+ + " </soap:Body>"
+ + "</soap:Envelope>";
+
+ private static final String closeSequenceResponseMessage
+ = "<soap:Envelope"
+ + " xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\""
+ + " xmlns:wsrm=\"http://docs.oasis-open.org/ws-rx/wsrm/200702\""
+ + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
+ + " <soap:Header>"
+ + " <wsa:MessageID>http://Business456.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:MessageID>"
+ + " <wsa:To>http://example.com/serviceA/789</wsa:To>"
+ + " <wsa:Action>http://docs.oasis-open.org/ws-rx/wsrm/200702/TerminateSequenceResponse</wsa:Action>"
+ + " <wsa:RelatesTo>http://Business456.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:RelatesTo>"
+ + " <wsa:From>"
+ + " <wsa:Address>http://Business456.com/serviceA/789</wsa:Address>"
+ + " </wsa:From>"
+ + " </soap:Header>"
+ + " <soap:Body>"
+ + " <wsrm:CloseSequenceResponse>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " </wsrm:CloseSequenceResponse>"
+ + " </soap:Body>"
+ + "</soap:Envelope>";
+
+ private static final String terminateSequenceResponseMessage
+ = "<soap:Envelope"
+ + " xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\""
+ + " xmlns:wsrm=\"http://docs.oasis-open.org/ws-rx/wsrm/200702\""
+ + " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
+ + " <soap:Header>"
+ + " <wsa:MessageID>http://Business456.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:MessageID>"
+ + " <wsa:To>http://example.com/serviceA/789</wsa:To>"
+ + " <wsa:Action>http://docs.oasis-open.org/ws-rx/wsrm/200702/TerminateSequenceResponse</wsa:Action>"
+ + " <wsa:RelatesTo>http://Business456.com/guid/0baaf88d-483b-4ecf-a6d8</wsa:RelatesTo>"
+ + " <wsa:From>"
+ + " <wsa:Address>http://Business456.com/serviceA/789</wsa:Address>"
+ + " </wsa:From>"
+ + " </soap:Header>"
+ + " <soap:Body>"
+ + " <wsrm:TerminateSequenceResponse>"
+ + " <wsrm:Identifier>http://Business456.com/RM/ABC</wsrm:Identifier>"
+ + " </wsrm:TerminateSequenceResponse>"
+ + " </soap:Body>"
+ + "</soap:Envelope>";
+
+ public void testCreateSequenceMessageDeserialization() throws Exception
+ {
+ System.out.println("FIXME [JBWS-515] Provide an initial implementation for WS-ReliableMessaging");
+ if (true) return;
+ CreateSequence createSequenceMessage = WSRM_200702_FACTORY.newCreateSequence();
+ createSequenceMessage.deserializeFrom(toSOAPMessage(CREATE_SEQUENCE_MESSAGE));
+ // perform assertion
+ assertEquals(createSequenceMessage.getAcksTo(), "http://Business456.com/serviceA/789");
+ assertEquals(createSequenceMessage.getExpires(), "PT0S");
+ CreateSequence.Offer offer = createSequenceMessage.getOffer();
+ assertEquals(offer.getIdentifier(), "http://Business456.com/RM/ABC");
+ assertEquals(offer.getEndpoint(), "http://Business456.com/serviceA/ASDF");
+ assertEquals(offer.getExpires(), "PT1S");
+ assertEquals(offer.getIncompleteSequenceBehavior(), IncompleteSequenceBehavior.DISCARD_ENTIRE_SEQUENCE);
+ }
+
+ public void testCreateSequenceMessageSerialization() throws Exception
+ {
+ System.out.println("FIXME [JBWS-515] Provide an initial implementation for WS-ReliableMessaging");
+ if (true) return;
+ CreateSequence createSequenceMessage = WSRM_200702_FACTORY.newCreateSequence();
+ // construct message
+ createSequenceMessage.setAcksTo("http://Business456.com/serviceA/789");
+ createSequenceMessage.setExpires("PT0S");
+ CreateSequence.Offer offer = createSequenceMessage.newOffer();
+ offer.setIdentifier("http://Business456.com/RM/ABC");
+ offer.setEndpoint("http://Business456.com/serviceA/ASDF");
+ offer.setExpires("PT1S");
+ offer.setIncompleteSequenceBehavior(IncompleteSequenceBehavior.DISCARD_ENTIRE_SEQUENCE);
+ createSequenceMessage.setOffer(offer);
+ // serialize message
+ SOAPMessage createdSOAPMessage = newEmptySOAPMessage();
+ createSequenceMessage.serializeTo(createdSOAPMessage);
+ // deserialize from constructed message
+ CreateSequence createSequenceMessage1 = WSRM_200702_FACTORY.newCreateSequence();
+ createSequenceMessage1.deserializeFrom(createdSOAPMessage);
+ // deserialize from reference message
+ CreateSequence createSequenceMessage2 = WSRM_200702_FACTORY.newCreateSequence();
+ createSequenceMessage2.deserializeFrom(toSOAPMessage(CREATE_SEQUENCE_MESSAGE));
+ // perform assertion
+ assertEquals(createSequenceMessage1, createSequenceMessage2);
+ }
+
+ // TODO: implement other de/serializations
+
+ private static SOAPMessage toSOAPMessage(String data) throws Exception
+ {
+ javax.xml.soap.MessageFactory factory = javax.xml.soap.MessageFactory.newInstance();
+ return factory.createMessage(null, new ByteArrayInputStream(data.getBytes()));
+ }
+
+ private static SOAPMessage newEmptySOAPMessage() throws Exception
+ {
+ javax.xml.soap.MessageFactory factory = javax.xml.soap.MessageFactory.newInstance();
+ return factory.createMessage();
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/deserialization/WSRMDeSerializationTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 4 months
JBossWS SVN: r4521 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-04 11:21:27 -0400 (Tue, 04 Sep 2007)
New Revision: 4521
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java
Log:
registering providers
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 14:32:27 UTC (rev 4520)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java 2007-09-04 15:21:27 UTC (rev 4521)
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.extensions.wsrm.spi;
+import java.util.Map;
+import java.util.HashMap;
+
/**
* WS-RM Provider SPI facade. Each WS-RM provider must override this class.
*
@@ -28,8 +31,21 @@
*/
public abstract class Provider
{
+
+ private static final Map<String, Provider> REGISTERED_PROVIDERS = new HashMap<String, Provider>();
+
+ static
+ {
+ REGISTERED_PROVIDERS.put(
+ org.jboss.ws.extensions.wsrm.spec200702.ProviderImpl.getInstance().getNamespaceURI(),
+ 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());
+ }
+
/**
- * Must be overriden in the subclasses
+ * Must be overriden in subclasses
* @param targetNamespace
*/
protected Provider()
@@ -56,6 +72,10 @@
*/
public static Provider getInstance(String wsrmNamespace)
{
- return null; // TODO: implement
+ if (!REGISTERED_PROVIDERS.keySet().contains(wsrmNamespace))
+ throw new IllegalArgumentException("No WS-RM provider registered for namespace " + wsrmNamespace);
+
+ return REGISTERED_PROVIDERS.get(wsrmNamespace);
}
+
}
17 years, 4 months
JBossWS SVN: r4520 - legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-09-04 10:32:27 -0400 (Tue, 04 Sep 2007)
New Revision: 4520
Modified:
legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
Log:
Initial fix implementation.
Modified: legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
--- legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2007-09-04 14:28:50 UTC (rev 4519)
+++ legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2007-09-04 14:32:27 UTC (rev 4520)
@@ -489,7 +489,8 @@
if (isDocStyle())
{
XSTypeDefinition xt = getXSType(input);
- addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), "", "", jwm, !isWrapped());
+ // Don't unwrap the actual parameter.
+ addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), "", "", jwm, false);
}
else
{
@@ -503,7 +504,8 @@
if (isDocStyle())
{
XSTypeDefinition xt = getXSType(output);
- addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), "", "", jwm, !isWrapped());
+ // Don't unwrap the response type.
+ addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), "", "", jwm, false);
}
else
{
@@ -704,7 +706,7 @@
}
}
- if ((skipWrapperArray && isRepresentsArray(xt)) == false)
+ if ((skipWrapperArray && SchemaUtils.isWrapperArrayType(xt)) == false)
{
jxtm = new JavaXmlTypeMapping(jwm);
String javaType;
@@ -900,40 +902,6 @@
}
/**
- * Checks whether the type represents an array type
- *
- * @param xst
- * @return true: type represents an array
- */
- private boolean isRepresentsArray(XSTypeDefinition xst)
- {
- boolean bool = false;
- if (xst instanceof XSComplexTypeDefinition)
- {
- XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xst;
- if (xc.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
- return false;
- XSParticle xsp = xc.getParticle();
-
- if (xsp == null)
- return false;
-
- XSTerm xsterm = xsp.getTerm();
- if (xsterm instanceof XSModelGroup)
- {
- XSModelGroup xm = (XSModelGroup)xsterm;
- XSObjectList xo = xm.getParticles();
- if (xo.getLength() == 1)
- {
- XSParticle xp = (XSParticle)xo.item(0);
- bool = xp.getMaxOccursUnbounded() || xp.getMaxOccurs() > 1;
- }
- }
- }
- return bool;
- }
-
- /**
* Any custom decisions that need to be made will be done here
*
* @param javaType
17 years, 4 months
JBossWS SVN: r4519 - legacy/branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-09-04 10:28:50 -0400 (Tue, 04 Sep 2007)
New Revision: 4519
Added:
legacy/branches/dlofthouse/JBWS-1801/
Log:
Location for initial fix.
Copied: legacy/branches/dlofthouse/JBWS-1801 (from rev 4518, legacy/branches/jbossws-1.2.1.GA_JBWS-1788)
17 years, 4 months
JBossWS SVN: r4518 - in stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm: spec200502 and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-04 07:39:20 -0400 (Tue, 04 Sep 2007)
New Revision: 4518
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/
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/MessageFactoryImpl.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
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/spi/protocol/Sequence.java
Log:
implementing 2005/02 WS-RM protocol version except de/serialization
Added: 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 (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -0,0 +1,149 @@
+/*
+ * 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.spec200502;
+
+import org.jboss.util.NotImplementedException;
+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
+{
+
+ private String identifier;
+ private long lastMessageNumber;
+
+ AckRequestedImpl()
+ {
+ // 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 AckRequestedImpl))
+ return false;
+ final AckRequestedImpl other = (AckRequestedImpl)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;
+ }
+
+ /*
+ * @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();
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.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/spec200502/CreateSequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -0,0 +1,357 @@
+/*
+ * 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.spec200502;
+
+import org.jboss.util.NotImplementedException;
+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
+{
+
+ private String acksTo;
+ private String expires;
+ private Offer offer;
+
+ CreateSequenceImpl()
+ {
+ // 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 String getExpires()
+ {
+ return this.expires;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#getOffer()
+ */
+ public Offer getOffer()
+ {
+ return this.offer;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence#newOffer()
+ */
+ public Offer 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(String duration)
+ {
+ if ((duration == null) || (duration.trim().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(Offer 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 CreateSequenceImpl))
+ return false;
+ final CreateSequenceImpl other = (CreateSequenceImpl)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;
+ }
+
+ /*
+ * @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();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence.Offer
+ */
+ private static final class OfferImpl implements CreateSequence.Offer
+ {
+
+ 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 IncompleteSequenceBehavior 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(IncompleteSequenceBehavior 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;
+ }
+
+ /*
+ * @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();
+ }
+
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.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/spec200502/CreateSequenceResponseImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -0,0 +1,305 @@
+/*
+ * 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.spec200502;
+
+import org.jboss.util.NotImplementedException;
+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
+{
+
+ private String identifier;
+ private String expires;
+ private Accept accept;
+
+ CreateSequenceResponseImpl()
+ {
+ // allow inside package use only
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getAccept()
+ */
+ public Accept getAccept()
+ {
+ return this.accept;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#getDuration()
+ */
+ public String 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 IncompleteSequenceBehavior getIncompleteSequenceBehavior()
+ {
+ return null; // always return null for this version of the RM protocol
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse#newAccept()
+ */
+ public Accept 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(Accept 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(String duration)
+ {
+ if ((duration == null) || (duration.trim().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(IncompleteSequenceBehavior 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 CreateSequenceResponseImpl))
+ return false;
+ final CreateSequenceResponseImpl other = (CreateSequenceResponseImpl)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;
+ }
+
+ /*
+ * @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();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse.Accept
+ */
+ private static final class AcceptImpl implements CreateSequenceResponse.Accept
+ {
+
+ 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;
+ }
+
+ /*
+ * @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();
+ }
+
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.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/spec200502/MessageFactoryImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/MessageFactoryImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/MessageFactoryImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -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.spec200502;
+
+import org.jboss.ws.extensions.wsrm.spi.MessageFactory;
+import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
+import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory
+ */
+final class MessageFactoryImpl implements MessageFactory
+{
+
+ private static final MessageFactory INSTANCE = new MessageFactoryImpl();
+
+ private MessageFactoryImpl()
+ {
+ // forbidden inheritance
+ }
+
+ public static MessageFactory getInstance()
+ {
+ return INSTANCE;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newAckRequested()
+ */
+ public AckRequested newAckRequested()
+ {
+ return new AckRequestedImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCloseSequence()
+ */
+ public CloseSequence newCloseSequence()
+ {
+ return null; // not supported by this version of the RM protocol
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCloseSequenceResponse()
+ */
+ public CloseSequenceResponse newCloseSequenceResponse()
+ {
+ return null; // not supported by this version of the RM protocol
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCreateSequence()
+ */
+ public CreateSequence newCreateSequence()
+ {
+ return new CreateSequenceImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newCreateSequenceResponse()
+ */
+ public CreateSequenceResponse newCreateSequenceResponse()
+ {
+ return new CreateSequenceResponseImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequence()
+ */
+ public Sequence newSequence()
+ {
+ return new SequenceImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequenceAcknowledgement()
+ */
+ public SequenceAcknowledgement newSequenceAcknowledgement()
+ {
+ return new SequenceAcknowledgementImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newSequenceFault()
+ */
+ public SequenceFault newSequenceFault()
+ {
+ return new SequenceFaultImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newTerminateSequence()
+ */
+ public TerminateSequence newTerminateSequence()
+ {
+ return new TerminateSequenceImpl();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.MessageFactory#newTerminateSequenceResponse()
+ */
+ public TerminateSequenceResponse newTerminateSequenceResponse()
+ {
+ return null; // not supported by this version of the RM protocol
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/MessageFactoryImpl.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/spec200502/ProviderImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/ProviderImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/ProviderImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -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.spec200502;
+
+import org.jboss.ws.extensions.wsrm.spi.MessageFactory;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
+
+/*
+ * @author richard.opalka(a)jboss.com
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider
+ */
+public final class ProviderImpl extends Provider
+{
+
+ static final String IMPLEMENTATION_VERSION = "http://schemas.xmlsoap.org/ws/2005/02/rm";
+ private static final Provider INSTANCE = new ProviderImpl();
+
+ private ProviderImpl()
+ {
+ // forbidden inheritance
+ }
+
+ public static Provider getInstance()
+ {
+ return INSTANCE;
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getMessageFactory()
+ */
+ @Override
+ public MessageFactory getMessageFactory()
+ {
+ return MessageFactoryImpl.getInstance();
+ }
+
+ /*
+ * @see org.jboss.ws.extensions.wsrm.spi.Provider#getNamespaceURI()
+ */
+ @Override
+ public String getNamespaceURI()
+ {
+ return IMPLEMENTATION_VERSION;
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/ProviderImpl.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/spec200502/SequenceAcknowledgementImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -0,0 +1,363 @@
+/*
+ * 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.spec200502;
+
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Collections;
+
+import org.jboss.util.NotImplementedException;
+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
+{
+
+ private final List<Long> nacks = new LinkedList<Long>();
+ private final List<AcknowledgementRange> acknowledgementRanges = new LinkedList<AcknowledgementRange>();
+ private String identifier;
+
+ SequenceAcknowledgementImpl()
+ {
+ // 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(AcknowledgementRange 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 (AcknowledgementRange 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<AcknowledgementRange> 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 AcknowledgementRange 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 SequenceAcknowledgementImpl))
+ return false;
+ final SequenceAcknowledgementImpl other = (SequenceAcknowledgementImpl)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;
+ }
+
+ /*
+ * @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.acknowledgementRanges.size() == 0) && (this.nacks.size() == 0))
+ throw new IllegalStateException();
+ }
+
+ private static void checkOverlap(AcknowledgementRange currentRange, AcknowledgementRange 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 final class AcknowledgementRangeImpl implements SequenceAcknowledgement.AcknowledgementRange
+ {
+
+ 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;
+ }
+
+ /*
+ * @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();
+ }
+
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.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/spec200502/SequenceFaultImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -0,0 +1,155 @@
+/*
+ * 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.spec200502;
+
+import org.jboss.util.NotImplementedException;
+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
+{
+
+ private SequenceFaultCode faultCode;
+ private Exception detail;
+
+ SequenceFaultImpl()
+ {
+ // 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 SequenceFaultCode 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(SequenceFaultCode 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 SequenceFaultImpl))
+ return false;
+ final SequenceFaultImpl other = (SequenceFaultImpl)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;
+ }
+
+ /*
+ * @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.faultCode == null)
+ throw new IllegalStateException();
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.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/spec200502/SequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -0,0 +1,171 @@
+/*
+ * 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.spec200502;
+
+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
+{
+
+ private String identifier;
+ private long messageNumber;
+ private boolean isLastMessage;
+
+ SequenceImpl()
+ {
+ // 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 SequenceImpl))
+ return false;
+ final SequenceImpl other = (SequenceImpl)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;
+ }
+
+ /*
+ * @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.messageNumber == 0)
+ throw new IllegalStateException();
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.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/spec200502/TerminateSequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -0,0 +1,140 @@
+/*
+ * 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.spec200502;
+
+import org.jboss.util.NotImplementedException;
+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
+{
+
+ private String identifier;
+
+ TerminateSequenceImpl()
+ {
+ // 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 TerminateSequenceImpl))
+ return false;
+ final TerminateSequenceImpl other = (TerminateSequenceImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ 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();
+ }
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.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/spec200702/SequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -80,7 +80,7 @@
/*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Sequence#setLastMessage(boolean)
*/
- public void setLastMessage(boolean lastMessage)
+ public void setLastMessage()
{
// do nothing for this version of the RM protocol
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java 2007-09-04 10:13:22 UTC (rev 4517)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java 2007-09-04 11:39:20 UTC (rev 4518)
@@ -76,7 +76,7 @@
* This element MAY be included by the RM Source endpoint. The <b>LastMessage</b> element has no content.
* @param lastMessage
*/
- void setLastMessage(boolean lastMessage);
+ void setLastMessage();
/**
* Getter
17 years, 4 months
JBossWS SVN: r4517 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-04 06:13:22 -0400 (Tue, 04 Sep 2007)
New Revision: 4517
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/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/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
Log:
implementing equals and hashcode methods - will be heavily used in tests
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -77,6 +77,41 @@
}
/*
+ * @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 AckRequestedImpl))
+ return false;
+ final AckRequestedImpl other = (AckRequestedImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -83,6 +83,44 @@
}
/*
+ * @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 CloseSequenceImpl))
+ return false;
+ final CloseSequenceImpl other = (CloseSequenceImpl)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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -61,6 +61,41 @@
}
/*
+ * @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 CloseSequenceResponseImpl))
+ return false;
+ final CloseSequenceResponseImpl other = (CloseSequenceResponseImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -120,6 +120,57 @@
}
/*
+ * @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 CreateSequenceImpl))
+ return false;
+ final CreateSequenceImpl other = (CreateSequenceImpl)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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
@@ -243,8 +294,67 @@
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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -140,6 +140,65 @@
}
/*
+ * @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 CreateSequenceResponseImpl))
+ return false;
+ final CreateSequenceResponseImpl other = (CreateSequenceResponseImpl)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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
@@ -195,6 +254,41 @@
}
/*
+ * @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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -27,6 +27,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
+
import javax.xml.soap.SOAPMessage;
/*
@@ -169,6 +170,63 @@
}
/*
+ * @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 SequenceAcknowledgementImpl))
+ return false;
+ final SequenceAcknowledgementImpl other = (SequenceAcknowledgementImpl)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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
@@ -257,6 +315,39 @@
}
/*
+ * @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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -84,6 +84,49 @@
}
/*
+ * @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 SequenceFaultImpl))
+ return false;
+ final SequenceFaultImpl other = (SequenceFaultImpl)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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -99,6 +99,44 @@
}
/*
+ * @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 SequenceImpl))
+ return false;
+ final SequenceImpl other = (SequenceImpl)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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -83,6 +83,44 @@
}
/*
+ * @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 TerminateSequenceImpl))
+ return false;
+ final TerminateSequenceImpl other = (TerminateSequenceImpl)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;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
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 09:02:04 UTC (rev 4516)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java 2007-09-04 10:13:22 UTC (rev 4517)
@@ -61,6 +61,41 @@
}
/*
+ * @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 TerminateSequenceResponseImpl))
+ return false;
+ final TerminateSequenceResponseImpl other = (TerminateSequenceResponseImpl)obj;
+ if (identifier == null)
+ {
+ if (other.identifier != null)
+ return false;
+ }
+ else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+
+ /*
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
public void deserializeFrom(SOAPMessage soapMessage)
17 years, 4 months
JBossWS SVN: r4516 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-04 05:02:04 -0400 (Tue, 04 Sep 2007)
New Revision: 4516
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/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/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
Log:
refactoring - serialization interface changed
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -23,7 +23,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -77,9 +77,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -87,9 +87,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -23,7 +23,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -83,9 +83,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -93,9 +93,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -23,7 +23,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -61,9 +61,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -71,9 +71,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -24,7 +24,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -120,9 +120,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -130,9 +130,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
@@ -245,9 +245,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -255,9 +255,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -24,7 +24,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -140,9 +140,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -150,9 +150,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
@@ -195,9 +195,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -205,9 +205,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -27,7 +27,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -169,19 +169,19 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ 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.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
@@ -257,19 +257,19 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ 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.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -24,7 +24,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFaultCode;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -84,9 +84,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -94,9 +94,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -22,7 +22,7 @@
package org.jboss.ws.extensions.wsrm.spec200702;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
import org.jboss.util.NotImplementedException;
/*
@@ -99,9 +99,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -109,9 +109,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -23,7 +23,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -83,9 +83,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -93,9 +93,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
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 08:43:14 UTC (rev 4515)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java 2007-09-04 09:02:04 UTC (rev 4516)
@@ -23,7 +23,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse;
-import org.w3c.dom.Element;
+import javax.xml.soap.SOAPMessage;
/*
* @author richard.opalka(a)jboss.com
@@ -61,9 +61,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#fromXML(org.w3c.dom.Element)
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#deserializeFrom(javax.xml.soap.SOAPMessage)
*/
- public void fromXML(Element e)
+ public void deserializeFrom(SOAPMessage soapMessage)
{
// TODO: implement deserialization using object set methods
if (true) throw new NotImplementedException();
@@ -71,9 +71,9 @@
}
/*
- * @see org.jboss.ws.extensions.wsrm.spi.protocol.XMLSerializable#toXML()
+ * @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable#serializeTo(javax.xml.soap.SOAPMessage)
*/
- public Element toXML()
+ public void serializeTo(SOAPMessage soapMessage)
{
ensureLegalState();
// TODO implement serialization using object instance fields
17 years, 4 months
JBossWS SVN: r4515 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-04 04:43:14 -0400 (Tue, 04 Sep 2007)
New Revision: 4515
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java
Log:
refactoring - serialization interface changed
Added: 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 (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java 2007-09-04 08:43:14 UTC (rev 4515)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.wsrm.spi.protocol;
+
+import javax.xml.soap.SOAPMessage;
+
+/**
+ * This interface identifies classes that are de/serializable from/to SOAP messages
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface Serializable
+{
+ /**
+ * Serialize object instance to SOAP message
+ * @param soapMessage
+ */
+ void serializeTo(SOAPMessage soapMessage);
+
+ /**
+ * Deserialize object instance from SOAP message
+ * @param soapMessage
+ */
+ void deserializeFrom(SOAPMessage soapMessage);
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 4 months
JBossWS SVN: r4514 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-04 04:42:52 -0400 (Tue, 04 Sep 2007)
New Revision: 4514
Removed:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.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/Sequence.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/SequenceFault.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java
Log:
refactoring - serialization interface changed
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java 2007-09-04 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -35,7 +35,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface AckRequested extends XMLSerializable
+public interface AckRequested extends Serializable
{
/**
* An RM Source that includes an <b>AckRequested</b> header block in a SOAP envelope MUST include
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java 2007-09-04 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -37,7 +37,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface CloseSequence extends XMLSerializable
+public interface CloseSequence extends Serializable
{
/**
* The RM Source or RM Destination MUST include this element in any <b>CloseSequence</b> messages it
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.java 2007-09-04 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -35,7 +35,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface CloseSequenceResponse extends XMLSerializable
+public interface CloseSequenceResponse extends Serializable
{
/**
* The responder (RM Source or RM Destination) MUST include this element in any
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 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -47,7 +47,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface CreateSequence extends XMLSerializable
+public interface CreateSequence extends Serializable
{
/**
* <p>The RM Source MUST include this element in any CreateSequence message it sends. This
@@ -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 XMLSerializable
+ interface Offer extends Serializable
{
/**
* 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 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -44,7 +44,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface CreateSequenceResponse extends XMLSerializable
+public interface CreateSequenceResponse extends Serializable
{
/**
* The RM Destination MUST include this element within any CreateSequenceResponse message it
@@ -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 XMLSerializable
+ interface Accept extends Serializable
{
/**
* <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/Sequence.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java 2007-09-04 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -41,7 +41,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface Sequence extends XMLSerializable
+public interface Sequence extends Serializable
{
/**
* An RM Source that includes a <b>Sequence</b> header block in a SOAP envelope MUST include this
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 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -44,7 +44,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface SequenceAcknowledgement extends XMLSerializable
+public interface SequenceAcknowledgement extends Serializable
{
/**
* An RM Destination that includes a <b>SequenceAcknowledgement</b> header block in a SOAP
@@ -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 XMLSerializable
+ interface AcknowledgementRange extends Serializable
{
/**
* 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/SequenceFault.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFault.java 2007-09-04 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFault.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -39,7 +39,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface SequenceFault extends XMLSerializable
+public interface SequenceFault extends Serializable
{
/**
* WS-ReliableMessaging nodes that generate a <b>SequenceFault</b> MUST set the value of this
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java 2007-09-04 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -46,7 +46,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface TerminateSequence extends XMLSerializable
+public interface TerminateSequence extends Serializable
{
/**
* The RM Source or RM Destination MUST include this element in any TerminateSequence
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java 2007-09-04 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -36,7 +36,7 @@
*
* @author richard.opalka(a)jboss.com
*/
-public interface TerminateSequenceResponse extends XMLSerializable
+public interface TerminateSequenceResponse extends Serializable
{
/**
* The responder (RM Source or RM Destination) MUST include this element in any
Deleted: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java 2007-09-04 08:11:20 UTC (rev 4513)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java 2007-09-04 08:42:52 UTC (rev 4514)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.extensions.wsrm.spi.protocol;
-
-import org.w3c.dom.Element;
-
-/**
- * This interface identifies classes that are de/serializable from/to W3C DOM elements
- *
- * @author richard.opalka(a)jboss.com
- */
-public interface XMLSerializable
-{
- /**
- * Serialize object instance to the W3C DOM element
- * @return W3C DOM element
- */
- Element toXML();
-
- /**
- * Deserialize object instance from W3C DOM element
- * @param e W3C DOM element
- */
- void fromXML(Element e);
-}
17 years, 4 months
JBossWS SVN: r4513 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-04 04:11:20 -0400 (Tue, 04 Sep 2007)
New Revision: 4513
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/CreateSequenceResponseImpl.java
Log:
fixing
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-03 17:22:47 UTC (rev 4512)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-09-04 08:11:20 UTC (rev 4513)
@@ -109,6 +109,10 @@
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");
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-03 17:22:47 UTC (rev 4512)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-09-04 08:11:20 UTC (rev 4513)
@@ -92,6 +92,8 @@
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");
17 years, 4 months