Author: hiranya
Date: Mon Jul 27 05:54:30 2009
New Revision: 798029
URL: http://svn.apache.org/viewvc?rev=798029&view=rev
Log:
Adding the abstract synapse observer impl to the 1.3 branch since without this
abstract class this feature doesn't appear to be complete.
Added:
synapse/branches/1.3/modules/core/src/main/java/org/apache/synapse/config/AbstractSynapseObserver.java
Added:
synapse/branches/1.3/modules/core/src/main/java/org/apache/synapse/config/AbstractSynapseObserver.java
URL:
http://svn.apache.org/viewvc/synapse/branches/1.3/modules/core/src/main/java/org/apache/synapse/config/AbstractSynapseObserver.java?rev=798029&view=auto
==============================================================================
---
synapse/branches/1.3/modules/core/src/main/java/org/apache/synapse/config/AbstractSynapseObserver.java
(added)
+++
synapse/branches/1.3/modules/core/src/main/java/org/apache/synapse/config/AbstractSynapseObserver.java
Mon Jul 27 05:54:30 2009
@@ -0,0 +1,98 @@
+/*
+ * 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.synapse.config;
+
+import org.apache.synapse.Mediator;
+import org.apache.synapse.Startup;
+import org.apache.synapse.mediators.base.SequenceMediator;
+import org.apache.synapse.eventing.SynapseEventSource;
+import org.apache.synapse.core.axis2.ProxyService;
+import org.apache.synapse.endpoints.Endpoint;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public abstract class AbstractSynapseObserver implements SynapseObserver {
+
+ protected Log log;
+
+ public AbstractSynapseObserver() {
+ log = LogFactory.getLog(this.getClass());
+ }
+
+ public void sequenceAdded(Mediator sequence) {
+ log.info("Sequence : " + ((SequenceMediator) sequence).getName() + "
was added " +
+ "to the Synapse configuration successfully" );
+ }
+
+ public void sequenceRemoved(Mediator sequence) {
+ log.info("Sequence : " + ((SequenceMediator) sequence).getName() + "
was removed " +
+ "from the Synapse configuration successfully");
+ }
+
+ public void entryAdded(Entry entry) {
+ log.info("Local entry : " + entry.getKey() + " was added " +
+ "to the Synapse configuration successfully");
+ }
+
+ public void entryRemoved(Entry entry) {
+ log.info("Local entry : " + entry.getKey() + " was removed " +
+ "from the Synapse configuration successfully");
+ }
+
+ public void endpointAdded(Endpoint endpoint) {
+ log.info("Endpoint : " + endpoint.getName() + " was added " +
+ "to the Synapse configuration successfully");
+ }
+
+ public void endpointRemoved(Endpoint endpoint) {
+ log.info("Endpoint : " + endpoint.getName() + " was removed " +
+ "from the Synapse configuration successfully");
+ }
+
+ public void proxyServiceAdded(ProxyService proxy) {
+ log.info("Proxy service : " + proxy.getName() + " was added " +
+ "to the Synapse configuration successfully");
+ }
+
+ public void proxyServiceRemoved(ProxyService proxy) {
+ log.info("Proxy service : " + proxy.getName() + " was removed " +
+ "from the Synapse configuration successfully");
+ }
+
+ public void startupAdded(Startup startup) {
+ log.info("Startup : " + startup.getName() + " was added " +
+ "to the Synapse configuration successfully");
+ }
+
+ public void startupRemoved(Startup startup) {
+ log.info("Startup : " + startup.getName() + " was removed " +
+ "from the Synapse configuration successfully");
+ }
+
+ public void eventSourceAdded(SynapseEventSource eventSource) {
+ log.info("Event source : " + eventSource.getName() + " was added " +
+ "to the Synapse configuration successfully");
+ }
+
+ public void eventSourceRemoved(SynapseEventSource eventSource) {
+ log.info("Event source : " + eventSource.getName() + " was removed " +
+ "from the Synapse configuration successfully");
+ }
+}