/*
* 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.
*/
package org.jboss.jmx.connector;

/**
 * MBean interface.
 */
public interface ConnectorFactoryServiceMBean extends org.jboss.system.ServiceMBean {

   //default object name
   public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory.create("jboss.rmi.connector:name=JMX");

  int getNotificationType() ;

  void setNotificationType(int pNotificationType) ;

  java.lang.String getJMSName() ;

   /**
    * Sets the JMS Queue Factory Name which allows the server to send the notifications asynchronous to the client
    * @param pName If null the notification will be transferred by using RMI Callback objects otherwise it will use JMS    */
  void setJMSName(java.lang.String pName) ;

  java.lang.String getEJBAdaptorName() ;

   /**
    * Sets the JNDI Name of the EJB-Adaptor
    * @param pName If null the default JNDI name (ejb/jmx/ejb/adaptor) will be used for EJB-Connectors otherwise it will use this one    */
  void setEJBAdaptorName(java.lang.String pName) ;

   /**
    * Look up for all registered JMX Connector at a given JNDI server
    * @param pProperties List of properties defining the JNDI server
    * @param pTester Connector Tester implementation to be used
    * @return An iterator on the list of ConnectorNames representing the found JMX Connectors    */
  java.util.Iterator getConnectors(java.util.Hashtable pProperties,ConnectorFactoryImpl.IConnectorTester pTester) ;

   /**
    * Initiate a connection to the given server with the given protocol
    * @param pConnector Connector Name used to identify the remote JMX Connector
    * @return JMX Connector or null if server or protocol is not supported    */
  org.jboss.jmx.connector.RemoteMBeanServer createConnection(ConnectorFactoryImpl.ConnectorName pConnector) ;

   /**
    * Removes the given connection and frees the resources
    * @param pConnector Connector Name used to identify the remote JMX Connector    */
  void removeConnection(ConnectorFactoryImpl.ConnectorName pConnector) ;

}
