summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-08-03 09:21:41 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-08-03 09:21:41 +0000
commit1fb6a28a73ca17dbb8c4b3059db590e2f9620943 (patch)
tree71d9c9a70ce373cecc4597c2880a5047e0353d07 /sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event
parent7ad16a07b4288227c531c485939318768129fb54 (diff)
Correct tag name
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1153404 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event')
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/BaseEventPublisher.java89
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ComponentStart.java54
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ComponentStop.java53
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ConversationEnd.java53
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ConversationStart.java52
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionEnd.java53
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionStart.java52
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/RequestEnd.java45
-rw-r--r--sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/RequestStart.java45
9 files changed, 0 insertions, 496 deletions
diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/BaseEventPublisher.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/BaseEventPublisher.java
deleted file mode 100644
index 517e5579a4..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ComponentStart.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ComponentStart.java
deleted file mode 100644
index 45eab7da1b..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ComponentStop.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ComponentStop.java
deleted file mode 100644
index 4dc79c3844..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ConversationEnd.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ConversationEnd.java
deleted file mode 100644
index d3106c7052..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ConversationStart.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/ConversationStart.java
deleted file mode 100644
index 123400fbdd..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionEnd.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionEnd.java
deleted file mode 100644
index 68cb5c2966..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionStart.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionStart.java
deleted file mode 100644
index 38a4fb10d6..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/RequestEnd.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/RequestEnd.java
deleted file mode 100644
index d7e797bbb9..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/RequestStart.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/src/main/java/org/apache/tuscany/sca/core/event/RequestStart.java
deleted file mode 100644
index 7530156b11..0000000000
--- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/core/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$ $Date$
- */
-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;
- }
-
-}