[jboss-cvs] JBossAS SVN: r81027 - in trunk/messaging/src/main/org/jboss: jms/server/jbosssx and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 14 07:51:27 EST 2008
Author: dimitris at jboss.org
Date: 2008-11-14 07:51:26 -0500 (Fri, 14 Nov 2008)
New Revision: 81027
Modified:
trunk/messaging/src/main/org/jboss/jms/server/destination/JBossMessagingCreateDestinationFactory.java
trunk/messaging/src/main/org/jboss/jms/server/jbosssx/JBossASSecurityMetadataStore.java
trunk/messaging/src/main/org/jboss/jms/server/jbosssx/JBossASSecurityMetadataStoreMBean.java
trunk/messaging/src/main/org/jboss/jms/server/jbosssx/MemorySecurityStore.java
trunk/messaging/src/main/org/jboss/jms/server/jbosssx/MemorySecurityStoreMBean.java
trunk/messaging/src/main/org/jboss/jms/server/jbosssx/SecurityActions.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgr.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgrMBean.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgr.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgrMBean.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/Queue.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/QueueMBean.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/Topic.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/TopicMBean.java
Log:
JBAS-3916, use the right copyright header
Modified: trunk/messaging/src/main/org/jboss/jms/server/destination/JBossMessagingCreateDestinationFactory.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/destination/JBossMessagingCreateDestinationFactory.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/jms/server/destination/JBossMessagingCreateDestinationFactory.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,215 +1,215 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.jms.server.destination;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.jms.Queue;
-import javax.jms.Topic;
-import javax.management.ObjectName;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb.deployers.CreateDestinationFactory;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
-import org.jboss.metadata.ejb.spec.ActivationConfigMetaData;
-import org.jboss.metadata.ejb.spec.ActivationConfigPropertiesMetaData;
-import org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData;
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceConstructorMetaData;
-import org.jboss.system.metadata.ServiceDependencyMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
-import org.jboss.system.metadata.ServiceTextValueMetaData;
-
-/**
- * JBossMessagingCreateDestinationFactory.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class JBossMessagingCreateDestinationFactory implements CreateDestinationFactory
-{
- /** The log */
- private static final Logger log = Logger.getLogger(JBossMessagingCreateDestinationFactory.class);
-
- /** The server peer name */
- private String serverPeerName;
-
- /** The post office name */
- private String postOfficeName;
-
- /**
- * Get the serverPeerName.
- *
- * @return the serverPeerName.
- */
- public String getServerPeerName()
- {
- return serverPeerName;
- }
-
- /**
- * Set the serverPeerName.
- *
- * @param serverPeerName the serverPeerName.
- */
- public void setServerPeerName(String serverPeerName)
- {
- this.serverPeerName = serverPeerName;
- }
-
- /**
- * Get the postOfficeName.
- *
- * @return the postOfficeName.
- */
- public String getPostOfficeName()
- {
- return postOfficeName;
- }
-
- /**
- * Set the postOfficeName.
- *
- * @param postOfficeName the postOfficeName.
- */
- public void setPostOfficeName(String postOfficeName)
- {
- this.postOfficeName = postOfficeName;
- }
-
- public void create()
- {
- if (serverPeerName == null)
- throw new IllegalStateException("serverPeerName has not been set");
- if (postOfficeName == null)
- throw new IllegalStateException("postOfficeName has not been set");
- }
-
- public Object create(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException
- {
- String destinationName = null;
- String destinationType = null;
-
- ActivationConfigMetaData activationConfig = mdb.getActivationConfig();
- if (activationConfig != null)
- {
- ActivationConfigPropertiesMetaData properties = activationConfig.getActivationConfigProperties();
- if (properties != null)
- {
- destinationName = getActivationConfigProperty(properties, "destination");
- destinationType = getActivationConfigProperty(properties, "destinationType");
- }
- }
-
- // TODO message-destination-link?
-
- if (destinationName == null || destinationName.trim().length() == 0)
- {
- log.warn("Unable to determine destination for " + mdb.getName());
- return null;
- }
- boolean isTopic = false;
- if (destinationType == null)
- {
- log.warn("Unable to determine destination type for " + mdb.getName());
- return null;
- }
- else if (destinationType.equals(Queue.class.getName()))
- {
- // Its a queue
- }
- else if (destinationType.equals(Topic.class.getName()))
- {
- isTopic = true;
- }
- else
- {
- log.warn("Unknown destination type '" + destinationType + "' for " + mdb.getName());
- return null;
- }
-
- ServiceMetaData result = new ServiceMetaData();
- result.setConstructor(new ServiceConstructorMetaData());
- ObjectName objectName;
- if (isTopic)
- {
- objectName = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=" + destinationName);
- result.setCode("org.jboss.jms.server.destination.TopicService");
- result.setXMBeanDD("xmdesc/Topic-xmbean.xml");
- }
- else
- {
- objectName = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=" + destinationName);
- result.setCode("org.jboss.jms.server.destination.QueueService");
- result.setXMBeanDD("xmdesc/Queue-xmbean.xml");
- }
- result.setObjectName(objectName);
-
- ServiceAttributeMetaData attribute = new ServiceAttributeMetaData();
- attribute.setName("JNDIName");
- attribute.setValue(new ServiceTextValueMetaData(destinationName));
- result.addAttribute(attribute);
-
- attribute = new ServiceAttributeMetaData();
- attribute.setName("ServerPeer");
- attribute.setValue(new ServiceTextValueMetaData(serverPeerName));
- result.addAttribute(attribute);
-
- ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
- dependency.setIDependOn(serverPeerName);
- result.addDependency(dependency);
-
- dependency = new ServiceDependencyMetaData();
- dependency.setIDependOn(postOfficeName);
- result.addDependency(dependency);
-
- // Add this mbean to the mdbs depends
- Set<String> depends = mdb.getDepends();
- if (depends == null)
- {
- depends = new HashSet<String>();
- mdb.setDepends(depends);
- }
- depends.add(objectName.getCanonicalName());
-
- return result;
- }
-
- /**
- * Get an activation config property
- *
- * @param properties the properties
- * @param name the name
- * @return the property or null if not found
- */
- protected static String getActivationConfigProperty(ActivationConfigPropertiesMetaData properties, String name)
- {
- ActivationConfigPropertyMetaData property = properties.get(name);
- if (property == null)
- return null;
- return property.getValue();
- }
-}
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.jms.server.destination;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+import javax.management.ObjectName;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb.deployers.CreateDestinationFactory;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
+import org.jboss.metadata.ejb.spec.ActivationConfigMetaData;
+import org.jboss.metadata.ejb.spec.ActivationConfigPropertiesMetaData;
+import org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData;
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+import org.jboss.system.metadata.ServiceConstructorMetaData;
+import org.jboss.system.metadata.ServiceDependencyMetaData;
+import org.jboss.system.metadata.ServiceMetaData;
+import org.jboss.system.metadata.ServiceTextValueMetaData;
+
+/**
+ * JBossMessagingCreateDestinationFactory.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JBossMessagingCreateDestinationFactory implements CreateDestinationFactory
+{
+ /** The log */
+ private static final Logger log = Logger.getLogger(JBossMessagingCreateDestinationFactory.class);
+
+ /** The server peer name */
+ private String serverPeerName;
+
+ /** The post office name */
+ private String postOfficeName;
+
+ /**
+ * Get the serverPeerName.
+ *
+ * @return the serverPeerName.
+ */
+ public String getServerPeerName()
+ {
+ return serverPeerName;
+ }
+
+ /**
+ * Set the serverPeerName.
+ *
+ * @param serverPeerName the serverPeerName.
+ */
+ public void setServerPeerName(String serverPeerName)
+ {
+ this.serverPeerName = serverPeerName;
+ }
+
+ /**
+ * Get the postOfficeName.
+ *
+ * @return the postOfficeName.
+ */
+ public String getPostOfficeName()
+ {
+ return postOfficeName;
+ }
+
+ /**
+ * Set the postOfficeName.
+ *
+ * @param postOfficeName the postOfficeName.
+ */
+ public void setPostOfficeName(String postOfficeName)
+ {
+ this.postOfficeName = postOfficeName;
+ }
+
+ public void create()
+ {
+ if (serverPeerName == null)
+ throw new IllegalStateException("serverPeerName has not been set");
+ if (postOfficeName == null)
+ throw new IllegalStateException("postOfficeName has not been set");
+ }
+
+ public Object create(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException
+ {
+ String destinationName = null;
+ String destinationType = null;
+
+ ActivationConfigMetaData activationConfig = mdb.getActivationConfig();
+ if (activationConfig != null)
+ {
+ ActivationConfigPropertiesMetaData properties = activationConfig.getActivationConfigProperties();
+ if (properties != null)
+ {
+ destinationName = getActivationConfigProperty(properties, "destination");
+ destinationType = getActivationConfigProperty(properties, "destinationType");
+ }
+ }
+
+ // TODO message-destination-link?
+
+ if (destinationName == null || destinationName.trim().length() == 0)
+ {
+ log.warn("Unable to determine destination for " + mdb.getName());
+ return null;
+ }
+ boolean isTopic = false;
+ if (destinationType == null)
+ {
+ log.warn("Unable to determine destination type for " + mdb.getName());
+ return null;
+ }
+ else if (destinationType.equals(Queue.class.getName()))
+ {
+ // Its a queue
+ }
+ else if (destinationType.equals(Topic.class.getName()))
+ {
+ isTopic = true;
+ }
+ else
+ {
+ log.warn("Unknown destination type '" + destinationType + "' for " + mdb.getName());
+ return null;
+ }
+
+ ServiceMetaData result = new ServiceMetaData();
+ result.setConstructor(new ServiceConstructorMetaData());
+ ObjectName objectName;
+ if (isTopic)
+ {
+ objectName = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=" + destinationName);
+ result.setCode("org.jboss.jms.server.destination.TopicService");
+ result.setXMBeanDD("xmdesc/Topic-xmbean.xml");
+ }
+ else
+ {
+ objectName = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=" + destinationName);
+ result.setCode("org.jboss.jms.server.destination.QueueService");
+ result.setXMBeanDD("xmdesc/Queue-xmbean.xml");
+ }
+ result.setObjectName(objectName);
+
+ ServiceAttributeMetaData attribute = new ServiceAttributeMetaData();
+ attribute.setName("JNDIName");
+ attribute.setValue(new ServiceTextValueMetaData(destinationName));
+ result.addAttribute(attribute);
+
+ attribute = new ServiceAttributeMetaData();
+ attribute.setName("ServerPeer");
+ attribute.setValue(new ServiceTextValueMetaData(serverPeerName));
+ result.addAttribute(attribute);
+
+ ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
+ dependency.setIDependOn(serverPeerName);
+ result.addDependency(dependency);
+
+ dependency = new ServiceDependencyMetaData();
+ dependency.setIDependOn(postOfficeName);
+ result.addDependency(dependency);
+
+ // Add this mbean to the mdbs depends
+ Set<String> depends = mdb.getDepends();
+ if (depends == null)
+ {
+ depends = new HashSet<String>();
+ mdb.setDepends(depends);
+ }
+ depends.add(objectName.getCanonicalName());
+
+ return result;
+ }
+
+ /**
+ * Get an activation config property
+ *
+ * @param properties the properties
+ * @param name the name
+ * @return the property or null if not found
+ */
+ protected static String getActivationConfigProperty(ActivationConfigPropertiesMetaData properties, String name)
+ {
+ ActivationConfigPropertyMetaData property = properties.get(name);
+ if (property == null)
+ return null;
+ return property.getValue();
+ }
+}
Modified: trunk/messaging/src/main/org/jboss/jms/server/jbosssx/JBossASSecurityMetadataStore.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/jbosssx/JBossASSecurityMetadataStore.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/jms/server/jbosssx/JBossASSecurityMetadataStore.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,8 +1,8 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
Modified: trunk/messaging/src/main/org/jboss/jms/server/jbosssx/JBossASSecurityMetadataStoreMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/jbosssx/JBossASSecurityMetadataStoreMBean.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/jms/server/jbosssx/JBossASSecurityMetadataStoreMBean.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.jms.server.jbosssx;
import java.security.Principal;
Modified: trunk/messaging/src/main/org/jboss/jms/server/jbosssx/MemorySecurityStore.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/jbosssx/MemorySecurityStore.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/jms/server/jbosssx/MemorySecurityStore.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,164 +1,164 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.server.jbosssx;
-
-import java.security.Principal;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.jms.JMSSecurityException;
-import javax.security.auth.Subject;
-
-import org.jboss.security.AuthenticationManager;
-import org.jboss.security.RealmMapping;
-import org.jboss.security.SimplePrincipal;
-import org.jboss.jms.server.SecurityStore;
-import org.jboss.jms.server.security.CheckType;
-import org.jboss.jms.server.security.SecurityMetadata;
-import org.w3c.dom.Element;
-
-
-/**
- * An implementation of the messaging SecurityStore.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
-public class MemorySecurityStore
- implements SecurityStore, MemorySecurityStoreMBean
-{
- private Map<String, SecurityMetadata> queueSecurityConf
- = new ConcurrentHashMap<String, SecurityMetadata>();
- private Map<String, SecurityMetadata> topicSecurityConf
- = new ConcurrentHashMap<String, SecurityMetadata>();
- private SecurityMetadata defaultSecurityConfig;
- private String securityDomain;
- private String suckerPassword;
- private AuthenticationManager authenticationMgr;
- private RealmMapping authorizationMgr;
-
- public SecurityMetadata getDefaultSecurityConfig()
- {
- return defaultSecurityConfig;
- }
-
- public void setDefaultSecurityConfig(SecurityMetadata defaultSecurityConfig)
- {
- this.defaultSecurityConfig = defaultSecurityConfig;
- }
-
- public String getSecurityDomain()
- {
- return securityDomain;
- }
-
- public void setSecurityDomain(String securityDomain)
- {
- this.securityDomain = securityDomain;
- }
-
- public String getSuckerPassword()
- {
- return suckerPassword;
- }
-
- public void setSuckerPassword(String suckerPassword)
- {
- this.suckerPassword = suckerPassword;
- }
-
- public AuthenticationManager getAuthenticationMgr()
- {
- return authenticationMgr;
- }
-
- public void setAuthenticationMgr(AuthenticationManager authenticationMgr)
- {
- this.authenticationMgr = authenticationMgr;
- }
-
- public RealmMapping getAuthorizationMgr()
- {
- return authorizationMgr;
- }
- public void setAuthorizationMgr(RealmMapping authorizationMgr)
- {
- this.authorizationMgr = authorizationMgr;
- }
-
- public Subject authenticate(String user, String password)
- throws JMSSecurityException
- {
- Subject subject = new Subject();
- SimplePrincipal principal = new SimplePrincipal(user);
- if(authenticationMgr.isValid(principal, password, subject) == false)
- subject = null;
- return subject;
- }
-
- public boolean authorize(String user, Set rolePrincipals, CheckType checkType)
- {
- if (SecurityStore.SUCKER_USER.equals(user))
- {
- //The special user SUCKER_USER is used for creating internal connections that suck messages between nodes
- //It has automatic read/write access to all destinations
- return (checkType.equals(CheckType.READ) || checkType.equals(CheckType.WRITE));
- }
-
- Principal principal = user == null ? null : new SimplePrincipal(user);
-
- boolean hasRole = authorizationMgr.doesUserHaveRole(principal, rolePrincipals);
-
- return hasRole;
- }
-
- public void clearSecurityConfig(boolean isQueue, String destName)
- throws Exception
- {
- if(isQueue)
- queueSecurityConf.remove(destName);
- else
- topicSecurityConf.remove(destName);
- }
-
- public SecurityMetadata getSecurityMetadata(boolean isQueue, String destName)
- {
- SecurityMetadata smd = defaultSecurityConfig;
- if(isQueue)
- smd = queueSecurityConf.get(destName);
- else
- smd = topicSecurityConf.get(destName);
- return smd;
- }
-
- public void setSecurityConfig(boolean isQueue, String destName, Element conf)
- throws Exception
- {
- SecurityMetadata smd = new SecurityMetadata(conf);
- if(isQueue)
- queueSecurityConf.put(destName, smd);
- else
- topicSecurityConf.put(destName, smd);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jms.server.jbosssx;
+
+import java.security.Principal;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.jms.JMSSecurityException;
+import javax.security.auth.Subject;
+
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.RealmMapping;
+import org.jboss.security.SimplePrincipal;
+import org.jboss.jms.server.SecurityStore;
+import org.jboss.jms.server.security.CheckType;
+import org.jboss.jms.server.security.SecurityMetadata;
+import org.w3c.dom.Element;
+
+
+/**
+ * An implementation of the messaging SecurityStore.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class MemorySecurityStore
+ implements SecurityStore, MemorySecurityStoreMBean
+{
+ private Map<String, SecurityMetadata> queueSecurityConf
+ = new ConcurrentHashMap<String, SecurityMetadata>();
+ private Map<String, SecurityMetadata> topicSecurityConf
+ = new ConcurrentHashMap<String, SecurityMetadata>();
+ private SecurityMetadata defaultSecurityConfig;
+ private String securityDomain;
+ private String suckerPassword;
+ private AuthenticationManager authenticationMgr;
+ private RealmMapping authorizationMgr;
+
+ public SecurityMetadata getDefaultSecurityConfig()
+ {
+ return defaultSecurityConfig;
+ }
+
+ public void setDefaultSecurityConfig(SecurityMetadata defaultSecurityConfig)
+ {
+ this.defaultSecurityConfig = defaultSecurityConfig;
+ }
+
+ public String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+
+ public void setSecurityDomain(String securityDomain)
+ {
+ this.securityDomain = securityDomain;
+ }
+
+ public String getSuckerPassword()
+ {
+ return suckerPassword;
+ }
+
+ public void setSuckerPassword(String suckerPassword)
+ {
+ this.suckerPassword = suckerPassword;
+ }
+
+ public AuthenticationManager getAuthenticationMgr()
+ {
+ return authenticationMgr;
+ }
+
+ public void setAuthenticationMgr(AuthenticationManager authenticationMgr)
+ {
+ this.authenticationMgr = authenticationMgr;
+ }
+
+ public RealmMapping getAuthorizationMgr()
+ {
+ return authorizationMgr;
+ }
+ public void setAuthorizationMgr(RealmMapping authorizationMgr)
+ {
+ this.authorizationMgr = authorizationMgr;
+ }
+
+ public Subject authenticate(String user, String password)
+ throws JMSSecurityException
+ {
+ Subject subject = new Subject();
+ SimplePrincipal principal = new SimplePrincipal(user);
+ if(authenticationMgr.isValid(principal, password, subject) == false)
+ subject = null;
+ return subject;
+ }
+
+ public boolean authorize(String user, Set rolePrincipals, CheckType checkType)
+ {
+ if (SecurityStore.SUCKER_USER.equals(user))
+ {
+ //The special user SUCKER_USER is used for creating internal connections that suck messages between nodes
+ //It has automatic read/write access to all destinations
+ return (checkType.equals(CheckType.READ) || checkType.equals(CheckType.WRITE));
+ }
+
+ Principal principal = user == null ? null : new SimplePrincipal(user);
+
+ boolean hasRole = authorizationMgr.doesUserHaveRole(principal, rolePrincipals);
+
+ return hasRole;
+ }
+
+ public void clearSecurityConfig(boolean isQueue, String destName)
+ throws Exception
+ {
+ if(isQueue)
+ queueSecurityConf.remove(destName);
+ else
+ topicSecurityConf.remove(destName);
+ }
+
+ public SecurityMetadata getSecurityMetadata(boolean isQueue, String destName)
+ {
+ SecurityMetadata smd = defaultSecurityConfig;
+ if(isQueue)
+ smd = queueSecurityConf.get(destName);
+ else
+ smd = topicSecurityConf.get(destName);
+ return smd;
+ }
+
+ public void setSecurityConfig(boolean isQueue, String destName, Element conf)
+ throws Exception
+ {
+ SecurityMetadata smd = new SecurityMetadata(conf);
+ if(isQueue)
+ queueSecurityConf.put(destName, smd);
+ else
+ topicSecurityConf.put(destName, smd);
+ }
+
+}
Modified: trunk/messaging/src/main/org/jboss/jms/server/jbosssx/MemorySecurityStoreMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/jbosssx/MemorySecurityStoreMBean.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/jms/server/jbosssx/MemorySecurityStoreMBean.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,48 +1,48 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.server.jbosssx;
-
-import org.jboss.jms.server.security.SecurityMetadata;
-import org.jboss.security.AuthenticationManager;
-import org.jboss.security.RealmMapping;
-
-/**
- * The mbean interface for MemorySecurityStore
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
-public interface MemorySecurityStoreMBean
-{
- public SecurityMetadata getDefaultSecurityConfig();
- public void setDefaultSecurityConfig(SecurityMetadata defaultSecurityConfig);
-
- public String getSecurityDomain();
- public void setSecurityDomain(String securityDomain);
-
- public void setSuckerPassword(String suckerPassword);
-
- public AuthenticationManager getAuthenticationMgr();
- public void setAuthenticationMgr(AuthenticationManager authenticationMgr);
-
- public RealmMapping getAuthorizationMgr();
- public void setAuthorizationMgr(RealmMapping authorizationMgr);
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jms.server.jbosssx;
+
+import org.jboss.jms.server.security.SecurityMetadata;
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.RealmMapping;
+
+/**
+ * The mbean interface for MemorySecurityStore
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface MemorySecurityStoreMBean
+{
+ public SecurityMetadata getDefaultSecurityConfig();
+ public void setDefaultSecurityConfig(SecurityMetadata defaultSecurityConfig);
+
+ public String getSecurityDomain();
+ public void setSecurityDomain(String securityDomain);
+
+ public void setSuckerPassword(String suckerPassword);
+
+ public AuthenticationManager getAuthenticationMgr();
+ public void setAuthenticationMgr(AuthenticationManager authenticationMgr);
+
+ public RealmMapping getAuthorizationMgr();
+ public void setAuthorizationMgr(RealmMapping authorizationMgr);
+}
Modified: trunk/messaging/src/main/org/jboss/jms/server/jbosssx/SecurityActions.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/jbosssx/SecurityActions.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/jms/server/jbosssx/SecurityActions.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.jms.server.jbosssx;
import java.security.AccessController;
Modified: trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgr.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgr.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgr.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,27 +1,27 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.mq.server.jmx;
-
-public class DummyDestMgr implements DummyDestMgrMBean
-{
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.mq.server.jmx;
+
+public class DummyDestMgr implements DummyDestMgrMBean
+{
+
+}
Modified: trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgrMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgrMBean.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgrMBean.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,31 +1,31 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.mq.server.jmx;
-
-/**
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
-public interface DummyDestMgrMBean
-{
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.mq.server.jmx;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface DummyDestMgrMBean
+{
+
+}
Modified: trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgr.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgr.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgr.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,27 +1,27 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.mq.server.jmx;
-
-public class DummySecurityMgr implements DummySecurityMgrMBean
-{
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.mq.server.jmx;
+
+public class DummySecurityMgr implements DummySecurityMgrMBean
+{
+
+}
Modified: trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgrMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgrMBean.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgrMBean.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,31 +1,31 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.mq.server.jmx;
-
-/**
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
-public interface DummySecurityMgrMBean
-{
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.mq.server.jmx;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface DummySecurityMgrMBean
+{
+
+}
Modified: trunk/messaging/src/main/org/jboss/mq/server/jmx/Queue.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/Queue.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/Queue.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,358 +1,358 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.mq.server.jmx;
-
-import java.util.List;
-
-import javax.management.MBeanRegistration;
-import javax.management.MBeanServer;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-
-import org.jboss.jms.server.destination.QueueService;
-import org.jboss.managed.api.ManagedOperation.Impact;
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementOperation;
-import org.jboss.managed.api.annotation.ManagementProperties;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.w3c.dom.Element;
-
-/**
- * Portability class that maps the mbean ops onto the
- * org.jboss.jms.server.destination.QueueService.
- *
- * @author Scott.Stark at jboss.org
- * @author Clebert.suconic at jboss.com
- * @version $Revision:$
- */
- at ManagementObject(componentType = @ManagementComponent(type = "JMSDestination", subtype = "Queue"), properties = ManagementProperties.EXPLICIT)
-public class Queue implements MBeanRegistration, QueueMBean {
- private QueueService delegate;
-
- public Queue() {
- delegate = new QueueService();
- }
-
- public Queue(boolean createProgramatically) {
- delegate = new QueueService(createProgramatically);
- }
-
- public void addNotificationListener(NotificationListener listener,
- NotificationFilter filter, Object handback) {
- delegate.addNotificationListener(listener, filter, handback);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#create()
- */
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
- public void create() throws Exception {
- delegate.create();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#destroy()
- */
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
- public void destroy() {
- delegate.destroy();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#getDownCacheSize()
- */
-
-
- @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The write-cache size, can only be set when queue is stopped")
- public int getDownCacheSize() {
- return delegate.getDownCacheSize();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#getFullSize()
- */
- @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The in-memory message limit, can only be set when queue is stopped")
- public int getFullSize() {
- return delegate.getFullSize();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#getJNDIName()
- */
-
- @ManagementProperty(use={ViewUse.RUNTIME})
- public String getJNDIName() {
- return delegate.getJNDIName();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#getMessageCount()
- */
- @ManagementProperty(use={ViewUse.STATISTIC})
- public int getMessageCount() throws Exception {
- return delegate.getMessageCount();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#getName()
- */
- @ManagementProperty(use={ViewUse.RUNTIME})
- public String getName() {
- return delegate.getName();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#getPageSize()
- */
- @ManagementProperty(use={ViewUse.CONFIGURATION}, description="he paging size, can only be set when queue is stopped")
- public int getPageSize() {
- return delegate.getPageSize();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#getServerPeer()
- */
- @ManagementProperty(use={ViewUse.RUNTIME})
- public ObjectName getServerPeer() {
- return delegate.getServerPeer();
- }
-
- public ObjectName getServiceName() {
- return delegate.getServiceName();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#isCreatedProgrammatically()
- */
- @ManagementProperty(use={ViewUse.STATISTIC})
- public boolean isCreatedProgrammatically() {
- return delegate.isCreatedProgrammatically();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#listMessages(java.lang.String)
- */
- @ManagementOperation(description = "List all mesages with the selector", impact = Impact.ReadOnly)
- public List listMessages(String arg0) throws Exception {
- return delegate.listAllMessages(arg0);
- }
-
- @ManagementOperation(description = "List all mesages", impact = Impact.ReadOnly)
- public List listAllMessages() throws Exception {
- return delegate.listAllMessages();
- }
-
- @ManagementOperation(description = "List all durable mesages", impact = Impact.ReadOnly)
- public List listDurableMessages() throws Exception
- {
- return delegate.listDurableMessages();
- }
-
- @ManagementOperation(description = "List all durable mesages using a selector", impact = Impact.ReadOnly)
- public List listDurableMessages(String selector) throws Exception
- {
- return delegate.listDurableMessages(selector);
- }
-
- @ManagementOperation(description = "List all non durable mesages", impact = Impact.ReadOnly)
- public List listNonDurableMessages() throws Exception
- {
- return delegate.listNonDurableMessages();
- }
-
- @ManagementOperation(description = "List all non durable mesages using a selector", impact = Impact.ReadOnly)
- public List listNonDurableMessages(String selector) throws Exception
- {
- return delegate.listNonDurableMessages(selector);
- }
-
- @ManagementOperation(description = "Reset the message counter", impact = Impact.WriteOnly)
- public void resetMessageCounter() throws Exception
- {
- delegate.resetMessageCounter();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#removeAllMessages()
- */
- @ManagementOperation(description = "Remove all messages in the queue", impact = Impact.WriteOnly)
- public void removeAllMessages() throws Exception {
- delegate.removeAllMessages();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#setDownCacheSize(int)
- */
- public void setDownCacheSize(int arg0) {
- delegate.setDownCacheSize(arg0);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#setFullSize(int)
- */
- public void setFullSize(int arg0) {
- delegate.setFullSize(arg0);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#setJNDIName(java.lang.String)
- */
- public void setJNDIName(String arg0) throws Exception {
- delegate.setJNDIName(arg0);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#setPageSize(int)
- */
- public void setPageSize(int arg0) {
- delegate.setPageSize(arg0);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#setSecurityConfig(org.w3c.dom.Element)
- */
- public void setSecurityConfig(Element arg0) throws Exception {
- delegate.setSecurityConfig(arg0);
- }
-
- public void setSecurityConf(Element arg0) throws Exception {
- delegate.setSecurityConfig(arg0);
- }
-
- public void setSecurityManager(ObjectName arg0) {
- // noop
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#setServerPeer(javax.management.ObjectName)
- */
- public void setServerPeer(ObjectName arg0) {
- delegate.setServerPeer(arg0);
- }
-
- public void setDestinationManager(ObjectName arg0) throws Exception {
- ObjectName peer = new ObjectName("jboss.messaging:service=ServerPeer");
- delegate.setServerPeer(peer);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#start()
- */
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
- public void start() throws Exception {
- delegate.start();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.mq.server.jmx.QueueMBean#stop()
- */
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
- public void stop() {
- delegate.stop();
- }
-
- public void setMessageCounterHistoryDayLimit(int arg0) {
- // noop
- }
-
- @ManagementProperty(use={ViewUse.CONFIGURATION})
- public ObjectName getExpiryDestination()
- {
- return delegate.getExpiryQueue();
- }
-
- public void setExpiryDestination(ObjectName destination)
- {
- try
- {
- delegate.setExpiryQueue(destination);
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public String toString() {
- return delegate.toString();
- }
-
- public void postDeregister() {
- delegate.postDeregister();
- }
-
- public void postRegister(Boolean registrationDone) {
- delegate.postRegister(registrationDone);
- }
-
- public void preDeregister() throws Exception {
- delegate.preDeregister();
- }
-
- public ObjectName preRegister(MBeanServer server, ObjectName name)
- throws Exception {
- return delegate.preRegister(server, name);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.mq.server.jmx;
+
+import java.util.List;
+
+import javax.management.MBeanRegistration;
+import javax.management.MBeanServer;
+import javax.management.NotificationFilter;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+
+import org.jboss.jms.server.destination.QueueService;
+import org.jboss.managed.api.ManagedOperation.Impact;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementOperation;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
+import org.w3c.dom.Element;
+
+/**
+ * Portability class that maps the mbean ops onto the
+ * org.jboss.jms.server.destination.QueueService.
+ *
+ * @author Scott.Stark at jboss.org
+ * @author Clebert.suconic at jboss.com
+ * @version $Revision:$
+ */
+ at ManagementObject(componentType = @ManagementComponent(type = "JMSDestination", subtype = "Queue"), properties = ManagementProperties.EXPLICIT)
+public class Queue implements MBeanRegistration, QueueMBean {
+ private QueueService delegate;
+
+ public Queue() {
+ delegate = new QueueService();
+ }
+
+ public Queue(boolean createProgramatically) {
+ delegate = new QueueService(createProgramatically);
+ }
+
+ public void addNotificationListener(NotificationListener listener,
+ NotificationFilter filter, Object handback) {
+ delegate.addNotificationListener(listener, filter, handback);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#create()
+ */
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ public void create() throws Exception {
+ delegate.create();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#destroy()
+ */
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ public void destroy() {
+ delegate.destroy();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#getDownCacheSize()
+ */
+
+
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The write-cache size, can only be set when queue is stopped")
+ public int getDownCacheSize() {
+ return delegate.getDownCacheSize();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#getFullSize()
+ */
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The in-memory message limit, can only be set when queue is stopped")
+ public int getFullSize() {
+ return delegate.getFullSize();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#getJNDIName()
+ */
+
+ @ManagementProperty(use={ViewUse.RUNTIME})
+ public String getJNDIName() {
+ return delegate.getJNDIName();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#getMessageCount()
+ */
+ @ManagementProperty(use={ViewUse.STATISTIC})
+ public int getMessageCount() throws Exception {
+ return delegate.getMessageCount();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#getName()
+ */
+ @ManagementProperty(use={ViewUse.RUNTIME})
+ public String getName() {
+ return delegate.getName();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#getPageSize()
+ */
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="he paging size, can only be set when queue is stopped")
+ public int getPageSize() {
+ return delegate.getPageSize();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#getServerPeer()
+ */
+ @ManagementProperty(use={ViewUse.RUNTIME})
+ public ObjectName getServerPeer() {
+ return delegate.getServerPeer();
+ }
+
+ public ObjectName getServiceName() {
+ return delegate.getServiceName();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#isCreatedProgrammatically()
+ */
+ @ManagementProperty(use={ViewUse.STATISTIC})
+ public boolean isCreatedProgrammatically() {
+ return delegate.isCreatedProgrammatically();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#listMessages(java.lang.String)
+ */
+ @ManagementOperation(description = "List all mesages with the selector", impact = Impact.ReadOnly)
+ public List listMessages(String arg0) throws Exception {
+ return delegate.listAllMessages(arg0);
+ }
+
+ @ManagementOperation(description = "List all mesages", impact = Impact.ReadOnly)
+ public List listAllMessages() throws Exception {
+ return delegate.listAllMessages();
+ }
+
+ @ManagementOperation(description = "List all durable mesages", impact = Impact.ReadOnly)
+ public List listDurableMessages() throws Exception
+ {
+ return delegate.listDurableMessages();
+ }
+
+ @ManagementOperation(description = "List all durable mesages using a selector", impact = Impact.ReadOnly)
+ public List listDurableMessages(String selector) throws Exception
+ {
+ return delegate.listDurableMessages(selector);
+ }
+
+ @ManagementOperation(description = "List all non durable mesages", impact = Impact.ReadOnly)
+ public List listNonDurableMessages() throws Exception
+ {
+ return delegate.listNonDurableMessages();
+ }
+
+ @ManagementOperation(description = "List all non durable mesages using a selector", impact = Impact.ReadOnly)
+ public List listNonDurableMessages(String selector) throws Exception
+ {
+ return delegate.listNonDurableMessages(selector);
+ }
+
+ @ManagementOperation(description = "Reset the message counter", impact = Impact.WriteOnly)
+ public void resetMessageCounter() throws Exception
+ {
+ delegate.resetMessageCounter();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#removeAllMessages()
+ */
+ @ManagementOperation(description = "Remove all messages in the queue", impact = Impact.WriteOnly)
+ public void removeAllMessages() throws Exception {
+ delegate.removeAllMessages();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#setDownCacheSize(int)
+ */
+ public void setDownCacheSize(int arg0) {
+ delegate.setDownCacheSize(arg0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#setFullSize(int)
+ */
+ public void setFullSize(int arg0) {
+ delegate.setFullSize(arg0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#setJNDIName(java.lang.String)
+ */
+ public void setJNDIName(String arg0) throws Exception {
+ delegate.setJNDIName(arg0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#setPageSize(int)
+ */
+ public void setPageSize(int arg0) {
+ delegate.setPageSize(arg0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#setSecurityConfig(org.w3c.dom.Element)
+ */
+ public void setSecurityConfig(Element arg0) throws Exception {
+ delegate.setSecurityConfig(arg0);
+ }
+
+ public void setSecurityConf(Element arg0) throws Exception {
+ delegate.setSecurityConfig(arg0);
+ }
+
+ public void setSecurityManager(ObjectName arg0) {
+ // noop
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#setServerPeer(javax.management.ObjectName)
+ */
+ public void setServerPeer(ObjectName arg0) {
+ delegate.setServerPeer(arg0);
+ }
+
+ public void setDestinationManager(ObjectName arg0) throws Exception {
+ ObjectName peer = new ObjectName("jboss.messaging:service=ServerPeer");
+ delegate.setServerPeer(peer);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#start()
+ */
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ public void start() throws Exception {
+ delegate.start();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.mq.server.jmx.QueueMBean#stop()
+ */
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ public void stop() {
+ delegate.stop();
+ }
+
+ public void setMessageCounterHistoryDayLimit(int arg0) {
+ // noop
+ }
+
+ @ManagementProperty(use={ViewUse.CONFIGURATION})
+ public ObjectName getExpiryDestination()
+ {
+ return delegate.getExpiryQueue();
+ }
+
+ public void setExpiryDestination(ObjectName destination)
+ {
+ try
+ {
+ delegate.setExpiryQueue(destination);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public String toString() {
+ return delegate.toString();
+ }
+
+ public void postDeregister() {
+ delegate.postDeregister();
+ }
+
+ public void postRegister(Boolean registrationDone) {
+ delegate.postRegister(registrationDone);
+ }
+
+ public void preDeregister() throws Exception {
+ delegate.preDeregister();
+ }
+
+ public ObjectName preRegister(MBeanServer server, ObjectName name)
+ throws Exception {
+ return delegate.preRegister(server, name);
+ }
+}
Modified: trunk/messaging/src/main/org/jboss/mq/server/jmx/QueueMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/QueueMBean.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/QueueMBean.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,88 +1,88 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.mq.server.jmx;
-
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.w3c.dom.Element;
-
-public interface QueueMBean
-{
-
- public void create() throws Exception;
-
- public void destroy();
-
- public int getDownCacheSize();
-
- public int getFullSize();
-
- public String getJNDIName();
-
- public int getMessageCount() throws Exception;
-
- public String getName();
-
- public int getPageSize();
-
- public ObjectName getServerPeer();
-
- public boolean isCreatedProgrammatically();
-
- public List listMessages(String arg0) throws Exception;
-
- public void removeAllMessages() throws Exception;
-
- public void setDownCacheSize(int arg0);
-
- public void setFullSize(int arg0);
-
- public void setJNDIName(String arg0) throws Exception;
-
- public void setPageSize(int arg0);
-
- public void setSecurityConfig(Element arg0) throws Exception;
- public void setSecurityConf(Element arg0) throws Exception;
- public void setSecurityManager(ObjectName arg0);
-
- public void setServerPeer(ObjectName arg0);
- public void setDestinationManager(ObjectName arg0) throws Exception;
-
- /**
- * Returns the expiry destination.
- */
- public ObjectName getExpiryDestination();
-
- /**
- * Sets the expiry destination.
- */
- public void setExpiryDestination(ObjectName destination);
-
- public void setMessageCounterHistoryDayLimit(int arg0);
-
- public void start() throws Exception;
-
- public void stop();
-
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.mq.server.jmx;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.w3c.dom.Element;
+
+public interface QueueMBean
+{
+
+ public void create() throws Exception;
+
+ public void destroy();
+
+ public int getDownCacheSize();
+
+ public int getFullSize();
+
+ public String getJNDIName();
+
+ public int getMessageCount() throws Exception;
+
+ public String getName();
+
+ public int getPageSize();
+
+ public ObjectName getServerPeer();
+
+ public boolean isCreatedProgrammatically();
+
+ public List listMessages(String arg0) throws Exception;
+
+ public void removeAllMessages() throws Exception;
+
+ public void setDownCacheSize(int arg0);
+
+ public void setFullSize(int arg0);
+
+ public void setJNDIName(String arg0) throws Exception;
+
+ public void setPageSize(int arg0);
+
+ public void setSecurityConfig(Element arg0) throws Exception;
+ public void setSecurityConf(Element arg0) throws Exception;
+ public void setSecurityManager(ObjectName arg0);
+
+ public void setServerPeer(ObjectName arg0);
+ public void setDestinationManager(ObjectName arg0) throws Exception;
+
+ /**
+ * Returns the expiry destination.
+ */
+ public ObjectName getExpiryDestination();
+
+ /**
+ * Sets the expiry destination.
+ */
+ public void setExpiryDestination(ObjectName destination);
+
+ public void setMessageCounterHistoryDayLimit(int arg0);
+
+ public void start() throws Exception;
+
+ public void stop();
+
}
\ No newline at end of file
Modified: trunk/messaging/src/main/org/jboss/mq/server/jmx/Topic.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/Topic.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/Topic.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,336 +1,336 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.mq.server.jmx;
-
-import java.util.List;
-
-import javax.management.MBeanRegistration;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.w3c.dom.Element;
-import org.jboss.jms.server.destination.TopicService;
-import org.jboss.managed.api.ManagedOperation.Impact;
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementOperation;
-import org.jboss.managed.api.annotation.ManagementProperties;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-
-/**
- * Portability class that maps the mbean ops onto the org.jboss.jms.server.destination.TopicService.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
- at ManagementObject(componentType = @ManagementComponent(type = "JMSDestination", subtype = "Topic"), properties = ManagementProperties.EXPLICIT)
-public class Topic
- implements MBeanRegistration, TopicMBean
-{
- private TopicService delegate;
-
- public Topic()
- {
- delegate = new TopicService();
- }
- public Topic(boolean createProgramatically)
- {
- delegate = new TopicService(createProgramatically);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#create()
- */
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
- public void create() throws Exception
- {
- delegate.create();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#destroy()
- */
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
- public void destroy()
- {
- delegate.destroy();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#getDownCacheSize()
- */
- @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The write-cache size, can only be set when queue is stopped")
- public int getDownCacheSize()
- {
- return delegate.getDownCacheSize();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#getFullSize()
- */
- @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The in-memory message limit, can only be set when queue is stopped")
- public int getFullSize()
- {
- return delegate.getFullSize();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#getJNDIName()
- */
- @ManagementProperty(use={ViewUse.RUNTIME})
- public String getJNDIName()
- {
- return delegate.getJNDIName();
- }
-
- @ManagementOperation(description = "List all non durable mesages", impact = Impact.ReadOnly)
- public List listNonDurableMessages(String subscriptionId) throws Exception
- {
- return delegate.listNonDurableMessages(subscriptionId);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#getName()
- */
- @ManagementProperty(use={ViewUse.RUNTIME})
- public String getName()
- {
- return delegate.getName();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#getPageSize()
- */
- @ManagementProperty(use={ViewUse.CONFIGURATION}, description="he paging size, can only be set when queue is stopped")
- public int getPageSize()
- {
- return delegate.getPageSize();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#getServer()
- */
- public MBeanServer getServer()
- {
- return delegate.getServer();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#getServerPeer()
- */
- public ObjectName getServerPeer()
- {
- return delegate.getServerPeer();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#isCreatedProgrammatically()
- */
- @ManagementProperty(use={ViewUse.STATISTIC})
- public boolean isCreatedProgrammatically()
- {
- return delegate.isCreatedProgrammatically();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#listMessagesDurableSub(java.lang.String, java.lang.String, java.lang.String)
- */
- @ManagementOperation(description = "List all durable mesages", impact = Impact.ReadOnly)
- public List listMessagesDurableSub(String arg0, String arg1, String arg2) throws Exception
- {
- return delegate.listDurableMessages(arg0, arg1);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#listMessagesNonDurableSub(long, java.lang.String)
- */
- @ManagementOperation(description = "List all non durable mesages", impact = Impact.ReadOnly)
- public List listMessagesNonDurableSub(long arg0, String arg1) throws Exception
- {
- return delegate.listNonDurableMessages(arg1);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#listSubscriptionsAsText()
- */
- @ManagementOperation(description = "List subscriptions on text", impact = Impact.ReadOnly)
- public String listSubscriptionsAsText() throws Exception
- {
- return delegate.listAllSubscriptionsAsHTML();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#listSubscriptionsAsText(boolean)
- */
- @ManagementOperation(description = "List subscriptions on text", impact = Impact.ReadOnly)
- public String listSubscriptionsAsText(boolean arg0) throws Exception
- {
- return delegate.listAllSubscriptionsAsHTML();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#removeAllMessages()
- */
- @ManagementOperation(description = "Remove all the messages on the queue DB", impact = Impact.WriteOnly)
- public void removeAllMessages() throws Exception
- {
- delegate.removeAllMessages();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setDownCacheSize(int)
- */
- public void setDownCacheSize(int arg0)
- {
- delegate.setDownCacheSize(arg0);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setFullSize(int)
- */
- public void setFullSize(int arg0)
- {
- delegate.setFullSize(arg0);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setJNDIName(java.lang.String)
- */
- public void setJNDIName(String arg0) throws Exception
- {
- delegate.setJNDIName(arg0);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setPageSize(int)
- */
- public void setPageSize(int arg0)
- {
- delegate.setPageSize(arg0);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityConfig(org.w3c.dom.Element)
- */
- public void setSecurityConfig(Element arg0) throws Exception
- {
- delegate.setSecurityConfig(arg0);
- }
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityConf(org.w3c.dom.Element)
- */
- public void setSecurityConf(Element arg0) throws Exception
- {
- delegate.setSecurityConfig(arg0);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityManager(javax.management.ObjectName)
- */
- public void setSecurityManager(ObjectName arg0)
- {
- // noop
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setServerPeer(javax.management.ObjectName)
- */
- public void setServerPeer(ObjectName arg0)
- {
- delegate.setServerPeer(arg0);
- }
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#setDestinationManager(javax.management.ObjectName)
- */
- public void setDestinationManager(ObjectName arg0) throws Exception
- {
- ObjectName peer = new ObjectName("jboss.messaging:service=ServerPeer");
- delegate.setServerPeer(peer);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#start()
- */
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
- public void start() throws Exception
- {
- delegate.start();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#stop()
- */
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
- public void stop()
- {
- delegate.stop();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#subscriptionCount()
- */
- public int subscriptionCount() throws Exception
- {
- return delegate.getAllSubscriptionsCount();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.mq.server.jmx.TopicMBean#subscriptionCount(boolean)
- */
- public int subscriptionCount(boolean arg0) throws Exception
- {
- return arg0 ? delegate.getDurableSubscriptionsCount() : delegate.getNonDurableSubscriptionsCount();
- }
-
- public ObjectName getExpiryDestination()
- {
- return null;
- }
- public void setExpiryDestination(ObjectName destination)
- {
- System.err.println("There is no ExpiryDestination currently");
- }
-
- public String toString()
- {
- return delegate.toString();
- }
-
- public void postDeregister()
- {
- delegate.postDeregister();
- }
- public void postRegister(Boolean registrationDone)
- {
- delegate.postRegister(registrationDone);
- }
- public void preDeregister() throws Exception
- {
- delegate.preDeregister();
- }
- public ObjectName preRegister(MBeanServer server, ObjectName name)
- throws Exception
- {
- return delegate.preRegister(server, name);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.mq.server.jmx;
+
+import java.util.List;
+
+import javax.management.MBeanRegistration;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.w3c.dom.Element;
+import org.jboss.jms.server.destination.TopicService;
+import org.jboss.managed.api.ManagedOperation.Impact;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementOperation;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
+
+/**
+ * Portability class that maps the mbean ops onto the org.jboss.jms.server.destination.TopicService.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+ at ManagementObject(componentType = @ManagementComponent(type = "JMSDestination", subtype = "Topic"), properties = ManagementProperties.EXPLICIT)
+public class Topic
+ implements MBeanRegistration, TopicMBean
+{
+ private TopicService delegate;
+
+ public Topic()
+ {
+ delegate = new TopicService();
+ }
+ public Topic(boolean createProgramatically)
+ {
+ delegate = new TopicService(createProgramatically);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#create()
+ */
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ public void create() throws Exception
+ {
+ delegate.create();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#destroy()
+ */
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ public void destroy()
+ {
+ delegate.destroy();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getDownCacheSize()
+ */
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The write-cache size, can only be set when queue is stopped")
+ public int getDownCacheSize()
+ {
+ return delegate.getDownCacheSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getFullSize()
+ */
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The in-memory message limit, can only be set when queue is stopped")
+ public int getFullSize()
+ {
+ return delegate.getFullSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getJNDIName()
+ */
+ @ManagementProperty(use={ViewUse.RUNTIME})
+ public String getJNDIName()
+ {
+ return delegate.getJNDIName();
+ }
+
+ @ManagementOperation(description = "List all non durable mesages", impact = Impact.ReadOnly)
+ public List listNonDurableMessages(String subscriptionId) throws Exception
+ {
+ return delegate.listNonDurableMessages(subscriptionId);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getName()
+ */
+ @ManagementProperty(use={ViewUse.RUNTIME})
+ public String getName()
+ {
+ return delegate.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getPageSize()
+ */
+ @ManagementProperty(use={ViewUse.CONFIGURATION}, description="he paging size, can only be set when queue is stopped")
+ public int getPageSize()
+ {
+ return delegate.getPageSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getServer()
+ */
+ public MBeanServer getServer()
+ {
+ return delegate.getServer();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getServerPeer()
+ */
+ public ObjectName getServerPeer()
+ {
+ return delegate.getServerPeer();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#isCreatedProgrammatically()
+ */
+ @ManagementProperty(use={ViewUse.STATISTIC})
+ public boolean isCreatedProgrammatically()
+ {
+ return delegate.isCreatedProgrammatically();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#listMessagesDurableSub(java.lang.String, java.lang.String, java.lang.String)
+ */
+ @ManagementOperation(description = "List all durable mesages", impact = Impact.ReadOnly)
+ public List listMessagesDurableSub(String arg0, String arg1, String arg2) throws Exception
+ {
+ return delegate.listDurableMessages(arg0, arg1);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#listMessagesNonDurableSub(long, java.lang.String)
+ */
+ @ManagementOperation(description = "List all non durable mesages", impact = Impact.ReadOnly)
+ public List listMessagesNonDurableSub(long arg0, String arg1) throws Exception
+ {
+ return delegate.listNonDurableMessages(arg1);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#listSubscriptionsAsText()
+ */
+ @ManagementOperation(description = "List subscriptions on text", impact = Impact.ReadOnly)
+ public String listSubscriptionsAsText() throws Exception
+ {
+ return delegate.listAllSubscriptionsAsHTML();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#listSubscriptionsAsText(boolean)
+ */
+ @ManagementOperation(description = "List subscriptions on text", impact = Impact.ReadOnly)
+ public String listSubscriptionsAsText(boolean arg0) throws Exception
+ {
+ return delegate.listAllSubscriptionsAsHTML();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#removeAllMessages()
+ */
+ @ManagementOperation(description = "Remove all the messages on the queue DB", impact = Impact.WriteOnly)
+ public void removeAllMessages() throws Exception
+ {
+ delegate.removeAllMessages();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setDownCacheSize(int)
+ */
+ public void setDownCacheSize(int arg0)
+ {
+ delegate.setDownCacheSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setFullSize(int)
+ */
+ public void setFullSize(int arg0)
+ {
+ delegate.setFullSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setJNDIName(java.lang.String)
+ */
+ public void setJNDIName(String arg0) throws Exception
+ {
+ delegate.setJNDIName(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setPageSize(int)
+ */
+ public void setPageSize(int arg0)
+ {
+ delegate.setPageSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityConfig(org.w3c.dom.Element)
+ */
+ public void setSecurityConfig(Element arg0) throws Exception
+ {
+ delegate.setSecurityConfig(arg0);
+ }
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityConf(org.w3c.dom.Element)
+ */
+ public void setSecurityConf(Element arg0) throws Exception
+ {
+ delegate.setSecurityConfig(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityManager(javax.management.ObjectName)
+ */
+ public void setSecurityManager(ObjectName arg0)
+ {
+ // noop
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setServerPeer(javax.management.ObjectName)
+ */
+ public void setServerPeer(ObjectName arg0)
+ {
+ delegate.setServerPeer(arg0);
+ }
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setDestinationManager(javax.management.ObjectName)
+ */
+ public void setDestinationManager(ObjectName arg0) throws Exception
+ {
+ ObjectName peer = new ObjectName("jboss.messaging:service=ServerPeer");
+ delegate.setServerPeer(peer);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#start()
+ */
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ public void start() throws Exception
+ {
+ delegate.start();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#stop()
+ */
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ public void stop()
+ {
+ delegate.stop();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#subscriptionCount()
+ */
+ public int subscriptionCount() throws Exception
+ {
+ return delegate.getAllSubscriptionsCount();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#subscriptionCount(boolean)
+ */
+ public int subscriptionCount(boolean arg0) throws Exception
+ {
+ return arg0 ? delegate.getDurableSubscriptionsCount() : delegate.getNonDurableSubscriptionsCount();
+ }
+
+ public ObjectName getExpiryDestination()
+ {
+ return null;
+ }
+ public void setExpiryDestination(ObjectName destination)
+ {
+ System.err.println("There is no ExpiryDestination currently");
+ }
+
+ public String toString()
+ {
+ return delegate.toString();
+ }
+
+ public void postDeregister()
+ {
+ delegate.postDeregister();
+ }
+ public void postRegister(Boolean registrationDone)
+ {
+ delegate.postRegister(registrationDone);
+ }
+ public void preDeregister() throws Exception
+ {
+ delegate.preDeregister();
+ }
+ public ObjectName preRegister(MBeanServer server, ObjectName name)
+ throws Exception
+ {
+ return delegate.preRegister(server, name);
+ }
+}
Modified: trunk/messaging/src/main/org/jboss/mq/server/jmx/TopicMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/TopicMBean.java 2008-11-14 12:51:05 UTC (rev 81026)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/TopicMBean.java 2008-11-14 12:51:26 UTC (rev 81027)
@@ -1,85 +1,85 @@
-package org.jboss.mq.server.jmx;
-
-import java.util.List;
-
-import javax.jms.InvalidSelectorException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.w3c.dom.Element;
-
-public interface TopicMBean
-{
-
- public abstract void create() throws Exception;
-
- public abstract void destroy();
-
- public abstract int getDownCacheSize();
-
- public abstract int getFullSize();
-
- public abstract String getJNDIName();
-
- public List listNonDurableMessages(String subscriptionId) throws Exception;
-
- public abstract String getName();
-
- public abstract int getPageSize();
-
- public abstract MBeanServer getServer();
-
- public abstract ObjectName getServerPeer();
-
- public abstract boolean isCreatedProgrammatically();
-
- public abstract List listMessagesDurableSub(String arg0, String arg1,
- String arg2) throws Exception;
-
- public abstract List listMessagesNonDurableSub(long arg0, String arg1)
- throws Exception;
-
- public abstract String listSubscriptionsAsText() throws Exception;
-
- public abstract String listSubscriptionsAsText(boolean arg0)
- throws Exception;
-
- public abstract void removeAllMessages() throws Exception;
-
- public abstract void setDownCacheSize(int arg0);
-
- public abstract void setFullSize(int arg0);
-
- public abstract void setJNDIName(String arg0) throws Exception;
-
- public abstract void setPageSize(int arg0);
-
- public abstract void setSecurityConfig(Element arg0) throws Exception;
-
- public abstract void setSecurityConf(Element arg0) throws Exception;
-
- public abstract void setSecurityManager(ObjectName arg0);
-
- public abstract void setServerPeer(ObjectName arg0);
-
- public abstract void setDestinationManager(ObjectName arg0) throws Exception;
-
- /**
- * Returns the expiry destination.
- */
- public ObjectName getExpiryDestination();
-
- /**
- * Sets the expiry destination.
- */
- public void setExpiryDestination(ObjectName destination);
-
- public abstract void start() throws Exception;
-
- public abstract void stop();
-
- public abstract int subscriptionCount() throws Exception;
-
- public abstract int subscriptionCount(boolean arg0) throws Exception;
-
+package org.jboss.mq.server.jmx;
+
+import java.util.List;
+
+import javax.jms.InvalidSelectorException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.w3c.dom.Element;
+
+public interface TopicMBean
+{
+
+ public abstract void create() throws Exception;
+
+ public abstract void destroy();
+
+ public abstract int getDownCacheSize();
+
+ public abstract int getFullSize();
+
+ public abstract String getJNDIName();
+
+ public List listNonDurableMessages(String subscriptionId) throws Exception;
+
+ public abstract String getName();
+
+ public abstract int getPageSize();
+
+ public abstract MBeanServer getServer();
+
+ public abstract ObjectName getServerPeer();
+
+ public abstract boolean isCreatedProgrammatically();
+
+ public abstract List listMessagesDurableSub(String arg0, String arg1,
+ String arg2) throws Exception;
+
+ public abstract List listMessagesNonDurableSub(long arg0, String arg1)
+ throws Exception;
+
+ public abstract String listSubscriptionsAsText() throws Exception;
+
+ public abstract String listSubscriptionsAsText(boolean arg0)
+ throws Exception;
+
+ public abstract void removeAllMessages() throws Exception;
+
+ public abstract void setDownCacheSize(int arg0);
+
+ public abstract void setFullSize(int arg0);
+
+ public abstract void setJNDIName(String arg0) throws Exception;
+
+ public abstract void setPageSize(int arg0);
+
+ public abstract void setSecurityConfig(Element arg0) throws Exception;
+
+ public abstract void setSecurityConf(Element arg0) throws Exception;
+
+ public abstract void setSecurityManager(ObjectName arg0);
+
+ public abstract void setServerPeer(ObjectName arg0);
+
+ public abstract void setDestinationManager(ObjectName arg0) throws Exception;
+
+ /**
+ * Returns the expiry destination.
+ */
+ public ObjectName getExpiryDestination();
+
+ /**
+ * Sets the expiry destination.
+ */
+ public void setExpiryDestination(ObjectName destination);
+
+ public abstract void start() throws Exception;
+
+ public abstract void stop();
+
+ public abstract int subscriptionCount() throws Exception;
+
+ public abstract int subscriptionCount(boolean arg0) throws Exception;
+
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list