From 683d336d6368dfc640c4f341f883beaa3ecafcce Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 11 Mar 2011 18:19:21 +0000 Subject: [PATCH] Moved samples to separate repo --- .gitignore | 2 + spring-amqp-core/.classpath | 9 - spring-amqp-core/.project | 35 ---- .../.settings/org.maven.ide.eclipse.prefs | 9 - spring-amqp-parent/.project | 17 -- .../.settings/org.maven.ide.eclipse.prefs | 9 - spring-amqp-samples/helloworld/.classpath | 8 - spring-amqp-samples/helloworld/.project | 29 --- spring-amqp-samples/helloworld/.springBeans | 21 -- spring-amqp-samples/helloworld/pom.xml | 181 ----------------- .../BrokerConfigurationApplication.java | 22 --- .../amqp/helloworld/Consumer.java | 15 -- .../helloworld/HelloWorldConfiguration.java | 76 ------- .../amqp/helloworld/Producer.java | 16 -- .../amqp/helloworld/async/Consumer.java | 11 -- .../async/ConsumerConfiguration.java | 21 -- .../helloworld/async/HelloWorldHandler.java | 9 - .../amqp/helloworld/async/Producer.java | 11 -- .../async/ProducerConfiguration.java | 60 ------ .../main/resources/commons-logging.properties | 7 - .../src/main/resources/log4j.properties | 11 -- .../main/resources/rabbitConfiguration.xml | 16 -- spring-amqp-samples/stocks/.classpath | 10 - spring-amqp-samples/stocks/.project | 23 --- spring-amqp-samples/stocks/pom.xml | 187 ------------------ .../AbstractStockAppRabbitConfiguration.java | 85 -------- .../amqp/rabbit/stocks/config/RoutingKey.java | 27 --- .../client/RabbitClientConfiguration.java | 126 ------------ .../server/RabbitServerConfiguration.java | 51 ----- .../amqp/rabbit/stocks/domain/Quote.java | 53 ----- .../amqp/rabbit/stocks/domain/Stock.java | 44 ----- .../rabbit/stocks/domain/StockExchange.java | 28 --- .../rabbit/stocks/domain/TradeRequest.java | 109 ---------- .../rabbit/stocks/domain/TradeResponse.java | 107 ---------- .../stocks/gateway/MarketDataGateway.java | 26 --- .../gateway/RabbitMarketDataGateway.java | 95 --------- .../gateway/RabbitStockServiceGateway.java | 62 ------ .../stocks/gateway/StockServiceGateway.java | 30 --- .../rabbit/stocks/handler/ClientHandler.java | 58 ------ .../rabbit/stocks/handler/ServerHandler.java | 76 ------- .../stocks/service/CreditCheckService.java | 33 ---- .../stocks/service/ExecutionVenueService.java | 31 --- .../rabbit/stocks/service/TradingService.java | 32 --- .../service/stubs/CreditCheckServiceStub.java | 35 ---- .../stubs/ExecutionVenueServiceStub.java | 76 ------- .../service/stubs/TradingServiceStub.java | 33 ---- .../rabbit/stocks/ui/StockController.java | 84 -------- .../amqp/rabbit/stocks/ui/StockPanel.java | 145 -------------- .../resources/client-bootstrap-config.xml | 19 -- .../src/main/resources/client-handlers.xml | 14 -- .../src/main/resources/client-messaging.xml | 23 --- .../src/main/resources/client.properties | 1 - .../resources/server-bootstrap-config.xml | 22 --- .../src/main/resources/server-handlers.xml | 12 -- .../stocks/src/main/resources/server-jmx.xml | 19 -- .../src/main/resources/server-messaging.xml | 22 --- .../src/main/resources/server-services.xml | 18 -- .../amqp/rabbit/stocks/Client.java | 51 ----- .../amqp/rabbit/stocks/Server.java | 39 ---- .../test/resources/commons-logging.properties | 7 - .../src/test/resources/log4j.properties | 11 -- spring-erlang/.classpath | 7 - spring-erlang/.project | 35 ---- .../.settings/org.eclipse.jdt.core.prefs | 6 - .../.settings/org.maven.ide.eclipse.prefs | 9 - spring-rabbit/.classpath | 10 - spring-rabbit/.project | 35 ---- .../.settings/org.maven.ide.eclipse.prefs | 9 - 68 files changed, 2 insertions(+), 2628 deletions(-) delete mode 100644 spring-amqp-core/.classpath delete mode 100644 spring-amqp-core/.project delete mode 100644 spring-amqp-core/.settings/org.maven.ide.eclipse.prefs delete mode 100644 spring-amqp-parent/.project delete mode 100644 spring-amqp-parent/.settings/org.maven.ide.eclipse.prefs delete mode 100644 spring-amqp-samples/helloworld/.classpath delete mode 100644 spring-amqp-samples/helloworld/.project delete mode 100644 spring-amqp-samples/helloworld/.springBeans delete mode 100644 spring-amqp-samples/helloworld/pom.xml delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/BrokerConfigurationApplication.java delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/Consumer.java delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/HelloWorldConfiguration.java delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/Producer.java delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/Consumer.java delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/ConsumerConfiguration.java delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/HelloWorldHandler.java delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/Producer.java delete mode 100644 spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/ProducerConfiguration.java delete mode 100644 spring-amqp-samples/helloworld/src/main/resources/commons-logging.properties delete mode 100644 spring-amqp-samples/helloworld/src/main/resources/log4j.properties delete mode 100644 spring-amqp-samples/helloworld/src/main/resources/rabbitConfiguration.xml delete mode 100644 spring-amqp-samples/stocks/.classpath delete mode 100644 spring-amqp-samples/stocks/.project delete mode 100644 spring-amqp-samples/stocks/pom.xml delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/AbstractStockAppRabbitConfiguration.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/RoutingKey.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/client/RabbitClientConfiguration.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/server/RabbitServerConfiguration.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/Quote.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/Stock.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/StockExchange.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/TradeRequest.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/TradeResponse.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/MarketDataGateway.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/RabbitMarketDataGateway.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/RabbitStockServiceGateway.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/StockServiceGateway.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/handler/ClientHandler.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/handler/ServerHandler.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/CreditCheckService.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/ExecutionVenueService.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/TradingService.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/CreditCheckServiceStub.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/ExecutionVenueServiceStub.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/TradingServiceStub.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/ui/StockController.java delete mode 100644 spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/ui/StockPanel.java delete mode 100644 spring-amqp-samples/stocks/src/main/resources/client-bootstrap-config.xml delete mode 100644 spring-amqp-samples/stocks/src/main/resources/client-handlers.xml delete mode 100644 spring-amqp-samples/stocks/src/main/resources/client-messaging.xml delete mode 100644 spring-amqp-samples/stocks/src/main/resources/client.properties delete mode 100644 spring-amqp-samples/stocks/src/main/resources/server-bootstrap-config.xml delete mode 100644 spring-amqp-samples/stocks/src/main/resources/server-handlers.xml delete mode 100644 spring-amqp-samples/stocks/src/main/resources/server-jmx.xml delete mode 100644 spring-amqp-samples/stocks/src/main/resources/server-messaging.xml delete mode 100644 spring-amqp-samples/stocks/src/main/resources/server-services.xml delete mode 100644 spring-amqp-samples/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/Client.java delete mode 100644 spring-amqp-samples/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/Server.java delete mode 100644 spring-amqp-samples/stocks/src/test/resources/commons-logging.properties delete mode 100644 spring-amqp-samples/stocks/src/test/resources/log4j.properties delete mode 100644 spring-erlang/.classpath delete mode 100644 spring-erlang/.project delete mode 100644 spring-erlang/.settings/org.eclipse.jdt.core.prefs delete mode 100644 spring-erlang/.settings/org.maven.ide.eclipse.prefs delete mode 100644 spring-rabbit/.classpath delete mode 100644 spring-rabbit/.project delete mode 100644 spring-rabbit/.settings/org.maven.ide.eclipse.prefs diff --git a/.gitignore b/.gitignore index 7135f89383..3847545e4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ target +bin .settings .springBeans .ant-targets-build.xml src/ant/.ant-targets-upload-dist.xml *.swp +*/src/main/java/META-INF erl_crash.dump nohup.out .idea diff --git a/spring-amqp-core/.classpath b/spring-amqp-core/.classpath deleted file mode 100644 index 10ac4a5f15..0000000000 --- a/spring-amqp-core/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/spring-amqp-core/.project b/spring-amqp-core/.project deleted file mode 100644 index 438fa2f079..0000000000 --- a/spring-amqp-core/.project +++ /dev/null @@ -1,35 +0,0 @@ - - - spring-amqp-core - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - org.springframework.ide.eclipse.core.springnature - org.maven.ide.eclipse.maven2Nature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/spring-amqp-core/.settings/org.maven.ide.eclipse.prefs b/spring-amqp-core/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 3e1fd3f761..0000000000 --- a/spring-amqp-core/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 13 19:28:20 EST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/spring-amqp-parent/.project b/spring-amqp-parent/.project deleted file mode 100644 index 6074422510..0000000000 --- a/spring-amqp-parent/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - spring-amqp-parent - - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-amqp-parent/.settings/org.maven.ide.eclipse.prefs b/spring-amqp-parent/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 7ccc99204a..0000000000 --- a/spring-amqp-parent/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Jun 29 21:59:00 EDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/spring-amqp-samples/helloworld/.classpath b/spring-amqp-samples/helloworld/.classpath deleted file mode 100644 index 8f24847d55..0000000000 --- a/spring-amqp-samples/helloworld/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/spring-amqp-samples/helloworld/.project b/spring-amqp-samples/helloworld/.project deleted file mode 100644 index 018645dc7c..0000000000 --- a/spring-amqp-samples/helloworld/.project +++ /dev/null @@ -1,29 +0,0 @@ - - - spring-rabbit-helloworld - a simple Hello World example - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-amqp-samples/helloworld/.springBeans b/spring-amqp-samples/helloworld/.springBeans deleted file mode 100644 index 5d96b7c9fa..0000000000 --- a/spring-amqp-samples/helloworld/.springBeans +++ /dev/null @@ -1,21 +0,0 @@ - - - 1 - - - - - - - src/main/resources/rabbitConfiguration.xml - - - - - true - false - - - - - diff --git a/spring-amqp-samples/helloworld/pom.xml b/spring-amqp-samples/helloworld/pom.xml deleted file mode 100644 index b9865eb4a6..0000000000 --- a/spring-amqp-samples/helloworld/pom.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - 4.0.0 - org.springframework.samples.spring - spring-rabbit-helloworld - 1.0.0.BUILD-SNAPSHOT - jar - Spring AMQP Hello World - http://www.springframework.org - - - - - true - 3.0.3.RELEASE - 1.0.0.M3 - - - - strict - - false - - - - - - - - org.springframework.amqp - spring-amqp - ${spring.amqp.version} - - - org.springframework.amqp - spring-rabbit - ${spring.amqp.version} - - - - org.springframework - spring-test - ${spring.framework.version} - test - - - org.springframework - spring-context-support - ${spring.framework.version} - runtime - - - org.springframework - spring-aop - ${spring.framework.version} - - - org.springframework - spring-oxm - ${spring.framework.version} - - - cglib - cglib-nodep - 2.2 - - - aspectj - aspectjrt - 1.5.4 - - - aspectj - aspectjweaver - 1.5.4 - - - - - junit - junit - 4.8.1 - test - - - - log4j - log4j - 1.2.14 - runtime - - - - - - - - - com.springsource.bundlor - com.springsource.bundlor.maven - 1.0.0.M1B - - - maven-assembly-plugin - false - - - project - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - **/*Tests.java - - - **/Abstract*.java - - - - - - - - - Codehaus - http://repository.codehaus.org/ - - false - - - - - http://www.springframework.org/download - - staging - file:///${user.dir}/target/staging/org.springframework.batch.archetype/${pom.artifactId} - - - spring-release - Spring Release Repository - file:///${user.dir}/target/staging/release - - - spring-snapshot - Spring Snapshot Repository - file:///${user.dir}/target/staging/snapshot - - - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/BrokerConfigurationApplication.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/BrokerConfigurationApplication.java deleted file mode 100644 index ea51f138e8..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/BrokerConfigurationApplication.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.springframework.amqp.helloworld; - -import org.springframework.amqp.core.AmqpAdmin; -import org.springframework.amqp.core.Queue; -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -public class BrokerConfigurationApplication { - - /** - * An example application that only configures the AMQP broker - */ - public static void main(String[] args) throws Exception { - ApplicationContext context = new ClassPathXmlApplicationContext("rabbitConfiguration.xml"); - AmqpAdmin amqpAdmin = context.getBean(AmqpAdmin.class); - Queue helloWorldQueue = new Queue("hello.world.queue"); - - amqpAdmin.declareQueue(helloWorldQueue); - - } - -} diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/Consumer.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/Consumer.java deleted file mode 100644 index 212f2bf881..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/Consumer.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.springframework.amqp.helloworld; - -import org.springframework.amqp.core.AmqpTemplate; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; - -public class Consumer { - - public static void main(String[] args) { - ApplicationContext context = new AnnotationConfigApplicationContext(HelloWorldConfiguration.class); - AmqpTemplate amqpTemplate = context.getBean(AmqpTemplate.class); - System.out.println("Received: " + amqpTemplate.receiveAndConvert()); - } - -} diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/HelloWorldConfiguration.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/HelloWorldConfiguration.java deleted file mode 100644 index 439a375937..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/HelloWorldConfiguration.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.springframework.amqp.helloworld; - -import org.springframework.amqp.core.Queue; -import org.springframework.amqp.rabbit.config.AbstractRabbitConfiguration; -import org.springframework.amqp.rabbit.connection.ConnectionFactory; -import org.springframework.amqp.rabbit.connection.SingleConnectionFactory; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class HelloWorldConfiguration extends AbstractRabbitConfiguration { - - protected final String helloWorldQueueName = "hello.world.queue"; - - @Bean - public ConnectionFactory connectionFactory() { - SingleConnectionFactory connectionFactory = new SingleConnectionFactory("localhost"); - connectionFactory.setUsername("guest"); - connectionFactory.setPassword("guest"); - return connectionFactory; - } - - @Override - public RabbitTemplate rabbitTemplate() { - RabbitTemplate template = new RabbitTemplate(connectionFactory()); - //The routing key is set to the name of the queue by the broker for the default exchange. - template.setRoutingKey(this.helloWorldQueueName); - //Where we will synchronously receive messages from - template.setQueue(this.helloWorldQueueName); - return template; - } - - @Bean - public Queue helloWorldQueue() { - return new Queue(this.helloWorldQueueName); - } - - /* - //Each queue is bound to the default direct exchange - @Bean - public Binding binding() { - return declare(new Binding(helloWorldQueue(), defaultDirectExchange())); - }*/ - - /* - @Bean - public TopicExchange helloExchange() { - return declare(new TopicExchange("hello.world.exchange")); - }*/ - - /* - public Queue declareUniqueQueue(String namePrefix) { - Queue queue = new Queue(namePrefix + "-" + UUID.randomUUID()); - rabbitAdminTemplate().declareQueue(queue); - return queue; - } - - // if the default exchange isn't configured to your liking.... - @Bean Binding declareP2PBinding(Queue queue, DirectExchange exchange) { - return declare(new Binding(queue, exchange, queue.getName())); - } - - @Bean Binding declarePubSubBinding(String queuePrefix, FanoutExchange exchange) { - return declare(new Binding(declareUniqueQueue(queuePrefix), exchange)); - } - - @Bean Binding declarePubSubBinding(UniqueQueue uniqueQueue, TopicExchange exchange) { - return declare(new Binding(uniqueQueue, exchange)); - } - - @Bean Binding declarePubSubBinding(String queuePrefix, TopicExchange exchange, String routingKey) { - return declare(new Binding(declareUniqueQueue(queuePrefix), exchange, routingKey)); - }*/ - -} diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/Producer.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/Producer.java deleted file mode 100644 index 42e18d2013..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/Producer.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.springframework.amqp.helloworld; - -import org.springframework.amqp.core.AmqpTemplate; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; - -public class Producer { - - public static void main(String[] args) { - ApplicationContext context = new AnnotationConfigApplicationContext(HelloWorldConfiguration.class); - AmqpTemplate amqpTemplate = context.getBean(AmqpTemplate.class); - amqpTemplate.convertAndSend("Hello World"); - System.out.println("Sent: Hello World"); - } - -} diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/Consumer.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/Consumer.java deleted file mode 100644 index 6018d53a4c..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/Consumer.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.springframework.amqp.helloworld.async; - -import org.springframework.context.annotation.AnnotationConfigApplicationContext; - -public class Consumer { - - public static void main(String[] args) { - new AnnotationConfigApplicationContext(ConsumerConfiguration.class); - } - -} diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/ConsumerConfiguration.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/ConsumerConfiguration.java deleted file mode 100644 index 681440f011..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/ConsumerConfiguration.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.springframework.amqp.helloworld.async; - -import org.springframework.amqp.helloworld.HelloWorldConfiguration; -import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer; -import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class ConsumerConfiguration extends HelloWorldConfiguration { - - @Bean - public SimpleMessageListenerContainer listenerContainer() { - SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); - container.setConnectionFactory(connectionFactory()); - container.setQueueName(this.helloWorldQueueName); - container.setMessageListener(new MessageListenerAdapter(new HelloWorldHandler())); - return container; - } - -} diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/HelloWorldHandler.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/HelloWorldHandler.java deleted file mode 100644 index 529c901a7d..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/HelloWorldHandler.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.springframework.amqp.helloworld.async; - -public class HelloWorldHandler { - - public void handleMessage(String text) { - System.out.println("Received: " + text); - } - -} diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/Producer.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/Producer.java deleted file mode 100644 index 3a00dc60e7..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/Producer.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.springframework.amqp.helloworld.async; - -import org.springframework.context.annotation.AnnotationConfigApplicationContext; - -public class Producer { - - public static void main(String[] args) throws Exception { - new AnnotationConfigApplicationContext(ProducerConfiguration.class); - } - -} diff --git a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/ProducerConfiguration.java b/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/ProducerConfiguration.java deleted file mode 100644 index 4d3784d88b..0000000000 --- a/spring-amqp-samples/helloworld/src/main/java/org/springframework/amqp/helloworld/async/ProducerConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.springframework.amqp.helloworld.async; - -import java.util.concurrent.atomic.AtomicInteger; - -import org.springframework.amqp.rabbit.config.AbstractRabbitConfiguration; -import org.springframework.amqp.rabbit.connection.ConnectionFactory; -import org.springframework.amqp.rabbit.connection.SingleConnectionFactory; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor; - -@Configuration -public class ProducerConfiguration extends AbstractRabbitConfiguration { - - protected final String helloWorldQueueName = "hello.world.queue"; - - @Override - public RabbitTemplate rabbitTemplate() { - RabbitTemplate template = new RabbitTemplate(connectionFactory()); - template.setRoutingKey(this.helloWorldQueueName); - return template; - } - - @Bean - public ConnectionFactory connectionFactory() { - SingleConnectionFactory connectionFactory = new SingleConnectionFactory("localhost"); - connectionFactory.setUsername("guest"); - connectionFactory.setPassword("guest"); - return connectionFactory; - } - - @Bean - public ScheduledProducer scheduledProducer() { - return new ScheduledProducer(); - } - - @Bean - public BeanPostProcessor postProcessor() { - return new ScheduledAnnotationBeanPostProcessor(); - } - - - static class ScheduledProducer { - - @Autowired - private volatile RabbitTemplate rabbitTemplate; - - private final AtomicInteger counter = new AtomicInteger(); - - @Scheduled(fixedRate = 3000) - public void sendMessage() { - rabbitTemplate.convertAndSend("Hello World " + counter.incrementAndGet()); - } - } - -} diff --git a/spring-amqp-samples/helloworld/src/main/resources/commons-logging.properties b/spring-amqp-samples/helloworld/src/main/resources/commons-logging.properties deleted file mode 100644 index 51cd942d4c..0000000000 --- a/spring-amqp-samples/helloworld/src/main/resources/commons-logging.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Use Log4j -priority=1 -org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl -org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger - -# Configuration file of the log -#log4j.configuration=file:log4j-rabbit-stocks.properties diff --git a/spring-amqp-samples/helloworld/src/main/resources/log4j.properties b/spring-amqp-samples/helloworld/src/main/resources/log4j.properties deleted file mode 100644 index abbb5c29d8..0000000000 --- a/spring-amqp-samples/helloworld/src/main/resources/log4j.properties +++ /dev/null @@ -1,11 +0,0 @@ -log4j.rootCategory=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -#log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -log4j.appender.stdout.layout.ConversionPattern=%-5p [%40.40c{4}]: %m%n - -log4j.category.org.springframework.amqp.rabbit=INFO -log4j.category.org.springframework.beans.factory=INFO - diff --git a/spring-amqp-samples/helloworld/src/main/resources/rabbitConfiguration.xml b/spring-amqp-samples/helloworld/src/main/resources/rabbitConfiguration.xml deleted file mode 100644 index 36a673c553..0000000000 --- a/spring-amqp-samples/helloworld/src/main/resources/rabbitConfiguration.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff --git a/spring-amqp-samples/stocks/.classpath b/spring-amqp-samples/stocks/.classpath deleted file mode 100644 index 438f0fe3b3..0000000000 --- a/spring-amqp-samples/stocks/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/spring-amqp-samples/stocks/.project b/spring-amqp-samples/stocks/.project deleted file mode 100644 index f08860bca3..0000000000 --- a/spring-amqp-samples/stocks/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - spring-rabbit-stocks - sample of a basic trading app using RabbitMQ - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-amqp-samples/stocks/pom.xml b/spring-amqp-samples/stocks/pom.xml deleted file mode 100644 index 2979ba19c4..0000000000 --- a/spring-amqp-samples/stocks/pom.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - 4.0.0 - org.springframework.samples.spring - spring-rabbit-stocks - 1.0.0.BUILD-SNAPSHOT - jar - Spring Rabbit Stocks - http://www.springframework.org - - - - - true - 3.0.3.RELEASE - 1.0.0.M3 - - - - strict - - false - - - - - - - - org.springframework.amqp - spring-amqp - ${spring.amqp.version} - - - org.springframework.amqp - spring-rabbit - ${spring.amqp.version} - - - - org.springframework - spring-test - ${spring.framework.version} - test - - - org.springframework - spring-context-support - ${spring.framework.version} - runtime - - - org.springframework - spring-aop - ${spring.framework.version} - - - org.springframework - spring-oxm - ${spring.framework.version} - - - cglib - cglib-nodep - 2.2 - - - aspectj - aspectjrt - 1.5.4 - - - aspectj - aspectjweaver - 1.5.4 - - - - - junit - junit - 4.8.1 - test - - - - log4j - log4j - 1.2.14 - runtime - - - - com.jgoodies - forms - 1.2.1 - - - - - - - - - com.springsource.bundlor - com.springsource.bundlor.maven - 1.0.0.M1B - - - maven-assembly-plugin - false - - - project - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - **/*Tests.java - - - **/Abstract*.java - - - - - - - - - Codehaus - http://repository.codehaus.org/ - - false - - - - - http://www.springframework.org/download - - staging - file:///${user.dir}/target/staging/org.springframework.batch.archetype/${pom.artifactId} - - - spring-release - Spring Release Repository - file:///${user.dir}/target/staging/release - - - spring-snapshot - Spring Snapshot Repository - file:///${user.dir}/target/staging/snapshot - - - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/AbstractStockAppRabbitConfiguration.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/AbstractStockAppRabbitConfiguration.java deleted file mode 100644 index d30e6a35a6..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/AbstractStockAppRabbitConfiguration.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.config; - -import org.springframework.amqp.core.TopicExchange; -import org.springframework.amqp.rabbit.config.AbstractRabbitConfiguration; -import org.springframework.amqp.rabbit.connection.ConnectionFactory; -import org.springframework.amqp.rabbit.connection.SingleConnectionFactory; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.amqp.support.converter.JsonMessageConverter; -import org.springframework.amqp.support.converter.MessageConverter; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * Provides shared configuration between Client and Server. - *

