summaryrefslogtreecommitdiffstats
path: root/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-09 20:10:46 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-09 20:10:46 +0000
commitcdc9990c35dee3a4398d757252bb14f0415aa186 (patch)
tree83aa0477077c4345be68e17756b57f20b67e6b98 /branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event
parent8ff4657da7b5a1da59a21a65b675d26bcf033417 (diff)
Deleted modules moved under the modules directory.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@693585 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event')
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/BaseEventPublisher.java89
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStart.java54
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStop.java53
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationEnd.java53
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationStart.java52
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionEnd.java53
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionStart.java52
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestEnd.java45
-rw-r--r--branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestStart.java45
9 files changed, 0 insertions, 496 deletions
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/BaseEventPublisher.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/BaseEventPublisher.java
deleted file mode 100644
index 936717d7fd..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/BaseEventPublisher.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.apache.tuscany.sca.event.Event;
-import org.apache.tuscany.sca.event.EventFilter;
-import org.apache.tuscany.sca.event.EventPublisher;
-import org.apache.tuscany.sca.event.RuntimeEventListener;
-import org.apache.tuscany.sca.event.TrueFilter;
-
-/**
- * Base implementation of an <code>EventPublisher</code>
- *
- * @version $Rev: 537240 $ $Date: 2007-05-11 10:35:03 -0700 (Fri, 11 May 2007) $
- */
-public abstract class BaseEventPublisher implements EventPublisher {
- protected static final EventFilter TRUE_FILTER = new TrueFilter();
- protected Map<EventFilter, List<RuntimeEventListener>> listeners;
-
- public void addListener(RuntimeEventListener listener) {
- addListener(TRUE_FILTER, listener);
- }
-
- public void removeListener(RuntimeEventListener listener) {
- assert listener != null : "Listener cannot be null";
- synchronized (getListeners()) {
- for (List<RuntimeEventListener> currentList : getListeners().values()) {
- for (RuntimeEventListener current : currentList) {
- if (current == listener) {
- currentList.remove(current);
- return;
- }
- }
- }
- }
- }
-
- public void addListener(EventFilter filter, RuntimeEventListener listener) {
- assert listener != null : "Listener cannot be null";
- synchronized (getListeners()) {
- List<RuntimeEventListener> list = getListeners().get(filter);
- if (list == null) {
- list = new CopyOnWriteArrayList<RuntimeEventListener>();
- listeners.put(filter, list);
- }
- list.add(listener);
- }
- }
-
- public void publish(Event event) {
- assert event != null : "Event object was null";
- for (Map.Entry<EventFilter, List<RuntimeEventListener>> entry : getListeners().entrySet()) {
- if (entry.getKey().match(event)) {
- for (RuntimeEventListener listener : entry.getValue()) {
- listener.onEvent(event);
- }
- }
- }
- }
-
- protected Map<EventFilter, List<RuntimeEventListener>> getListeners() {
- if (listeners == null) {
- listeners = new ConcurrentHashMap<EventFilter, List<RuntimeEventListener>>();
- }
- return listeners;
- }
-
-}
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStart.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStart.java
deleted file mode 100644
index 7770c9133b..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStart.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import java.net.URI;
-
-import org.apache.tuscany.sca.event.Event;
-
-/**
- * Propagated when a component starts
- *
- * @version $$Rev: 639271 $$ $$Date: 2008-03-20 05:54:38 -0700 (Thu, 20 Mar 2008) $$
- */
-public class ComponentStart implements Event {
-
- private Object source;
- private URI uri;
-
- /**
- * Creates a component start event
- *
- * @param source the source of the event
- * @param componentURI the URI of the component being started
- */
- public ComponentStart(Object source, URI componentURI) {
- this.source = source;
- this.uri = componentURI;
- }
-
- public URI getComponentURI() {
- return uri;
- }
-
- public Object getSource() {
- return source;
- }
-
-}
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStop.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStop.java
deleted file mode 100644
index 195971dc8f..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStop.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import java.net.URI;
-
-import org.apache.tuscany.sca.event.Event;
-
-/**
- * Propagated when a component stops
- *
- * @version $$Rev: 537240 $$ $$Date: 2007-05-11 10:35:03 -0700 (Fri, 11 May 2007) $$
- */
-public class ComponentStop implements Event {
-
- private Object source;
- private URI uri;
-
- /**
- * Creates a component stop event
- *
- * @param source the source of the event
- * @param componentUri the composite component associated the component being stopped
- */
- public ComponentStop(Object source, URI componentUri) {
- this.source = source;
- this.uri = componentUri;
- }
-
- public URI getComponentURI() {
- return uri;
- }
-
- public Object getSource() {
- return source;
- }
-}
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationEnd.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationEnd.java
deleted file mode 100644
index 99ec0d2bef..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationEnd.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import org.apache.tuscany.sca.event.Event;
-
-
-
-/**
- * Propagated when a conversation is expired
- *
- * @version $$Rev: 537240 $$ $$Date: 2007-05-11 10:35:03 -0700 (Fri, 11 May 2007) $$
- */
-public class ConversationEnd implements Event {
-
- private Object source;
- private Object id;
-
- /**
- * Creates a new event
- *
- * @param source the source of the event
- * @param id the id of the conversation being ended
- */
- public ConversationEnd(Object source, Object id) {
- this.source = source;
- this.id = id;
- }
-
- public Object getSource() {
- return source;
- }
-
- public Object getConversationID() {
- return id;
- }
-}
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationStart.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationStart.java
deleted file mode 100644
index c80dc19676..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationStart.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import org.apache.tuscany.sca.event.Event;
-
-
-/**
- * Propagated when a conversation has started
- *
- * @version $$Rev: 537240 $$ $$Date: 2007-05-11 10:35:03 -0700 (Fri, 11 May 2007) $$
- */
-public class ConversationStart implements Event {
-
- private Object source;
- private Object id;
-
- /**
- * Creates a new event
- *
- * @param source the source of the event
- * @param id the id of the conversation being started
- */
- public ConversationStart(Object source, Object id) {
- this.source = source;
- this.id = id;
- }
-
- public Object getSource() {
- return source;
- }
-
- public Object getConversationID() {
- return id;
- }
-}
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionEnd.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionEnd.java
deleted file mode 100644
index 4bbadff869..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionEnd.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import org.apache.tuscany.sca.event.Event;
-
-
-
-/**
- * Propagated when an HTTP-based session is expired
- *
- * @version $$Rev: 537240 $$ $$Date: 2007-05-11 10:35:03 -0700 (Fri, 11 May 2007) $$
- */
-public class HttpSessionEnd implements Event {
-
- private Object source;
- private Object id;
-
- /**
- * Creates a new event
- *
- * @param source the source of the event
- * @param id the id of the HTTP session being ended
- */
- public HttpSessionEnd(Object source, Object id) {
- this.source = source;
- this.id = id;
- }
-
- public Object getSource() {
- return source;
- }
-
- public Object getSessionID() {
- return id;
- }
-}
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionStart.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionStart.java
deleted file mode 100644
index 100bf05d32..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionStart.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import org.apache.tuscany.sca.event.Event;
-
-
-/**
- * Propagated when an HTTP-based session has started
- *
- * @version $$Rev: 537240 $$ $$Date: 2007-05-11 10:35:03 -0700 (Fri, 11 May 2007) $$
- */
-public class HttpSessionStart implements Event {
-
- private Object source;
- private Object id;
-
- /**
- * Creates a new event
- *
- * @param source the source of the event
- * @param id the id of the HTTP session being started
- */
- public HttpSessionStart(Object source, Object id) {
- this.source = source;
- this.id = id;
- }
-
- public Object getSource() {
- return source;
- }
-
- public Object getSessionID() {
- return id;
- }
-}
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestEnd.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestEnd.java
deleted file mode 100644
index 56df7d10a9..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestEnd.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import org.apache.tuscany.sca.event.Event;
-
-/**
- * Propagated when a request completes or is ended
- *
- * @version $$Rev: 537240 $$ $$Date: 2007-05-11 10:35:03 -0700 (Fri, 11 May 2007) $$
- */
-public class RequestEnd implements Event {
-
- private Object source;
-
- /**
- * Creates a new event
- *
- * @param source the source of the event
- */
- public RequestEnd(Object source) {
- this.source = source;
- }
-
- public Object getSource() {
- return source;
- }
-
-}
diff --git a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestStart.java b/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestStart.java
deleted file mode 100644
index bacd652402..0000000000
--- a/branches/sca-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestStart.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.core.event;
-
-import org.apache.tuscany.sca.event.Event;
-
-/**
- * Propagated when a request is started in the runtime
- *
- * @version $$Rev: 537240 $$ $$Date: 2007-05-11 10:35:03 -0700 (Fri, 11 May 2007) $$
- */
-public class RequestStart implements Event {
-
- private Object source;
-
- /**
- * Creates a new event
- *
- * @param source the source of the event
- */
- public RequestStart(Object source) {
- this.source = source;
- }
-
- public Object getSource() {
- return source;
- }
-
-}