You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by le...@apache.org on 2013/02/04 14:31:00 UTC
svn commit: r1442109 - in /incubator/streams/trunk: streams-eip-routes/
streams-eip-routes/src/main/java/org/apache/streams/messaging/configuration/
streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/
streams-eip-routes/src/main/j...
Author: letourneau
Date: Mon Feb 4 13:30:58 2013
New Revision: 1442109
URL: http://svn.apache.org/viewvc?rev=1442109&view=rev
Log:
added subscriber registration routes and classes
Added:
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityPublisherRegistrationProcessor.java
- copied, changed from r1440439, incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityRegistrationProcessor.java
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityStreamsSubscriberRegistrationProcessor.java
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityConsumerRouteBuilder.java
- copied, changed from r1440439, incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityRouteBuilder.java
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityStreamsSubscriberRouteBuilder.java
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityStreamsSubscriberRouter.java
incubator/streams/trunk/streams-osgi-components/activity-registration/
incubator/streams/trunk/streams-osgi-components/activity-registration/osgi.bnd
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/osgi.bnd
incubator/streams/trunk/streams-osgi-components/activity-registration/pom.xml
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml
incubator/streams/trunk/streams-osgi-components/activity-registration/src/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/DEPENDENCIES
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DEPENDENCIES
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/DISCLAIMER
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DISCLAIMER
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/LICENSE
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/LICENSE
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/NOTICE
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/NOTICE
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml
incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/readme.txt
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/readme.txt
incubator/streams/trunk/streams-osgi-components/activity-subscriber/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/osgi.bnd
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/osgi.bnd
incubator/streams/trunk/streams-osgi-components/activity-subscriber/pom.xml
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/DEPENDENCIES
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DEPENDENCIES
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/DISCLAIMER
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DISCLAIMER
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/LICENSE
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/LICENSE
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/NOTICE
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/NOTICE
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml
incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/readme.txt
- copied, changed from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/readme.txt
Removed:
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityRegistrationProcessor.java
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityRouteBuilder.java
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/osgi.bnd
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DEPENDENCIES
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DISCLAIMER
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/LICENSE
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/NOTICE
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml
incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/readme.txt
Modified:
incubator/streams/trunk/streams-eip-routes/pom.xml
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/configuration/EipConfigurator.java
incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityConsumerRouter.java
incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/camelContext.xml
incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/osgi-component-import.xml
incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/routing.properties
incubator/streams/trunk/streams-osgi-components/pom.xml
Modified: incubator/streams/trunk/streams-eip-routes/pom.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/pom.xml?rev=1442109&r1=1442108&r2=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/pom.xml (original)
+++ incubator/streams/trunk/streams-eip-routes/pom.xml Mon Feb 4 13:30:58 2013
@@ -71,7 +71,7 @@
<Bundle-Version>${pom.version}</Bundle-Version>
<Export-Package>${bundle.namespace};version="${pom.version}",org.apache.streams.messaging.configuration,org.apache.streams.messaging.routers,org.apache.streams.messaging.rules,org.apache.streams.messaging.processors,org.apache.activemq</Export-Package>
<Private-Package>${bundle.namespace}.messaging.routers.impl.*,${bundle.namespace}.messaging.rules.impl.*</Private-Package>
- <Import-Package>org.apache.camel.*;version="2.8.5",org.apache.streams.messaging.configuration,org.apache.activemq.camel.component,org.apache.activemq,org.apache.activemq.pool,org.apache.camel.component.jms,org.springframework.*;version="3.0.6.RELEASE",org.apache.commons.logging,org.apache.streams.*,org.apache.streams.osgi.components,org.apache.streams.osgi.components.activityconsumer,org.apache.streams.messaging.processors,javax.jms, javax.net.ssl, javax.transaction.xa, org.apache.activemq.advisory, org.apache.activemq.blob, org.apache.activemq.broker, org.apache.activemq.broker.region, org.apache.activemq.command, org.apache.activemq.filter, org.apache.activemq.jndi, org.apache.activemq.management, org.apache.activemq.selector, org.apache.activemq.state, org.apache.activemq.thread, org.apache.activemq.transaction, org.apache.activemq.transport, org.apache.activemq.transport.failover, org.apache.activemq.transport.tcp, org.apache.activemq.usage, org.a
pache.activemq.util, org.slf4j</Import-Package>
+ <Import-Package>org.apache.camel.*;version="2.8.5",org.apache.streams.messaging.configuration,org.apache.activemq.camel.component,org.apache.activemq,org.apache.activemq.pool,org.apache.camel.component.jms,org.springframework.*;version="3.0.6.RELEASE",org.apache.commons.logging,org.apache.streams.*,org.apache.streams.osgi.components,org.apache.streams.osgi.components.activityconsumer,org.apache.streams.osgi.components.activitysubscriber,org.apache.streams.osgi.components.activitysubscriber.impl,org.apache.streams.messaging.processors,javax.jms, javax.net.ssl, javax.transaction.xa, org.apache.activemq.advisory, org.apache.activemq.blob, org.apache.activemq.broker, org.apache.activemq.broker.region, org.apache.activemq.command, org.apache.activemq.filter, org.apache.activemq.jndi, org.apache.activemq.management, org.apache.activemq.selector, org.apache.activemq.state, org.apache.activemq.thread, org.apache.activemq.transaction, org.apache.activemq.trans
port, org.apache.activemq.transport.failover, org.apache.activemq.transport.tcp, org.apache.activemq.usage, org.apache.activemq.util, org.slf4j</Import-Package>
<Include-Resource>src/main/resources</Include-Resource>
</instructions>
</configuration>
@@ -129,7 +129,7 @@
<dependency>
<groupId>org.apache.streams.osgi.components</groupId>
- <artifactId>activity-publisher-registration</artifactId>
+ <artifactId>activity-registration</artifactId>
<version>${pom.version}</version>
</dependency>
@@ -138,6 +138,12 @@
<artifactId>activity-consumer</artifactId>
<version>${pom.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.streams.osgi.components</groupId>
+ <artifactId>activity-subscriber</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/configuration/EipConfigurator.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/configuration/EipConfigurator.java?rev=1442109&r1=1442108&r2=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/configuration/EipConfigurator.java (original)
+++ incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/configuration/EipConfigurator.java Mon Feb 4 13:30:58 2013
@@ -14,6 +14,12 @@ public class EipConfigurator {
@Value("${consumer.inRoutePort}")
private String consumerInRoutePort;
+ @Value("${subscriber.inRouteHost}")
+ private String subscriberInRouteHost;
+
+ @Value("${subscriber.inRoutePort}")
+ private String subscriberInRoutePort;
+
@Value("${consumer.activityQUri}")
private String consumerActivityQUri;
@@ -22,6 +28,11 @@ public class EipConfigurator {
public static String CONSUMER_RECIEVE_METHOD = "receive";
public static String CONSUMER_SPLIT_METHOD = "split";
+ public static String SUBSCRIBER_URL_RESOURCE = "/streams/subscribe";
+ public static String SUBSCRIBER_RECEIVE_METHOD = "receive";
+ public static String SUBSCRIBER_POST_METHOD = "addSrc";
+ public static String SUBSCRIBER_GET_METHOD = "getStream";
+
public String getConsumerInRouteHost() {
return consumerInRouteHost;
}
@@ -46,6 +57,22 @@ public class EipConfigurator {
this.consumerInRouteHost = consumerInRouteHost;
}
+ public String getSubscriberInRouteHost() {
+ return subscriberInRouteHost;
+ }
+
+ public void setSubscriberInRouteHost(String subscriberInRouteHost) {
+ this.subscriberInRouteHost = subscriberInRouteHost;
+ }
+
+ public String getSubscriberInRoutePort() {
+ return subscriberInRoutePort;
+ }
+
+ public void setSubscriberInRoutePort(String subscriberInRoutePort) {
+ this.subscriberInRoutePort = subscriberInRoutePort;
+ }
+
}
Copied: incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityPublisherRegistrationProcessor.java (from r1440439, incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityRegistrationProcessor.java)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityPublisherRegistrationProcessor.java?p2=incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityPublisherRegistrationProcessor.java&p1=incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityRegistrationProcessor.java&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityRegistrationProcessor.java (original)
+++ incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityPublisherRegistrationProcessor.java Mon Feb 4 13:30:58 2013
@@ -8,7 +8,7 @@ import java.net.URI;
import java.net.URISyntaxException;
-public class ActivityRegistrationProcessor implements Processor{
+public class ActivityPublisherRegistrationProcessor implements Processor{
public void process(Exchange exchange){
//add the necessary headers to the message so that the activity registration component
@@ -22,7 +22,7 @@ public class ActivityRegistrationProcess
} else {
//for now...just expect a post with a uri in the body...should have some checking here with http response codes
- // authentication, all that good stuff...
+ // authentication, all that good stuff...happens in the registration module
String body = exchange.getIn().getBody(String.class);
try{
Added: incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityStreamsSubscriberRegistrationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityStreamsSubscriberRegistrationProcessor.java?rev=1442109&view=auto
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityStreamsSubscriberRegistrationProcessor.java (added)
+++ incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/processors/ActivityStreamsSubscriberRegistrationProcessor.java Mon Feb 4 13:30:58 2013
@@ -0,0 +1,69 @@
+package org.apache.streams.messaging.processors;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.commons.logging.impl.SimpleLog;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+
+
+public class ActivityStreamsSubscriberRegistrationProcessor implements Processor{
+
+ public void process(Exchange exchange){
+ //add the necessary headers to the message so that the activity registration component
+ //can do a lookup to either make a new processor and endpoint, or pass the message to the right one
+ String httpMethod = exchange.getIn().getHeader("CamelHttpMethod").toString();
+
+ if (!httpMethod.equals("POST")){
+ //reject anything that isn't a post...Camel 2.10 solves needing this check, however, SM 4.4 doesn't have the latest
+ exchange.getOut().setFault(true);
+ exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE,405);
+ } else {
+
+ //for now...just expect a post with a uri in the body...should have some checking here with http response codes
+ // authentication, all that good stuff...happens in the registration module
+
+
+ String body = exchange.getIn().getBody(String.class);
+
+ //OAuth token? What does subscriber post to init a subscription URL?
+ //maybe its a list of URLs to subscribe to subscriptions=1,2,3,4&auth_token=XXXX
+
+
+
+ try{
+ HashMap<String, String[]> parsedBody = parseBody(body);
+ if (parsedBody.get("subscriptions")==null){
+ throw new Exception();
+ }
+ exchange.getOut().setBody(body);
+ }catch(Exception e){
+ exchange.getOut().setFault(true);
+ exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE,400);
+ exchange.getOut().setBody("POST should contain subscriptions and auth_token key/value pair.");
+ }
+
+ //just pass this on to the route creator, body will be the dedicated URL for this subscriber
+
+ }
+
+
+
+ }
+
+ private HashMap<String, String[]> parseBody(String body) {
+ HashMap<String,String[]> parts = new HashMap<String, String[]>();
+ String[] segments = body.split("&");
+ for (String seg : segments){
+ String[] query = seg.split("=");
+ if (query.length>0) {
+ parts.put(query[0],query[1].split(","));
+ }
+ }
+
+ if (parts.isEmpty()){return null;}
+ return parts;
+ }
+}
Copied: incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityConsumerRouteBuilder.java (from r1440439, incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityRouteBuilder.java)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityConsumerRouteBuilder.java?p2=incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityConsumerRouteBuilder.java&p1=incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityRouteBuilder.java&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityRouteBuilder.java (original)
+++ incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityConsumerRouteBuilder.java Mon Feb 4 13:30:58 2013
@@ -6,7 +6,7 @@ import org.apache.camel.Exchange;
import org.apache.streams.osgi.components.activityconsumer.ActivityConsumer;
-public interface ActivityRouteBuilder {
+public interface ActivityConsumerRouteBuilder {
void createNewRouteForConsumer(Exchange exchange, ActivityConsumer activityConsumer);
Added: incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityStreamsSubscriberRouteBuilder.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityStreamsSubscriberRouteBuilder.java?rev=1442109&view=auto
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityStreamsSubscriberRouteBuilder.java (added)
+++ incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/ActivityStreamsSubscriberRouteBuilder.java Mon Feb 4 13:30:58 2013
@@ -0,0 +1,14 @@
+package org.apache.streams.messaging.routers;
+
+
+
+import org.apache.camel.Exchange;
+import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriber;
+
+
+public interface ActivityStreamsSubscriberRouteBuilder {
+
+
+ void createNewRouteForSubscriber(Exchange exchange, ActivityStreamsSubscriber activityStreamsSubscriber);
+
+}
Modified: incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityConsumerRouter.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityConsumerRouter.java?rev=1442109&r1=1442108&r2=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityConsumerRouter.java (original)
+++ incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityConsumerRouter.java Mon Feb 4 13:30:58 2013
@@ -2,27 +2,20 @@ package org.apache.streams.messaging.rou
import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.model.RouteDefinition;
-import org.apache.streams.messaging.routers.ActivityRouteBuilder;
-
+import org.apache.streams.messaging.routers.ActivityConsumerRouteBuilder;
import org.apache.streams.osgi.components.activityconsumer.ActivityConsumerWarehouse;
import org.apache.streams.osgi.components.activityconsumer.ActivityConsumer;
import org.apache.streams.messaging.configuration.EipConfigurator;
import org.springframework.beans.factory.annotation.Autowired;
-import org.apache.camel.Header;
-import org.apache.camel.Exchange;
import org.apache.camel.Exchange;
import org.apache.camel.CamelContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.camel.ExchangePattern;
-
-public class ActivityConsumerRouter extends RouteBuilder implements ActivityRouteBuilder {
+public class ActivityConsumerRouter extends RouteBuilder implements ActivityConsumerRouteBuilder {
private static final transient Log LOG = LogFactory.getLog(ActivityConsumerRouter.class);
@Autowired
@@ -44,7 +37,7 @@ public class ActivityConsumerRouter exte
public void createNewRouteForConsumer(Exchange exchange, ActivityConsumer activityConsumer){
//todo: add some better scheme then getCount for URL...
- //todo: make the route again if consumer exists...
+ //todo: make the route again if consumer exists...and context doesn't have route
ActivityConsumer existingConsumer = activityConsumerWarehouse.findConsumerBySrc(activityConsumer.getSrc());
if (existingConsumer==null){
Added: incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityStreamsSubscriberRouter.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityStreamsSubscriberRouter.java?rev=1442109&view=auto
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityStreamsSubscriberRouter.java (added)
+++ incubator/streams/trunk/streams-eip-routes/src/main/java/org/apache/streams/messaging/routers/impl/ActivityStreamsSubscriberRouter.java Mon Feb 4 13:30:58 2013
@@ -0,0 +1,114 @@
+package org.apache.streams.messaging.routers.impl;
+
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.streams.messaging.configuration.EipConfigurator;
+import org.apache.streams.messaging.routers.ActivityStreamsSubscriberRouteBuilder;
+import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriber;
+import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriberWarehouse;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.HashMap;
+import java.util.UUID;
+
+
+public class ActivityStreamsSubscriberRouter extends RouteBuilder implements ActivityStreamsSubscriberRouteBuilder {
+ private static final transient Log LOG = LogFactory.getLog(ActivityStreamsSubscriberRouter.class);
+
+ @Autowired
+ private EipConfigurator configuration;
+
+ protected CamelContext camelContext;
+
+ private ActivityStreamsSubscriberWarehouse activityStreamsSubscriberWarehouse;
+
+ public void setCamelContext(CamelContext camelContext) {
+ this.camelContext = camelContext;
+ }
+
+ public void setActivityStreamsSubscriberWarehouse(ActivityStreamsSubscriberWarehouse activityStreamsSubscriberWarehouse) {
+ this.activityStreamsSubscriberWarehouse = activityStreamsSubscriberWarehouse;
+ }
+
+
+ public void createNewRouteForSubscriber(Exchange exchange, ActivityStreamsSubscriber activityStreamsSubscriber){
+
+ //todo: add some better scheme then getCount for URL...
+ //todo: make the route again if subscriber exists...and context doesn't have route
+
+
+ // ActivityStreamsSubscriber existingConsumer = activityStreamsSubscriberWarehouse.findSubscriberBySrc(activityStreamsSubscriber.getSrc());
+
+
+
+ activityStreamsSubscriber.setInRoute("http://" + configuration.getSubscriberInRouteHost()+ ":" + configuration.getSubscriberInRoutePort() + EipConfigurator.SUBSCRIBER_URL_RESOURCE + "/" + UUID.randomUUID());
+
+
+ try{
+
+ //setup a message queue for this consumer.getInRoute()
+ camelContext.addRoutes(new DynamicSubscriberRouteBuilder(configuration,camelContext, "jetty:" + activityStreamsSubscriber.getInRoute(), activityStreamsSubscriber));
+ //set the body to the url the producer should post to
+ exchange.getOut().setBody(activityStreamsSubscriber.getInRoute());
+ log.info("subs : " + activityStreamsSubscriber.getSubscriptions());
+ activityStreamsSubscriber.setActivityStreamsSubscriberWarehouse(activityStreamsSubscriberWarehouse);
+ //only add the route to the warehouse after its been created in messaging system...
+ activityStreamsSubscriberWarehouse.register(activityStreamsSubscriber.getSubscriptions(),activityStreamsSubscriber);
+ }catch (Exception e){
+ exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE,500);
+ exchange.getOut().setBody("error creating route: " + e);
+ LOG.error("error creating route: " + e);
+ }
+
+
+
+ }
+
+
+
+
+ public void configure() throws Exception{
+ //nothing...set the context?
+
+ }
+
+ /**
+ * This route builder is a skeleton to add new routes at runtime
+ */
+ private static final class DynamicSubscriberRouteBuilder extends RouteBuilder {
+ private final String from;
+ private ActivityStreamsSubscriber activityStreamsSubscriber;
+
+
+ private EipConfigurator configuration;
+
+ private DynamicSubscriberRouteBuilder(EipConfigurator configuration, CamelContext context, String from, ActivityStreamsSubscriber activityStreamsSubscriber) {
+ super(context);
+ this.from = from;
+ this.activityStreamsSubscriber = activityStreamsSubscriber;
+ this.configuration = configuration;
+ }
+
+ @Override
+ public void configure() throws Exception {
+
+
+ from(from)
+ .choice()
+ .when(header("CamelHttpMethod").isEqualTo("POST"))
+ //when its a post...it goes to adding a new src
+ .bean(activityStreamsSubscriber, EipConfigurator.SUBSCRIBER_POST_METHOD).setBody(body())
+ .when(header("CamelHttpMethod").isEqualTo("GET"))
+ // when its a GET it goes to getStream()
+ .bean(activityStreamsSubscriber, EipConfigurator.SUBSCRIBER_GET_METHOD) ;
+
+
+
+ }
+ }
+
+}
Modified: incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/camelContext.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/camelContext.xml?rev=1442109&r1=1442108&r2=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/camelContext.xml (original)
+++ incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/camelContext.xml Mon Feb 4 13:30:58 2013
@@ -15,32 +15,51 @@
<camelContext id="context" xmlns="http://camel.apache.org/schema/spring">
- <!--registration route setup todo: get this from the properties file (host and port)-->
+ <!--publisher registration route setup todo: get this from the properties file (host and port)-->
<route>
- <from uri="jetty:http://localhost:8000/streams/register"/>
+ <from uri="jetty:http://localhost:8000/streams/publisher/register"/>
<bean ref="activityRegistrationProcessor" />
- <to uri="direct:register"/>
+ <to uri="direct:publisher-register"/>
</route>
<route>
- <from uri="direct:register"/>
+ <from uri="direct:publisher-register"/>
<bean ref="activityPublisherRegistration" method="register"/>
- <to uri="direct:add-route"/>
+ <to uri="direct:add-publisher-route"/>
</route>
<route>
- <from uri="direct:add-route"/>
- <bean ref="activityRouter" method="createNewRouteForConsumer"/>
+ <from uri="direct:add-publisher-route"/>
+ <bean ref="activityConsumerRouter" method="createNewRouteForConsumer"/>
<to uri="log:ExampleLog"/>
</route>
+ <!--split activities on Q, waiting for aggregation -->
+ <route>
+ <from uri="direct:activityQ"/>
+ <inOnly uri="activemq:queue:activities"/>
+ </route>
- <!--publishing route setup -->
+
+ <!-- register as a subscriber - returned the endpoint to poll and add to subscription sources - GET/POST -->
<route>
- <from uri="direct:activityQ"/>
- <inOnly uri="activemq:queue:activities"/>
+ <from uri="jetty:http://localhost:8000/streams/subscriber/register"/>
+ <bean ref="subscriberRegistrationProcessor" />
+ <to uri="direct:subscriber-register"/>
+ </route>
+
+ <route>
+ <from uri="direct:subscriber-register"/>
+ <bean ref="activityStreamsSubscriberRegistration" method="register"/>
+ <to uri="direct:add-subscriber-route"/>
+ </route>
+
+ <route>
+ <from uri="direct:add-subscriber-route"/>
+ <bean ref="activityStreamsSubscriberRouter" method="createNewRouteForSubscriber"/>
+ <to uri="log:ExampleLog"/>
</route>
Modified: incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/osgi-component-import.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/osgi-component-import.xml?rev=1442109&r1=1442108&r2=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/osgi-component-import.xml (original)
+++ incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/osgi-component-import.xml Mon Feb 4 13:30:58 2013
@@ -9,18 +9,26 @@
<osgi:reference id="activityPublisherRegistration" interface="org.apache.streams.osgi.components.ActivityPublisherRegistration" />
-
<osgi:reference id="activityConsumerWarehouse" interface="org.apache.streams.osgi.components.activityconsumer.ActivityConsumerWarehouse" />
+ <bean id="activityConsumerRouter" class="org.apache.streams.messaging.routers.impl.ActivityConsumerRouter">
+ <property name="activityConsumerWarehouse" ref="activityConsumerWarehouse"/>
+ <property name="camelContext" ref="context"/>
+ </bean>
+ <bean id="activityRegistrationProcessor" class="org.apache.streams.messaging.processors.ActivityPublisherRegistrationProcessor"/>
+
+
+ <osgi:reference id="activityStreamsSubscriberRegistration" interface="org.apache.streams.osgi.components.ActivityStreamsSubscriberRegistration" />
+ <osgi:reference id="activityStreamsSubscriberWarehouse" interface="org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriberWarehouse" />
+ <bean id="activityStreamsSubscriberRouter" class="org.apache.streams.messaging.routers.impl.ActivityStreamsSubscriberRouter">
+ <property name="activityStreamsSubscriberWarehouse" ref="activityStreamsSubscriberWarehouse"/>
+ <property name="camelContext" ref="context"/>
+ </bean>
+ <bean id="subscriberRegistrationProcessor" class="org.apache.streams.messaging.processors.ActivityStreamsSubscriberRegistrationProcessor"/>
- <bean id="activityRegistrationProcessor" class="org.apache.streams.messaging.processors.ActivityRegistrationProcessor"/>
- <bean id="activityRouter" class="org.apache.streams.messaging.routers.impl.ActivityConsumerRouter">
- <property name="activityConsumerWarehouse" ref="activityConsumerWarehouse"/>
- <property name="camelContext" ref="context"/>
- </bean>
<bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
Modified: incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/routing.properties
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/routing.properties?rev=1442109&r1=1442108&r2=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/routing.properties (original)
+++ incubator/streams/trunk/streams-eip-routes/src/main/resources/META-INF/spring/routing.properties Mon Feb 4 13:30:58 2013
@@ -1,3 +1,6 @@
consumer.inRouteHost=localhost
consumer.inRoutePort=8000
-consumer.activityQUri = direct:activityQ
\ No newline at end of file
+consumer.activityQUri = direct:activityQ
+
+subscriber.inRouteHost=localhost
+subscriber.inRoutePort=8000
\ No newline at end of file
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/osgi.bnd (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/osgi.bnd)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/osgi.bnd?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/osgi.bnd&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/osgi.bnd&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/pom.xml (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/pom.xml?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/pom.xml&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml (original)
+++ incubator/streams/trunk/streams-osgi-components/activity-registration/pom.xml Mon Feb 4 13:30:58 2013
@@ -4,14 +4,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<properties>
- <bundle.symbolicName>activity-publisher-registration-bundle</bundle.symbolicName>
+ <bundle.symbolicName>activity-registration-bundle</bundle.symbolicName>
<bundle.namespace>org.apache.streams.osgi.components</bundle.namespace>
<commons.log>1.1</commons.log>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.streams.osgi.components</groupId>
- <artifactId>activity-publisher-registration</artifactId>
+ <artifactId>activity-registration</artifactId>
<version>0.1-SNAPSHOT</version>
<name>${bundle.symbolicName} [${bundle.namespace}]</name>
@@ -37,6 +37,15 @@
</resources>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.ops4j</groupId>
<artifactId>maven-pax-plugin</artifactId>
<version>1.5</version>
@@ -60,7 +69,7 @@
<Bundle-Version>${pom.version}</Bundle-Version>
<Export-Package>${bundle.namespace};version="${pom.version}"</Export-Package>
<Private-Package>${bundle.namespace}.impl.*</Private-Package>
- <Import-Package>org.apache.streams.osgi.components.activityconsumer.impl,org.apache.commons.logging</Import-Package>
+ <Import-Package>org.apache.streams.osgi.components.activityconsumer.impl,org.apache.streams.osgi.components.activitysubscriber.impl,org.apache.commons.logging</Import-Package>
<Include-Resource>src/main/resources</Include-Resource>
</instructions>
</configuration>
@@ -94,6 +103,11 @@
<artifactId>activity-consumer</artifactId>
<version>${pom.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.streams.osgi.components</groupId>
+ <artifactId>activity-subscriber</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java (original)
+++ incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java Mon Feb 4 13:30:58 2013
@@ -3,7 +3,7 @@ package org.apache.streams.osgi.componen
/**
* Public API representing an example OSGi service
*/
-public interface ActivityPublisherRegistration {
+public interface ActivityStreamsSubscriberRegistration {
public Object register(Object obj);
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Added: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java?rev=1442109&view=auto
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java (added)
+++ incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java Mon Feb 4 13:30:58 2013
@@ -0,0 +1,59 @@
+package org.apache.streams.osgi.components.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.streams.osgi.components.ActivityStreamsSubscriberRegistration;
+import org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriberDelegate;
+
+import java.util.Date;
+import java.util.HashMap;
+
+public class ActivityStreamsSubscriberRegistrationImpl implements ActivityStreamsSubscriberRegistration {
+ private static final transient Log LOG = LogFactory.getLog(ActivityStreamsSubscriberRegistrationImpl.class);
+ private boolean verbose = true;
+ private String prefix = "Activity Subscriber Registration";
+
+ public Object register(Object body) {
+
+ //authorize this subscriber based on some rule set...
+ //create a new SubscriberDelegate...
+ //using the URI supplied to set it up...
+ //return the consumer for addition to the consumer warehouse
+
+ HashMap<String,String[]> bodyParts = parseBody(body.toString());
+ String answer = prefix + " set body: " + body + " " + new Date();
+ LOG.info(">> setting up subscriptions >>" + bodyParts.get("subscriptions"));
+ if (bodyParts.get("subscriptions")!=null){return new ActivityStreamsSubscriberDelegate(bodyParts.get("subscriptions"));}
+ return new ActivityStreamsSubscriberDelegate();
+ }
+
+ private HashMap<String, String[]> parseBody(String body) {
+ HashMap<String,String[]> parts = new HashMap<String, String[]>();
+ String[] segments = body.split("&");
+ for (String seg : segments){
+ String[] query = seg.split("=");
+ if (query.length>0) {
+ parts.put(query[0],query[1].split(","));
+ }
+ }
+
+ if (parts.isEmpty()){return null;}
+ return parts;
+ }
+
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ public String getPrefix() {
+ return prefix;
+ }
+
+ public void setPrefix(String prefix) {
+ this.prefix = prefix;
+ }
+}
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/DEPENDENCIES (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DEPENDENCIES)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/DEPENDENCIES?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/DEPENDENCIES&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DEPENDENCIES&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/DISCLAIMER (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DISCLAIMER)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/DISCLAIMER?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/DISCLAIMER&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DISCLAIMER&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/LICENSE (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/LICENSE)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/LICENSE?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/LICENSE&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/LICENSE&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/NOTICE (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/NOTICE)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/NOTICE?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/NOTICE&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/NOTICE&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml (original)
+++ incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml Mon Feb 4 13:30:58 2013
@@ -8,5 +8,6 @@
http://www.springframework.org/schema/osgi/spring-osgi.xsd">
<osgi:service ref="activityPublisherRegistration" interface="org.apache.streams.osgi.components.ActivityPublisherRegistration"/>
+ <osgi:service ref="activityStreamsSubscriberRegistration" interface="org.apache.streams.osgi.components.ActivityStreamsSubscriberRegistration"/>
</beans>
\ No newline at end of file
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml (original)
+++ incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml Mon Feb 4 13:30:58 2013
@@ -8,4 +8,5 @@ bundle. The configuration of OSGi defini
configuration file so that this file can easily be used
for integration testing outside of an OSGi environment -->
<bean id="activityPublisherRegistration" class="org.apache.streams.osgi.components.impl.ActivityPublisherRegistrationImpl"/>
+ <bean id="activityStreamsSubscriberRegistration" class="org.apache.streams.osgi.components.impl.ActivityStreamsSubscriberRegistrationImpl"/>
</beans>
\ No newline at end of file
Copied: incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/readme.txt (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/readme.txt)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/readme.txt?p2=incubator/streams/trunk/streams-osgi-components/activity-registration/src/main/resources/readme.txt&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/readme.txt&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/osgi.bnd (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/osgi.bnd)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/osgi.bnd?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/osgi.bnd&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/osgi.bnd&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/pom.xml (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/pom.xml?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/pom.xml&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/pom.xml (original)
+++ incubator/streams/trunk/streams-osgi-components/activity-subscriber/pom.xml Mon Feb 4 13:30:58 2013
@@ -4,14 +4,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<properties>
- <bundle.symbolicName>activity-publisher-registration-bundle</bundle.symbolicName>
- <bundle.namespace>org.apache.streams.osgi.components</bundle.namespace>
+ <bundle.symbolicName>activity-subscriber-bundle</bundle.symbolicName>
+ <bundle.namespace>org.apache.streams.osgi.components.activitysubscriber</bundle.namespace>
<commons.log>1.1</commons.log>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.streams.osgi.components</groupId>
- <artifactId>activity-publisher-registration</artifactId>
+ <artifactId>activity-subscriber</artifactId>
<version>0.1-SNAPSHOT</version>
<name>${bundle.symbolicName} [${bundle.namespace}]</name>
@@ -37,6 +37,16 @@
</resources>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
<groupId>org.ops4j</groupId>
<artifactId>maven-pax-plugin</artifactId>
<version>1.5</version>
@@ -58,9 +68,9 @@
<instructions>
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
<Bundle-Version>${pom.version}</Bundle-Version>
- <Export-Package>${bundle.namespace};version="${pom.version}"</Export-Package>
+ <Export-Package>${bundle.namespace};version="${pom.version}",org.apache.streams.osgi.components.activitysubscriber.impl</Export-Package>
<Private-Package>${bundle.namespace}.impl.*</Private-Package>
- <Import-Package>org.apache.streams.osgi.components.activityconsumer.impl,org.apache.commons.logging</Import-Package>
+ <Import-Package>org.apache.streams.osgi.components.activitysubscriber,org.apache.commons.logging</Import-Package>
<Include-Resource>src/main/resources</Include-Resource>
</instructions>
</configuration>
@@ -76,6 +86,7 @@
<scope>provided</scope>
<optional>true</optional>
</dependency>
+
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi_R4_compendium</artifactId>
@@ -89,11 +100,6 @@
<version>${commons.log}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.streams.osgi.components</groupId>
- <artifactId>activity-consumer</artifactId>
- <version>${pom.version}</version>
- </dependency>
</dependencies>
</project>
\ No newline at end of file
Added: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java?rev=1442109&view=auto
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java (added)
+++ incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java Mon Feb 4 13:30:58 2013
@@ -0,0 +1,18 @@
+package org.apache.streams.osgi.components.activitysubscriber;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public interface ActivityStreamsSubscriber {
+ public void receive(String activity);
+ public String getStream();
+ public void init();
+ public void setActivityStreamsSubscriberWarehouse(ActivityStreamsSubscriberWarehouse warehouse);
+ public void addSrc(String[] src);
+ public void addSrc(String src);
+ public String[] getSubscriptions();
+ public void setInRoute(String route);
+ public String getInRoute();
+
+}
Added: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java?rev=1442109&view=auto
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java (added)
+++ incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java Mon Feb 4 13:30:58 2013
@@ -0,0 +1,16 @@
+package org.apache.streams.osgi.components.activitysubscriber;
+
+import java.util.ArrayList;
+
+/**
+ * Public API representing an example OSGi service
+ */
+public interface ActivityStreamsSubscriberWarehouse {
+
+ public void register(String src, ActivityStreamsSubscriber activitySubscriber);
+ public void register(String[] src, ActivityStreamsSubscriber activitySubscriber);
+ public ArrayList<ActivityStreamsSubscriber> findSubscribersBySrc(String src);
+
+
+}
+
Added: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java?rev=1442109&view=auto
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java (added)
+++ incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java Mon Feb 4 13:30:58 2013
@@ -0,0 +1,108 @@
+package org.apache.streams.osgi.components.activitysubscriber.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriber;
+import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriberWarehouse;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public class ActivityStreamsSubscriberDelegate implements ActivityStreamsSubscriber {
+
+ private static final transient Log LOG = LogFactory.getLog(ActivityStreamsSubscriberDelegate.class);
+
+
+
+ private ActivityStreamsSubscriberWarehouse activityStreamsSubscriberWarehouse;
+
+ private String inRoute;
+
+ //an individual subscriber gets ONE stream which is an aggregation of all its SRCs
+ private ArrayList<String> stream;
+
+
+
+ private String[] subscriptions;
+
+ public ActivityStreamsSubscriberDelegate(){
+
+ stream = new ArrayList<String>();
+ }
+
+ public ActivityStreamsSubscriberDelegate(String[] subscriptions){
+
+ this();
+ this.subscriptions=subscriptions;
+
+ }
+
+ public void setActivityStreamsSubscriberWarehouse(ActivityStreamsSubscriberWarehouse activityStreamsSubscriberWarehouse) {
+ this.activityStreamsSubscriberWarehouse = activityStreamsSubscriberWarehouse;
+ }
+
+
+ public String getInRoute() {
+ return inRoute;
+ }
+
+ public void setInRoute(String inRoute) {
+ this.inRoute = inRoute;
+ }
+
+ public String[] getSubscriptions() {
+ return subscriptions;
+ }
+
+ public void addSrc(String src){
+ HashMap<String,String[]> bodyParts = parseBody(src);
+
+ activityStreamsSubscriberWarehouse.register(bodyParts.get("subscriptions"),this);
+ }
+
+ public void addSrc(String[] src){
+
+ activityStreamsSubscriberWarehouse.register(src,this);
+ }
+
+
+ public void receive (String activity){
+ //receive activities...do anything that is necessary
+ LOG.info("got a message i subscribed to: " + activity);
+ //guarenteed unique?
+ stream.add(activity);
+
+ }
+
+ //return the list of activities (stream) as a json string
+ public String getStream() {
+
+ return stream.toString();
+ }
+
+
+
+ public void init(){
+ //any initialization... gets called directly after registration
+
+
+
+ }
+
+ private HashMap<String, String[]> parseBody(String body) {
+ HashMap<String,String[]> parts = new HashMap<String, String[]>();
+ String[] segments = body.split("&");
+ for (String seg : segments){
+ String[] query = seg.split("=");
+ if (query.length>0) {
+ parts.put(query[0],query[1].split(","));
+ }
+ }
+
+ if (parts.isEmpty()){return null;}
+ return parts;
+ }
+
+
+
+}
Added: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java?rev=1442109&view=auto
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java (added)
+++ incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java Mon Feb 4 13:30:58 2013
@@ -0,0 +1,53 @@
+package org.apache.streams.osgi.components.activitysubscriber.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriber;
+import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriberWarehouse;
+
+
+public class ActivityStreamsSubscriberWarehouseImpl implements ActivityStreamsSubscriberWarehouse {
+ private static final transient Log LOG = LogFactory.getLog(ActivityStreamsSubscriberWarehouseImpl.class);
+
+ private HashMap<String,ArrayList<ActivityStreamsSubscriber>> subscribers;
+
+ public ActivityStreamsSubscriberWarehouseImpl(){
+ subscribers = new HashMap<String, ArrayList<ActivityStreamsSubscriber>>();
+ subscribers.put(null,new ArrayList<ActivityStreamsSubscriber>());
+ }
+
+ public void register(String src, ActivityStreamsSubscriber activitySubscriber) {
+
+ ArrayList<ActivityStreamsSubscriber> registeredSubscribers = subscribers.get(src);
+
+ if (registeredSubscribers==null){
+ registeredSubscribers = new ArrayList<ActivityStreamsSubscriber>();
+ }
+
+ registeredSubscribers.add(activitySubscriber);
+ subscribers.put(src,registeredSubscribers);
+ activitySubscriber.init();
+
+
+ }
+
+ public void register(String[] src, ActivityStreamsSubscriber activitySubscriber) {
+
+ for (String s : src){
+ register(s,activitySubscriber);
+ }
+
+
+ }
+
+
+
+ public ArrayList<ActivityStreamsSubscriber> findSubscribersBySrc(String src){
+ return subscribers.get(src);
+ }
+
+
+
+}
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/DEPENDENCIES (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DEPENDENCIES)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/DEPENDENCIES?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/DEPENDENCIES&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DEPENDENCIES&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/DISCLAIMER (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DISCLAIMER)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/DISCLAIMER?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/DISCLAIMER&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/DISCLAIMER&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/LICENSE (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/LICENSE)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/LICENSE?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/LICENSE&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/LICENSE&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/NOTICE (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/NOTICE)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/NOTICE?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/NOTICE&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/NOTICE&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publisher-registration-context.xml (original)
+++ incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml Mon Feb 4 13:30:58 2013
@@ -7,5 +7,5 @@
bundle. The configuration of OSGi definitions is kept in a separate
configuration file so that this file can easily be used
for integration testing outside of an OSGi environment -->
- <bean id="activityPublisherRegistration" class="org.apache.streams.osgi.components.impl.ActivityPublisherRegistrationImpl"/>
+ <bean id="activitySubscriberWarehouse" class="org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriberWarehouseImpl"/>
</beans>
\ No newline at end of file
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/META-INF/spring/activity-publusher-registration-context-osgi.xml (original)
+++ incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml Mon Feb 4 13:30:58 2013
@@ -7,6 +7,6 @@
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd">
- <osgi:service ref="activityPublisherRegistration" interface="org.apache.streams.osgi.components.ActivityPublisherRegistration"/>
+ <osgi:service ref="activitySubscriberWarehouse" interface="org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriberWarehouse"/>
</beans>
\ No newline at end of file
Copied: incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/readme.txt (from r1440439, incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/readme.txt)
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/readme.txt?p2=incubator/streams/trunk/streams-osgi-components/activity-subscriber/src/main/resources/readme.txt&p1=incubator/streams/trunk/streams-osgi-components/activity-publisher-registration/src/main/resources/readme.txt&r1=1440439&r2=1442109&rev=1442109&view=diff
==============================================================================
(empty)
Modified: incubator/streams/trunk/streams-osgi-components/pom.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-osgi-components/pom.xml?rev=1442109&r1=1442108&r2=1442109&view=diff
==============================================================================
--- incubator/streams/trunk/streams-osgi-components/pom.xml (original)
+++ incubator/streams/trunk/streams-osgi-components/pom.xml Mon Feb 4 13:30:58 2013
@@ -18,8 +18,9 @@
<modules>
- <module>activity-publisher-registration</module>
+ <module>activity-registration</module>
<module>activity-consumer</module>
+ <module>activity-subscriber</module>
<module>streams-components-all</module>
</modules>