summaryrefslogtreecommitdiff
path: root/RC6/java/plugins
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2008-04-16 12:18:22 +0000
committerAidan Skinner <aidan@apache.org>2008-04-16 12:18:22 +0000
commit43a65de871e1854fa500c42af7386cc3db348fcd (patch)
tree7ba9d8e1478f426e1a26e426579c34042ea51e0b /RC6/java/plugins
parent3344d55e0ebc40ea9114b8b9c79f5a7461050c30 (diff)
downloadqpid-python-43a65de871e1854fa500c42af7386cc3db348fcd.tar.gz
QPID-916 delete, about to recreate
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/tags/M2.1@648679 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'RC6/java/plugins')
-rw-r--r--RC6/java/plugins/pom.xml113
-rw-r--r--RC6/java/plugins/src/main/java/org/apache/qpid/extras/Activator.java48
-rw-r--r--RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java220
-rw-r--r--RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchangeType.java57
-rw-r--r--RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java118
-rw-r--r--RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchangeType.java57
6 files changed, 0 insertions, 613 deletions
diff --git a/RC6/java/plugins/pom.xml b/RC6/java/plugins/pom.xml
deleted file mode 100644
index c3f5f8a611..0000000000
--- a/RC6/java/plugins/pom.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<!--
- 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.
--->
-<project>
-
- <properties>
- <topDirectoryLocation>.</topDirectoryLocation>
- <java.source.version>1.5</java.source.version>
- <compile.flags>-Xlint:fallthrough,finally</compile.flags>
- <compiler.version>2.0.1</compiler.version>
- </properties>
-
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>4</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <packaging>bundle</packaging>
- <name>Qpid Plugins</name>
- <description>A simple plugin for qpid.</description>
- <groupId>org.apache.qpid.extras</groupId>
- <artifactId>example-plugin</artifactId>
- <version>1.0-incubating-M2.1</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.qpid</groupId>
- <artifactId>qpid-broker</artifactId>
- <version>1.0-incubating-M2.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.qpid</groupId>
- <artifactId>junit-toolkit</artifactId>
- <version>1.0-incubating-M2.1</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>1.0.0</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Private-Package>
- org.apache.qpid.extras.*
- </Private-Package>
- <Bundle-Activator>
- org.apache.qpid.extras.Activator
- </Bundle-Activator>
- </instructions>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${compiler.version}</version>
- <configuration>
- <source>${java.source.version}</source>
- <target>${java.source.version}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- <resources>
- <resource>
- <directory>src/main/java</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- <exclude>**/log4j.properties</exclude>
- </excludes>
- </resource>
- </resources>
- </build>
-
-</project>
diff --git a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/Activator.java b/RC6/java/plugins/src/main/java/org/apache/qpid/extras/Activator.java
deleted file mode 100644
index ca6c05a435..0000000000
--- a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/Activator.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * 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.qpid.extras;
-
-import org.apache.qpid.extras.exchanges.diagnostic.DiagnosticExchangeType;
-import org.apache.qpid.extras.exchanges.example.TestExchangeType;
-import org.apache.qpid.server.exchange.ExchangeType;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- *
- * @author aidan
- *
- * Dummy class, used by PluginTest
- */
-
-public class Activator implements BundleActivator
-{
-
- public void start(BundleContext ctx) throws Exception
- {
- ctx.registerService(ExchangeType.class.getName(), new TestExchangeType(), null);
- ctx.registerService(ExchangeType.class.getName(), new DiagnosticExchangeType(), null);
- }
-
- public void stop(BundleContext ctx) throws Exception
- {
- }
-}
diff --git a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java b/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java
deleted file mode 100644
index 77cc12df7c..0000000000
--- a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- *
- * 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.qpid.extras.exchanges.diagnostic;
-
-import java.util.List;
-import java.util.Map;
-
-import javax.management.JMException;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
-import org.apache.qpid.framing.FieldTable;
-import org.apache.qpid.server.exchange.AbstractExchange;
-import org.apache.qpid.server.management.MBeanConstructor;
-import org.apache.qpid.server.management.MBeanDescription;
-import org.apache.qpid.server.queue.AMQMessage;
-import org.apache.qpid.server.queue.AMQQueue;
-
-import org.apache.qpid.junit.extensions.util.SizeOf;
-
-/**
- *
- * This is a special diagnostic exchange type which doesn't actually do anything
- * with messages. When it receives a message, it writes information about the
- * current memory usage to the "memory" property of the message and places it on the
- * diagnosticqueue for retrieval
- *
- * @author Aidan Skinner
- *
- */
-
-public class DiagnosticExchange extends AbstractExchange
-{
-
- public static final AMQShortString DIAGNOSTIC_EXCHANGE_CLASS = new AMQShortString("x-diagnostic");
- public static final AMQShortString DIAGNOSTIC_EXCHANGE_NAME = new AMQShortString("diagnostic");
-
- /**
- * the logger.
- */
- //private static final Logger _logger = Logger.getLogger(DiagnosticExchange.class);
-
- /**
- * MBean class implementing the management interfaces.
- */
- @MBeanDescription("Management Bean for Diagnostic Exchange")
- private final class DiagnosticExchangeMBean extends ExchangeMBean
- {
-
- /**
- * Usual constructor.
- *
- * @throws JMException
- */
- @MBeanConstructor("Creates an MBean for AMQ Diagnostic exchange")
- public DiagnosticExchangeMBean() throws JMException
- {
- super();
- _exchangeType = "diagnostic";
- init();
- }
-
- /**
- * Returns nothing, there can be no tabular data for this...
- *
- * @throws OpenDataException
- * @returns null
- * @todo ... or can there? Could this actually return all the
- * information in one easy to read table?
- */
- public TabularData bindings() throws OpenDataException
- {
- return null;
- }
-
- /**
- * This exchange type doesn't support queues, so this method does
- * nothing.
- *
- * @param queueName
- * the queue you'll fail to create
- * @param binding
- * the binding you'll fail to create
- * @throws JMException
- * an exception that will never be thrown
- */
- public void createNewBinding(String queueName, String binding) throws JMException
- {
- // No Op
- }
-
- } // End of MBean class
-
- /**
- * Creates a new MBean instance
- *
- * @return the newly created MBean
- * @throws AMQException
- * if something goes wrong
- */
- protected ExchangeMBean createMBean() throws AMQException
- {
- try
- {
- return new DiagnosticExchange.DiagnosticExchangeMBean();
- }
- catch (JMException ex)
- {
- // _logger.error("Exception occured in creating the direct exchange mbean", ex);
- throw new AMQException(null, "Exception occured in creating the direct exchange mbean", ex);
- }
- }
-
- public AMQShortString getType()
- {
- return DIAGNOSTIC_EXCHANGE_CLASS;
- }
-
- /**
- * Does nothing.
- *
- * @param routingKey
- * pointless
- * @param queue
- * pointless
- * @param args
- * pointless
- * @throws AMQException
- * never
- */
- public void registerQueue(AMQShortString routingKey, AMQQueue queue, FieldTable args) throws AMQException
- {
- // No op
- }
-
- /**
- * Does nothing.
- *
- * @param routingKey
- * pointless
- * @param queue
- * pointless
- * @param args
- * pointless
- * @throws AMQException
- * never
- */
- public void deregisterQueue(AMQShortString routingKey, AMQQueue queue, FieldTable args) throws AMQException
- {
- // No op
- }
-
- public boolean isBound(AMQShortString routingKey, AMQQueue queue)
- {
- return false;
- }
-
- public boolean isBound(AMQShortString routingKey)
- {
- return false;
- }
-
- public boolean isBound(AMQQueue queue)
- {
- return false;
- }
-
- public boolean hasBindings()
- {
- return false;
- }
-
- public void route(AMQMessage payload) throws AMQException
- {
-
- Long value = new Long(SizeOf.getUsedMemory());
- AMQShortString key = new AMQShortString("memory");
-
- FieldTable headers = ((BasicContentHeaderProperties)payload.getContentHeaderBody().properties).getHeaders();
- headers.put(key, value);
- ((BasicContentHeaderProperties)payload.getContentHeaderBody().properties).setHeaders(headers);
- AMQQueue q = getQueueRegistry().getQueue(new AMQShortString("diagnosticqueue"));
-
- payload.enqueue(q);
-
- }
-
- @Override
- public Map<AMQShortString, List<AMQQueue>> getBindings() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isBound(AMQShortString routingKey, FieldTable arguments,
- AMQQueue queue) {
- // TODO Auto-generated method stub
- return false;
- }
-}
diff --git a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchangeType.java b/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchangeType.java
deleted file mode 100644
index d96b4dc99e..0000000000
--- a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchangeType.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * 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.qpid.extras.exchanges.diagnostic;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.server.exchange.ExchangeType;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-
-/**
- * Exchange type class for getting hold of the exchange.
- */
-public final class DiagnosticExchangeType implements ExchangeType<DiagnosticExchange>
-{
-
- public AMQShortString getName()
- {
- return DiagnosticExchange.DIAGNOSTIC_EXCHANGE_CLASS;
- }
-
- public Class<DiagnosticExchange> getExchangeClass()
- {
- return DiagnosticExchange.class;
- }
-
- public DiagnosticExchange newInstance(VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
- throws AMQException
- {
- DiagnosticExchange exch = new DiagnosticExchange();
- exch.initialise(host, name, durable, ticket, autoDelete);
- return exch;
- }
-
- public AMQShortString getDefaultExchangeName()
- {
- return DiagnosticExchange.DIAGNOSTIC_EXCHANGE_NAME;
- }
-}
diff --git a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java b/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java
deleted file mode 100644
index d56a958044..0000000000
--- a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- *
- * 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.qpid.extras.exchanges.example;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.FieldTable;
-import org.apache.qpid.server.exchange.Exchange;
-import org.apache.qpid.server.queue.AMQMessage;
-import org.apache.qpid.server.queue.AMQQueue;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-
-public class TestExchange implements Exchange
-{
-
- public void close() throws AMQException
- {
- }
-
- public void deregisterQueue(AMQShortString routingKey, AMQQueue queue, FieldTable args) throws AMQException
- {
- }
-
- public Map<AMQShortString, List<AMQQueue>> getBindings()
- {
- return null;
- }
-
- public AMQShortString getName()
- {
- return null;
- }
-
- public AMQShortString getType()
- {
- return null;
- }
-
- public boolean hasBindings()
- {
- return false;
- }
-
- public void initialise(VirtualHost host, AMQShortString name, boolean durable, boolean autoDelete)
- throws AMQException
- {
- }
-
- public boolean isAutoDelete()
- {
- return false;
- }
-
- public boolean isBound(AMQShortString routingKey, FieldTable arguments, AMQQueue queue)
- {
- return false;
- }
-
- public boolean isBound(AMQShortString routingKey, AMQQueue queue)
- {
- return false;
- }
-
- public boolean isBound(AMQShortString routingKey)
- {
- return false;
- }
-
- public boolean isBound(AMQQueue queue)
- {
- return false;
- }
-
- public boolean isDurable()
- {
- return false;
- }
-
- public void registerQueue(AMQShortString routingKey, AMQQueue queue, FieldTable args) throws AMQException
- {
- }
-
- public void route(AMQMessage message) throws AMQException
- {
- }
-
- public int getTicket()
- {
- return 0;
- }
-
- public void initialise(VirtualHost arg0, AMQShortString arg1, boolean arg2, int arg3, boolean arg4)
- throws AMQException
- {
- }
-}
diff --git a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchangeType.java b/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchangeType.java
deleted file mode 100644
index 22833693ca..0000000000
--- a/RC6/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchangeType.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * 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.qpid.extras.exchanges.example;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.server.exchange.Exchange;
-import org.apache.qpid.server.exchange.ExchangeType;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-
-public class TestExchangeType implements ExchangeType
-{
-
- public Class getExchangeClass()
- {
- return TestExchange.class;
- }
-
- public AMQShortString getName()
- {
- return null;
- }
-
- public Exchange newInstance(VirtualHost host, AMQShortString name, boolean durable,
- int token, boolean autoDelete)
- throws AMQException
- {
- TestExchange ex = new TestExchange();
- ex.initialise(host, name, durable, token, autoDelete);
- return ex;
- }
-
- public AMQShortString getDefaultExchangeName()
- {
- return new AMQShortString("test.exchange");
- }
-
-}