You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ch...@apache.org on 2011/05/20 19:54:39 UTC
svn commit: r1125488 - in
/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse:
deployers/MessageProcessorDeployer.java
message/processors/sampler/SamplingProcessorView.java
message/processors/sampler/SamplingProcessorViewMBean.java
Author: charith
Date: Fri May 20 17:54:39 2011
New Revision: 1125488
URL: http://svn.apache.org/viewvc?rev=1125488&view=rev
Log:
Sampling processor view
Added:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorView.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorViewMBean.java
Modified:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/MessageProcessorDeployer.java
Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/MessageProcessorDeployer.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/MessageProcessorDeployer.java?rev=1125488&r1=1125487&r2=1125488&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/MessageProcessorDeployer.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/MessageProcessorDeployer.java Fri May 20 17:54:39 2011
@@ -30,7 +30,7 @@ import org.apache.synapse.message.proces
import java.io.File;
import java.util.Properties;
-public class MessageProcessorDeployer extends AbstractSynapseArtifactDeployer {
+public class MessageProcessorDeployer extends AbstractSynapseArtifactDeployer {
private static Log log = LogFactory.getLog(MessageProcessorDeployer.class);
Added: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorView.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorView.java?rev=1125488&view=auto
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorView.java (added)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorView.java Fri May 20 17:54:39 2011
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. 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.message.processors.sampler;
+
+public class SamplingProcessorView implements SamplingProcessorViewMBean{
+
+ private SamplingProcessor processor;
+
+ public SamplingProcessorView(SamplingProcessor processor) {
+ this.processor = processor;
+ }
+
+ public void activate() {
+ assert processor != null;
+ processor.activate();
+ }
+
+ public void deactivate() {
+ assert processor != null;
+ processor.deactivate();
+ }
+
+ public boolean isActive() {
+ assert processor != null;
+ return processor.isActive();
+ }
+}
Added: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorViewMBean.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorViewMBean.java?rev=1125488&view=auto
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorViewMBean.java (added)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/message/processors/sampler/SamplingProcessorViewMBean.java Fri May 20 17:54:39 2011
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. 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.message.processors.sampler;
+
+/**
+ * JMS MBean interface of <code>SamplingMessageProcessor</code>
+ * This will expose the JMX operations for SamplingProcessor
+ */
+public interface SamplingProcessorViewMBean {
+
+ /**
+ * Activate the Sampling processor instance
+ */
+ public void activate();
+
+ /**
+ * De activate the sampling processor instance
+ */
+ public void deactivate();
+
+
+ /**
+ * Get the active status of Sampling processor
+ * @return
+ */
+ public boolean isActive();
+
+}