The abstract method configureRabbitTemplate lets the Client and Server further customize - * the rabbit template to their specific needs. - * - * @author Mark Pollack - * @author Mark Fisher - */ -@Configuration -public abstract class AbstractStockAppRabbitConfiguration extends AbstractRabbitConfiguration { - - /** - * Shared topic exchange used for publishing any market data (e.g. stock quotes) - */ - protected static String MARKET_DATA_EXCHANGE_NAME = "app.stock.marketdata"; - - /** - * The server-side consumer's queue that provides point-to-point semantics for stock requests. - */ - protected static String STOCK_REQUEST_QUEUE_NAME = "app.stock.request"; - - /** - * Key that clients will use to send to the stock request queue via the default direct exchange. - */ - protected static String STOCK_REQUEST_ROUTING_KEY = STOCK_REQUEST_QUEUE_NAME; - - - protected abstract void configureRabbitTemplate(RabbitTemplate template); - - @Bean - public ConnectionFactory connectionFactory() { - //TODO make it possible to customize in subclasses. - SingleConnectionFactory connectionFactory = new SingleConnectionFactory("localhost"); - connectionFactory.setUsername("guest"); - connectionFactory.setPassword("guest"); - return connectionFactory; - } - - @Bean - public RabbitTemplate rabbitTemplate() { - RabbitTemplate template = new RabbitTemplate(connectionFactory()); - template.setMessageConverter(jsonMessageConverter()); - configureRabbitTemplate(template); - return template; - } - - @Bean - public MessageConverter jsonMessageConverter() { - return new JsonMessageConverter(); - } - - @Bean - public TopicExchange marketDataExchange() { - return new TopicExchange(MARKET_DATA_EXCHANGE_NAME); - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/RoutingKey.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/RoutingKey.java deleted file mode 100644 index 2623aa7a1b..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/RoutingKey.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.config; - -/** - * Enumerations for the RoutingKeys used in the application to allow for a more fluent API - * style when configuring the broker in code. - * - * @author Mark Pollack - */ -public enum RoutingKey { - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/client/RabbitClientConfiguration.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/client/RabbitClientConfiguration.java deleted file mode 100644 index 0d73576f19..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/client/RabbitClientConfiguration.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.config.client; - - -import org.springframework.amqp.core.Binding; -import org.springframework.amqp.core.BindingBuilder; -import org.springframework.amqp.core.Queue; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer; -import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter; -import org.springframework.amqp.rabbit.stocks.config.AbstractStockAppRabbitConfiguration; -import org.springframework.amqp.rabbit.stocks.gateway.RabbitStockServiceGateway; -import org.springframework.amqp.rabbit.stocks.gateway.StockServiceGateway; -import org.springframework.amqp.rabbit.stocks.handler.ClientHandler; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * Configures RabbitTemplate and creates the Trader queue and binding for the client. - * - * @author Mark Pollack - * @author Mark Fisher - */ -@Configuration -public class RabbitClientConfiguration extends AbstractStockAppRabbitConfiguration { - - @Value("${stocks.quote.pattern}") - private String marketDataRoutingKey; - - @Autowired - private ClientHandler clientHandler; - - - // Create the Queue definitions that write up the Message listener container - - //private Queue marketDataQueue = new UniquelyNamedQueue("mktdata"); - - //private Queue traderJoeQueue = new UniquelyNamedQueue("joe"); - - /** - * The client's template will by default send to the exchange defined - * in {@link org.springframework.amqp.rabbit.config.AbstractRabbitConfiguration#rabbitTemplate()} - * with the routing key {@link AbstractStockAppRabbitConfiguration#STOCK_REQUEST_QUEUE_NAME} - *

- * The default exchange will delivery to a queue whose name matches the routing key value. - */ - @Override - public void configureRabbitTemplate(RabbitTemplate rabbitTemplate) { - rabbitTemplate.setRoutingKey(STOCK_REQUEST_QUEUE_NAME); - } - - @Bean - public StockServiceGateway stockServiceGateway() { - RabbitStockServiceGateway gateway = new RabbitStockServiceGateway(); - gateway.setRabbitTemplate(rabbitTemplate()); - gateway.setDefaultReplyToQueue(traderJoeQueue()); - return gateway; - } - - @Bean - public SimpleMessageListenerContainer messageListenerContainer() { - SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(connectionFactory()); - container.setQueues(marketDataQueue(), traderJoeQueue()); - container.setMessageListener(messageListenerAdapter()); - return container; - - //container(using(connectionFactory()).listenToQueues(marketDataQueue(), traderJoeQueue()).withListener(messageListenerAdapter()). - } - - @Bean - public MessageListenerAdapter messageListenerAdapter() { - return new MessageListenerAdapter(clientHandler, jsonMessageConverter()); - } - - - // Broker Configuration - -// @PostContruct -// public void declareClientBrokerConfiguration() { -// declare(marketDataQueue); -// declare(new Binding(marketDataQueue, MARKET_DATA_EXCHANGE, marketDataRoutingKey)); -// declare(traderJoeQueue); -// // no need to bind traderJoeQueue as it is automatically bound to the default direct exchanage, which is what we will use -// -// //add as many declare statements as needed like a script. -// } - - @Bean - public Queue marketDataQueue() { - return amqpAdmin().declareQueue(); - } - - /** - * Binds to the market data exchange. Interested in any stock quotes. - */ - @Bean - public Binding marketDataBinding() { - return BindingBuilder.from(marketDataQueue()).to(marketDataExchange()).with(marketDataRoutingKey); - } - - /** - * This queue does not need a binding, since it relies on the default exchange. - */ - @Bean - public Queue traderJoeQueue() { - return amqpAdmin().declareQueue(); - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/server/RabbitServerConfiguration.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/server/RabbitServerConfiguration.java deleted file mode 100644 index 6201ce19e6..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/config/server/RabbitServerConfiguration.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.config.server; - -import org.springframework.amqp.core.Queue; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.amqp.rabbit.stocks.config.AbstractStockAppRabbitConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * Configures RabbitTemplate for the server. - * - * @author Mark Pollack - * @author Mark Fisher - */ -@Configuration -public class RabbitServerConfiguration extends AbstractStockAppRabbitConfiguration { - - /** - * The server's template will by default send to the topic exchange named - * {@link AbstractStockAppRabbitConfiguration#MARKET_DATA_EXCHANGE_NAME}. - */ - public void configureRabbitTemplate(RabbitTemplate rabbitTemplate) { - rabbitTemplate.setExchange(MARKET_DATA_EXCHANGE_NAME); - } - - /** - * We don't need to define any binding for the stock request queue, since it's relying - * on the default (no-name) direct exchange to which every queue is implicitly bound. - */ - @Bean - public Queue stockRequestQueue() { - return new Queue(STOCK_REQUEST_QUEUE_NAME); - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/Quote.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/Quote.java deleted file mode 100644 index 96efabce32..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/Quote.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.domain; - -/** - * Domain object representing a stock quote. - * - * @author Mark Fisher - */ -public class Quote { - - private Stock stock; - private String price; - - public Quote() { - } - - public Quote(Stock stock, String price) { - this.stock = stock; - this.price = price; - } - - public Stock getStock() { - return this.stock; - } - - public void setStock(Stock stock) { - this.stock = stock; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/Stock.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/Stock.java deleted file mode 100644 index ac7faac9f4..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/Stock.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.domain; - -/** - * @author Mark Fisher - */ -public class Stock { - - private String ticker; - - private StockExchange stockExchange; - - public String getTicker() { - return ticker; - } - - public void setTicker(String ticker) { - this.ticker = ticker; - } - - public StockExchange getStockExchange() { - return stockExchange; - } - - public void setStockExchange(StockExchange stockExchange) { - this.stockExchange = stockExchange; - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/StockExchange.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/StockExchange.java deleted file mode 100644 index d7bfc6e200..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/StockExchange.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.domain; - -/** - * Enumeration for Stock Exchanges. - * - * @author Mark Fisher - */ -public enum StockExchange { - - nyse, nasdaq; - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/TradeRequest.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/TradeRequest.java deleted file mode 100644 index 7bac7e332a..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/TradeRequest.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.domain; - -import java.math.BigDecimal; - -/** - * Simple trade request 'data' object. No functionality in this 'domain' class. - * @author Mark Pollack - * - */ -public class TradeRequest { - - private String ticker; - - private long quantity; - - private BigDecimal price; - - private String orderType; - - private String accountName; - - private boolean buyRequest; - - private String userName; - - private String requestId; - - public String getTicker() { - return ticker; - } - - public void setTicker(String ticker) { - this.ticker = ticker; - } - - public long getQuantity() { - return quantity; - } - - public void setQuantity(long quantity) { - this.quantity = quantity; - } - - public BigDecimal getPrice() { - return price; - } - - public void setPrice(BigDecimal price) { - this.price = price; - } - - public String getOrderType() { - return orderType; - } - - public void setOrderType(String orderType) { - this.orderType = orderType; - } - - public String getAccountName() { - return accountName; - } - - public void setAccountName(String accountName) { - this.accountName = accountName; - } - - public boolean isBuyRequest() { - return buyRequest; - } - - public void setBuyRequest(boolean buyRequest) { - this.buyRequest = buyRequest; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getRequestId() { - return requestId; - } - - public void setRequestId(String requestId) { - this.requestId = requestId; - } - - - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/TradeResponse.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/TradeResponse.java deleted file mode 100644 index 8770a7fb99..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/domain/TradeResponse.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.domain; - -import java.math.BigDecimal; - -/** - * Simple trade request 'data' object. No functionality in this 'domain' class. - * @author Mark Pollack - * - */ -public class TradeResponse { - - private String ticker; - - private long quantity; - - private BigDecimal price; - - private String orderType; - - private String confirmationNumber; - - private boolean error; - - private String errorMessage; - - public String getTicker() { - return ticker; - } - - public void setTicker(String ticker) { - this.ticker = ticker; - } - - public long getQuantity() { - return quantity; - } - - public void setQuantity(long quantity) { - this.quantity = quantity; - } - - public BigDecimal getPrice() { - return price; - } - - public void setPrice(BigDecimal price) { - this.price = price; - } - - public String getOrderType() { - return orderType; - } - - public void setOrderType(String orderType) { - this.orderType = orderType; - } - - public String getConfirmationNumber() { - return confirmationNumber; - } - - public void setConfirmationNumber(String confirmationNumber) { - this.confirmationNumber = confirmationNumber; - } - - public boolean isError() { - return error; - } - - public void setError(boolean error) { - this.error = error; - } - - public String getErrorMessage() { - return errorMessage; - } - - public void setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - } - - @Override - public String toString() { - return "TradeResponse [confirmationNumber=" + confirmationNumber - + ", error=" + error + ", errorMessage=" + errorMessage - + ", orderType=" + orderType + ", price=" + price - + ", quantity=" + quantity + ", ticker=" + ticker + "]"; - } - - - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/MarketDataGateway.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/MarketDataGateway.java deleted file mode 100644 index 2ee93d4c28..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/MarketDataGateway.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.gateway; - -/** - * Gateway interface for sending market data to clients - * @author Mark Pollack - * - */ -public interface MarketDataGateway { - - void sendMarketData(); -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/RabbitMarketDataGateway.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/RabbitMarketDataGateway.java deleted file mode 100644 index 329910549a..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/RabbitMarketDataGateway.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.gateway; - -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.amqp.rabbit.core.support.RabbitGatewaySupport; -import org.springframework.amqp.rabbit.stocks.domain.Quote; -import org.springframework.amqp.rabbit.stocks.domain.Stock; -import org.springframework.amqp.rabbit.stocks.domain.StockExchange; - -/** - * Rabbit implementation of the {@link MarketDataGateway} for sending Market data. - * - * @author Mark Pollack - * @author Mark Fisher - */ -public class RabbitMarketDataGateway extends RabbitGatewaySupport implements MarketDataGateway { - - private static Log logger = LogFactory.getLog(RabbitMarketDataGateway.class); - - private static final Random random = new Random(); - - private final List stocks = new ArrayList(); - - - public RabbitMarketDataGateway() { - this.stocks.add(new MockStock("AAPL", StockExchange.nasdaq, 255)); - this.stocks.add(new MockStock("CSCO", StockExchange.nasdaq, 22)); - this.stocks.add(new MockStock("DELL", StockExchange.nasdaq, 15)); - this.stocks.add(new MockStock("GOOG", StockExchange.nasdaq, 500)); - this.stocks.add(new MockStock("INTC", StockExchange.nasdaq, 22)); - this.stocks.add(new MockStock("MSFT", StockExchange.nasdaq, 29)); - this.stocks.add(new MockStock("ORCL", StockExchange.nasdaq, 24)); - this.stocks.add(new MockStock("CAJ", StockExchange.nyse, 43)); - this.stocks.add(new MockStock("F", StockExchange.nyse, 12)); - this.stocks.add(new MockStock("GE", StockExchange.nyse, 18)); - this.stocks.add(new MockStock("HMC", StockExchange.nyse, 32)); - this.stocks.add(new MockStock("HPQ", StockExchange.nyse, 48)); - this.stocks.add(new MockStock("IBM", StockExchange.nyse, 130)); - this.stocks.add(new MockStock("TM", StockExchange.nyse, 76)); - } - - - public void sendMarketData() { - Quote quote = generateFakeQuote(); - Stock stock = quote.getStock(); - logger.info("Sending Market Data for " + stock.getTicker()); - String routingKey = "app.stock.quotes."+ stock.getStockExchange() + "." + stock.getTicker(); - getRabbitTemplate().convertAndSend(routingKey, quote); - } - - private Quote generateFakeQuote() { - MockStock stock = this.stocks.get(random.nextInt(this.stocks.size())); - String price = stock.randomPrice(); - return new Quote(stock, price); - } - - - private static class MockStock extends Stock { - - private final int basePrice; - private final DecimalFormat twoPlacesFormat = new DecimalFormat("0.00"); - - private MockStock(String ticker, StockExchange stockExchange, int basePrice) { - this.setTicker(ticker); - this.setStockExchange(stockExchange); - this.basePrice = basePrice; - } - - private String randomPrice() { - return this.twoPlacesFormat.format(this.basePrice + Math.abs(random.nextGaussian())); - } - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/RabbitStockServiceGateway.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/RabbitStockServiceGateway.java deleted file mode 100644 index 6ac673a050..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/RabbitStockServiceGateway.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.gateway; - -import java.io.UnsupportedEncodingException; -import java.util.UUID; - -import org.springframework.amqp.AmqpException; -import org.springframework.amqp.core.Address; -import org.springframework.amqp.core.Message; -import org.springframework.amqp.core.MessagePostProcessor; -import org.springframework.amqp.core.Queue; -import org.springframework.amqp.rabbit.core.support.RabbitGatewaySupport; -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; - -/** - * Rabbit implementation of {@link StockServiceGateway} to send trade requests to an external process. - * - * @author Mark Pollack - */ -public class RabbitStockServiceGateway extends RabbitGatewaySupport implements StockServiceGateway { - - private String defaultReplyToQueue; - - public void setDefaultReplyToQueue(String defaultReplyToQueue) { - this.defaultReplyToQueue = defaultReplyToQueue; - } - - public void setDefaultReplyToQueue(Queue defaultReplyToQueue) { - this.defaultReplyToQueue = defaultReplyToQueue.getName(); - } - - public void send(TradeRequest tradeRequest) { - getRabbitTemplate().convertAndSend(tradeRequest, new MessagePostProcessor() { - public Message postProcessMessage(Message message) throws AmqpException { - message.getMessageProperties().setReplyTo(new Address(defaultReplyToQueue)); - try { - message.getMessageProperties().setCorrelationId(UUID.randomUUID().toString().getBytes("UTF-8")); - } - catch (UnsupportedEncodingException e) { - throw new AmqpException(e); - } - return message; - } - }); - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/StockServiceGateway.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/StockServiceGateway.java deleted file mode 100644 index fa252034e7..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/gateway/StockServiceGateway.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.gateway; - -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; - -/** - * Gateway interface that sends trades to an external process. - * - * @author Mark Pollack - */ -public interface StockServiceGateway { - - void send(TradeRequest tradeRequest); - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/handler/ClientHandler.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/handler/ClientHandler.java deleted file mode 100644 index e7138e706a..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/handler/ClientHandler.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.handler; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.springframework.amqp.rabbit.stocks.domain.Quote; -import org.springframework.amqp.rabbit.stocks.domain.Stock; -import org.springframework.amqp.rabbit.stocks.domain.TradeResponse; -import org.springframework.amqp.rabbit.stocks.ui.StockController; - -/** - * POJO handler that receives market data and trade responses. Calls are delegated to the UI controller. - * - * @author Mark Pollack - * @author Mark Fisher - */ -public class ClientHandler { - - private static Log log = LogFactory.getLog(ClientHandler.class); - - private StockController stockController; - - public StockController getStockController() { - return stockController; - } - - public void setStockController(StockController stockController) { - this.stockController = stockController; - } - - public void handleMessage(Quote quote) { - Stock stock = quote.getStock(); - log.info("Received market data. Ticker = " + stock.getTicker() + ", Price = " + quote.getPrice()); - stockController.displayQuote(quote); - } - - public void handleMessage(TradeResponse tradeResponse) { - log.info("Received trade repsonse. [" + tradeResponse + "]"); - stockController.UpdateTrade(tradeResponse); - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/handler/ServerHandler.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/handler/ServerHandler.java deleted file mode 100644 index 2f965e139c..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/handler/ServerHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.handler; - -import java.util.ArrayList; -import java.util.List; - -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; -import org.springframework.amqp.rabbit.stocks.domain.TradeResponse; -import org.springframework.amqp.rabbit.stocks.service.CreditCheckService; -import org.springframework.amqp.rabbit.stocks.service.ExecutionVenueService; -import org.springframework.amqp.rabbit.stocks.service.TradingService; -import org.springframework.util.StringUtils; - - -/** - * POJO handler that receives trade requests and sends back a trade response. Main application - * logic sits here which coordinates between {@link ExecutionVenueService}, {@link CreditCheckService}, - * and {@link TradingService}. - * - * @author Mark Pollack - * - */ -public class ServerHandler { - - private ExecutionVenueService executionVenueService; - - private CreditCheckService creditCheckService; - - private TradingService tradingService; - - - - public ServerHandler(ExecutionVenueService executionVenueService, - CreditCheckService creditCheckService, - TradingService tradingService) { - this.executionVenueService = executionVenueService; - this.creditCheckService = creditCheckService; - this.tradingService = tradingService; - } - - public TradeResponse handleMessage(TradeRequest tradeRequest) - { - TradeResponse tradeResponse; - List errors = new ArrayList(); - if (creditCheckService.canExecute(tradeRequest, errors)) - { - tradeResponse = executionVenueService.executeTradeRequest(tradeRequest); - } - else - { - tradeResponse = new TradeResponse(); - tradeResponse.setError(true); - tradeResponse.setErrorMessage(StringUtils.arrayToCommaDelimitedString(errors.toArray())); - - } - tradingService.processTrade(tradeRequest, tradeResponse); - return tradeResponse; - } - - - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/CreditCheckService.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/CreditCheckService.java deleted file mode 100644 index 116ef61ebf..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/CreditCheckService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.service; - -import java.util.List; - -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; - -/** - * Credit service to see if the incoming trade can be processed. If it can not be processed - * a false value is returned and the error list contains information as to what went wrong. - * - * @author Mark Pollack - * - */ -public interface CreditCheckService { - - boolean canExecute(TradeRequest tradeRequest, List errors); - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/ExecutionVenueService.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/ExecutionVenueService.java deleted file mode 100644 index 51d4b81a7d..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/ExecutionVenueService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.service; - -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; -import org.springframework.amqp.rabbit.stocks.domain.TradeResponse; - -/** - * Executes the trade request, creating a Trade response. See the - * code flow in {@link org.springframework.amqp.rabbit.stocks.handler.ServerHandler} - * for its usage. - * - * @author Mark Pollack - */ -public interface ExecutionVenueService { - - TradeResponse executeTradeRequest(TradeRequest request); -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/TradingService.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/TradingService.java deleted file mode 100644 index a37174676e..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/TradingService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.service; - -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; -import org.springframework.amqp.rabbit.stocks.domain.TradeResponse; - -/** - * Trading Service to process trade requests and response. This is the place to perform - * any trade processing after executions. See code flow in - * {@link org.springframework.amqp.rabbit.stocks.handler.ServerHandler} - * - * @author Mark Pollack - */ -public interface TradingService { - - void processTrade(TradeRequest request, TradeResponse response); - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/CreditCheckServiceStub.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/CreditCheckServiceStub.java deleted file mode 100644 index 48e1b86086..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/CreditCheckServiceStub.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.service.stubs; - -import java.util.List; - -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; -import org.springframework.amqp.rabbit.stocks.service.CreditCheckService; - -/*** - * An implementation that always returns true (just like real-life for a mortgage check :) - * - * @author Mark Pollack - * - */ -public class CreditCheckServiceStub implements CreditCheckService { - - public boolean canExecute(TradeRequest tradeRequest, List errors) { - return true; - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/ExecutionVenueServiceStub.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/ExecutionVenueServiceStub.java deleted file mode 100644 index e7d6b06c56..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/ExecutionVenueServiceStub.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.service.stubs; - -import java.math.BigDecimal; -import java.util.Random; -import java.util.UUID; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; -import org.springframework.amqp.rabbit.stocks.domain.TradeResponse; -import org.springframework.amqp.rabbit.stocks.service.ExecutionVenueService; - -/** - * Execute the trade, setting the execution price to changing value in line with what the market data feed is producing. - * - * @author Mark Pollack - * - */ -public class ExecutionVenueServiceStub implements ExecutionVenueService { - - private static Log log = LogFactory.getLog(ExecutionVenueServiceStub.class); - - private Random random = new Random(); - - public TradeResponse executeTradeRequest(TradeRequest request) { - TradeResponse response = new TradeResponse(); - response.setOrderType(request.getOrderType()); - response.setPrice(calculatePrice(request.getTicker(), request.getQuantity(), request.getOrderType(), request.getPrice(), request.getUserName())); - response.setQuantity(request.getQuantity()); - response.setTicker(request.getTicker()); - response.setConfirmationNumber(UUID.randomUUID().toString()); - - - try { - log.info("Sleeping 2 seconds to simulate processing.."); - Thread.sleep(2000); - } catch (InterruptedException e) { - log.error("Didn't finish sleeping", e); - } - return response; - } - - private BigDecimal calculatePrice(String ticker, long quantity, - String orderType, BigDecimal price, String userName) { - // provide as sophisticated implementation...for now all the same price. - if (orderType.compareTo("LIMIT") == 0) - { - return price; - } - else - { - //in line with market data implementation - return new BigDecimal(22 + Math.abs(gaussian())); - } - } - - private double gaussian() { - return random.nextGaussian(); - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/TradingServiceStub.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/TradingServiceStub.java deleted file mode 100644 index 1cbe3bbe69..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/service/stubs/TradingServiceStub.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.service.stubs; - -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; -import org.springframework.amqp.rabbit.stocks.domain.TradeResponse; -import org.springframework.amqp.rabbit.stocks.service.TradingService; - -/** - * No-op implementation - * @author Mark Pollack - * - */ -public class TradingServiceStub implements TradingService { - - public void processTrade(TradeRequest request, TradeResponse response) { - - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/ui/StockController.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/ui/StockController.java deleted file mode 100644 index 4af6719832..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/ui/StockController.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.ui; - -import org.springframework.amqp.rabbit.stocks.domain.Quote; -import org.springframework.amqp.rabbit.stocks.domain.TradeRequest; -import org.springframework.amqp.rabbit.stocks.domain.TradeResponse; -import org.springframework.amqp.rabbit.stocks.gateway.StockServiceGateway; - -/** - * Basic controller for the UI. - * TODO: Fix that the UI can receive events before it's panel has been initialized. - * - * @author Mark Pollack - * @author Mark Fisher - */ -public class StockController { - - private StockPanel stockPanel; - - private StockServiceGateway stockServiceGateway; - - - public StockPanel getStockPanel() { - return stockPanel; - } - - public void setStockPanel(StockPanel stockPanel) { - this.stockPanel = stockPanel; - } - - public StockServiceGateway getStockServiceGateway() { - return stockServiceGateway; - } - - public void setStockServiceGateway(StockServiceGateway stockServiceGateway) { - this.stockServiceGateway = stockServiceGateway; - } - - // "Actions" - - public void sendTradeRequest(String text) { - String[] tokens = text.split("\\s"); - String quantityString = tokens[0]; - String ticker = tokens[1]; - int quantity = Integer.parseInt(quantityString); - TradeRequest tr = new TradeRequest(); - tr.setAccountName("ACCT-123"); - tr.setBuyRequest(true); - tr.setOrderType("MARKET"); - tr.setTicker(ticker); - tr.setQuantity(quantity); - tr.setRequestId("REQ-1"); - tr.setUserName("Joe Trader"); - tr.setUserName("Joe"); - stockServiceGateway.send(tr); - } - - public void displayQuote(Quote quote) { - //TODO race condition with message delivery and initalization... use @Configurable? - if (stockPanel != null) { - stockPanel.displayQuote(quote); - } - } - - public void UpdateTrade(TradeResponse tradeResponse) { - stockPanel.update(tradeResponse); - } - -} diff --git a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/ui/StockPanel.java b/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/ui/StockPanel.java deleted file mode 100644 index 7e47ccf9ad..0000000000 --- a/spring-amqp-samples/stocks/src/main/java/org/springframework/amqp/rabbit/stocks/ui/StockPanel.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks.ui; - -import java.awt.Color; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.text.DecimalFormat; - -import javax.swing.BorderFactory; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.SwingUtilities; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.springframework.amqp.rabbit.stocks.domain.Quote; -import org.springframework.amqp.rabbit.stocks.domain.Stock; -import org.springframework.amqp.rabbit.stocks.domain.TradeResponse; - -import com.jgoodies.forms.layout.CellConstraints; -import com.jgoodies.forms.layout.FormLayout; - -/** - * A typical poor mans UI to drive the application. - * - * @author Mark Pollack - * @author Mark Fisher - */ -@SuppressWarnings("serial") -public class StockPanel extends JPanel { - - private static Log log = LogFactory.getLog(StockPanel.class); - - private JTextField tradeRequestTextField; - private JButton tradeRequestButton; - private JTextArea marketDataTextArea; - private StockController stockController; - - private DecimalFormat frmt = new DecimalFormat("$0.00"); - - public StockPanel(StockController controller) { - this.stockController = controller; - controller.setStockPanel(this); - this.setBorder(BorderFactory.createTitledBorder("Stock Form")); - - FormLayout formLayout = new FormLayout("pref, 150dlu", // columns - "pref, fill:100dlu:grow"); // rows - setLayout(formLayout); - CellConstraints c = new CellConstraints(); - - tradeRequestButton = new JButton("Send Trade Request"); - add(tradeRequestButton, c.xy(1, 1)); - - tradeRequestTextField = new JTextField(""); - add(tradeRequestTextField, c.xy(2, 1)); - - add(new JLabel("Market Data"), c.xy(1, 2)); - - marketDataTextArea = new JTextArea(); - JScrollPane sp = new JScrollPane(marketDataTextArea); - sp.setSize(200, 300); - - add(sp, c.xy(2, 2)); - - tradeRequestTextField.addFocusListener(new FocusListener() { - public void focusLost(FocusEvent e) { - } - public void focusGained(FocusEvent e) { - tradeRequestTextField.setText(""); - tradeRequestTextField.setForeground(Color.BLACK); - } - }); - - tradeRequestButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - sendTradeRequest(); - } - }); - } - - private void sendTradeRequest() { - try { - stockController.sendTradeRequest(tradeRequestTextField.getText()); - tradeRequestTextField.setForeground(Color.GRAY); - tradeRequestTextField.setText("Request Pending..."); - log.info("Sent trade request."); - } - catch (Exception ex) { - tradeRequestTextField.setForeground(Color.RED); - tradeRequestTextField.setText("Required Format: 100 TCKR"); - } - } - - public static void main(String[] a) { - JFrame f = new JFrame("Rabbit Stock Demo"); - f.setDefaultCloseOperation(2); - f.add(new StockPanel(new StockController())); - f.pack(); - f.setVisible(true); - } - - public void displayQuote(final Quote quote) { - SwingUtilities.invokeLater(new Runnable() { - public void run() { - Stock stock = quote.getStock(); - marketDataTextArea.append(stock.getTicker() + " " + quote.getPrice() + "\n"); - } - }); - } - - public void update(final TradeResponse tradeResponse) { - SwingUtilities.invokeLater(new Runnable() { - public void run() { - tradeRequestTextField.setForeground(Color.GREEN); - tradeRequestTextField.setText("Confirmed. " - + tradeResponse.getTicker() + " " - + frmt.format(tradeResponse.getPrice().doubleValue())); - } - }); - } - -} diff --git a/spring-amqp-samples/stocks/src/main/resources/client-bootstrap-config.xml b/spring-amqp-samples/stocks/src/main/resources/client-bootstrap-config.xml deleted file mode 100644 index 4f98e692c2..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/client-bootstrap-config.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - diff --git a/spring-amqp-samples/stocks/src/main/resources/client-handlers.xml b/spring-amqp-samples/stocks/src/main/resources/client-handlers.xml deleted file mode 100644 index 94a5d6166e..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/client-handlers.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/spring-amqp-samples/stocks/src/main/resources/client-messaging.xml b/spring-amqp-samples/stocks/src/main/resources/client-messaging.xml deleted file mode 100644 index 6c942a6941..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/client-messaging.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-amqp-samples/stocks/src/main/resources/client.properties b/spring-amqp-samples/stocks/src/main/resources/client.properties deleted file mode 100644 index 077f318a3a..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/client.properties +++ /dev/null @@ -1 +0,0 @@ -stocks.quote.pattern=app.stock.quotes.nasdaq.* \ No newline at end of file diff --git a/spring-amqp-samples/stocks/src/main/resources/server-bootstrap-config.xml b/spring-amqp-samples/stocks/src/main/resources/server-bootstrap-config.xml deleted file mode 100644 index 129730d025..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/server-bootstrap-config.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/spring-amqp-samples/stocks/src/main/resources/server-handlers.xml b/spring-amqp-samples/stocks/src/main/resources/server-handlers.xml deleted file mode 100644 index 3f97d4df18..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/server-handlers.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - diff --git a/spring-amqp-samples/stocks/src/main/resources/server-jmx.xml b/spring-amqp-samples/stocks/src/main/resources/server-jmx.xml deleted file mode 100644 index c61a8b8e27..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/server-jmx.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/spring-amqp-samples/stocks/src/main/resources/server-messaging.xml b/spring-amqp-samples/stocks/src/main/resources/server-messaging.xml deleted file mode 100644 index ec76190823..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/server-messaging.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/spring-amqp-samples/stocks/src/main/resources/server-services.xml b/spring-amqp-samples/stocks/src/main/resources/server-services.xml deleted file mode 100644 index 29bcf31bae..0000000000 --- a/spring-amqp-samples/stocks/src/main/resources/server-services.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-amqp-samples/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/Client.java b/spring-amqp-samples/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/Client.java deleted file mode 100644 index fde50d8b08..0000000000 --- a/spring-amqp-samples/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/Client.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks; - -import javax.swing.JFrame; - -import org.junit.Test; - -import org.springframework.amqp.rabbit.stocks.ui.StockController; -import org.springframework.amqp.rabbit.stocks.ui.StockPanel; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Main client application, can run as an application or unit test. - * - * @author Mark Pollack - */ -public class Client { - - public static void main(String[] args) { - new Client().run(); - } - - @Test - public void run() { - ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("client-bootstrap-config.xml"); - StockController controller = context.getBean(StockController.class); - JFrame f = new JFrame("Rabbit Stock Demo"); - f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - //TODO consider @Configurable - f.add(new StockPanel(controller)); - f.pack(); - f.setVisible(true); - } - -} diff --git a/spring-amqp-samples/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/Server.java b/spring-amqp-samples/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/Server.java deleted file mode 100644 index 3c55c9c5fb..0000000000 --- a/spring-amqp-samples/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/Server.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed 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.springframework.amqp.rabbit.stocks; - -import org.junit.Test; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Server application than can be run as an app or unit test. - * - * @author Mark Pollack - */ -public class Server { - - public static void main(String[] args) { - new Server().run(); - } - - @Test - public void run() { - new ClassPathXmlApplicationContext("server-bootstrap-config.xml"); - } - -} diff --git a/spring-amqp-samples/stocks/src/test/resources/commons-logging.properties b/spring-amqp-samples/stocks/src/test/resources/commons-logging.properties deleted file mode 100644 index 51cd942d4c..0000000000 --- a/spring-amqp-samples/stocks/src/test/resources/commons-logging.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Use Log4j -priority=1 -org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl -org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger - -# Configuration file of the log -#log4j.configuration=file:log4j-rabbit-stocks.properties diff --git a/spring-amqp-samples/stocks/src/test/resources/log4j.properties b/spring-amqp-samples/stocks/src/test/resources/log4j.properties deleted file mode 100644 index 9687c70d5b..0000000000 --- a/spring-amqp-samples/stocks/src/test/resources/log4j.properties +++ /dev/null @@ -1,11 +0,0 @@ -log4j.rootCategory=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -#log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -log4j.appender.stdout.layout.ConversionPattern=%-5p [%40.40c{4}]: %m%n - -log4j.category.org.springframework.amqp.rabbit=DEBUG -log4j.category.org.springframework.beans.factory=INFO - diff --git a/spring-erlang/.classpath b/spring-erlang/.classpath deleted file mode 100644 index 1f3c1ff5e3..0000000000 --- a/spring-erlang/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-erlang/.project b/spring-erlang/.project deleted file mode 100644 index a3a7d1070a..0000000000 --- a/spring-erlang/.project +++ /dev/null @@ -1,35 +0,0 @@ - - - spring-erlang - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - org.springframework.ide.eclipse.core.springnature - org.maven.ide.eclipse.maven2Nature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/spring-erlang/.settings/org.eclipse.jdt.core.prefs b/spring-erlang/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index a8f8413151..0000000000 --- a/spring-erlang/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 29 21:59:29 EDT 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/spring-erlang/.settings/org.maven.ide.eclipse.prefs b/spring-erlang/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 7ccc99204a..0000000000 --- a/spring-erlang/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Jun 29 21:59:00 EDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/spring-rabbit/.classpath b/spring-rabbit/.classpath deleted file mode 100644 index 7a0eedb437..0000000000 --- a/spring-rabbit/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/spring-rabbit/.project b/spring-rabbit/.project deleted file mode 100644 index aa358fe8d8..0000000000 --- a/spring-rabbit/.project +++ /dev/null @@ -1,35 +0,0 @@ - - - spring-rabbit - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - org.springframework.ide.eclipse.core.springnature - org.maven.ide.eclipse.maven2Nature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/spring-rabbit/.settings/org.maven.ide.eclipse.prefs b/spring-rabbit/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 3b6164474a..0000000000 --- a/spring-rabbit/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Jun 29 21:59:01 EDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1