From 7ad16a07b4288227c531c485939318768129fb54 Mon Sep 17 00:00:00 2001 From: antelder Date: Wed, 3 Aug 2011 09:20:48 +0000 Subject: Tag debug mod for TUSCANY-3909 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1153403 13f79535-47bb-0310-9956-ffa450edef68 --- .../jms/wireformat/jmstext/WireFormatJMSText.java | 50 ++++++++++++++ .../jmstext/WireFormatJMSTextProcessor.java | 78 ++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext/WireFormatJMSText.java create mode 100644 sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext/WireFormatJMSTextProcessor.java (limited to 'sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext') diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext/WireFormatJMSText.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext/WireFormatJMSText.java new file mode 100644 index 0000000000..47b60c33e5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext/WireFormatJMSText.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.binding.jms.wireformat.jmstext; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.assembly.xml.Constants; +import org.apache.tuscany.sca.assembly.WireFormat; + +/** + * Implementation for policies that could be injected as parameter + * into the axis2config. + * + * @version $Rev$ $Date$ + */ +public class WireFormatJMSText implements WireFormat { + public static final QName WIRE_FORMAT_JMS_BYTES_QNAME = new QName(Constants.SCA10_TUSCANY_NS, "wireFormat.jmsText"); + + public QName getSchemaName() { + return WIRE_FORMAT_JMS_BYTES_QNAME; + } + + public boolean isUnresolved() { + return false; + } + + public void setUnresolved(boolean unresolved) { + } + + @Override + public boolean equals(Object obj) { + return this.getClass() == obj.getClass(); + } +} diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext/WireFormatJMSTextProcessor.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext/WireFormatJMSTextProcessor.java new file mode 100644 index 0000000000..9b675df290 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstext/WireFormatJMSTextProcessor.java @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.binding.jms.wireformat.jmstext; + +import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; +import static javax.xml.stream.XMLStreamConstants.START_ELEMENT; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.XMLStreamWriter; + +import org.apache.tuscany.sca.assembly.xml.Constants; +import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; +import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor; +import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; +import org.apache.tuscany.sca.contribution.resolver.ModelResolver; +import org.apache.tuscany.sca.contribution.service.ContributionReadException; +import org.apache.tuscany.sca.contribution.service.ContributionResolveException; +import org.apache.tuscany.sca.contribution.service.ContributionWriteException; +import org.apache.tuscany.sca.monitor.Monitor; + +/** + * + * @version $Rev$ $Date$ + */ +public class WireFormatJMSTextProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor { + + public QName getArtifactType() { + return WireFormatJMSText.WIRE_FORMAT_JMS_BYTES_QNAME; + } + + public WireFormatJMSTextProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) { + } + + + public WireFormatJMSText read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { + WireFormatJMSText wireFormat = new WireFormatJMSText(); + + return wireFormat; + } + + public void write(WireFormatJMSText wireFormat, XMLStreamWriter writer) + throws ContributionWriteException, XMLStreamException { + String prefix = "tuscany"; + writer.writeStartElement(prefix, + getArtifactType().getLocalPart(), + getArtifactType().getNamespaceURI()); + writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS); + + writer.writeEndElement(); + } + + public Class getModelType() { + return WireFormatJMSText.class; + } + + public void resolve(WireFormatJMSText arg0, ModelResolver arg1) throws ContributionResolveException { + + } + +} -- cgit v1.2.3