Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » transport » discovery » [javadoc | source]
    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *      http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   package org.apache.activemq.transport.discovery;
   18   
   19   import java.io.IOException;
   20   
   21   import javax.jms.JMSException;
   22   
   23   import org.apache.activemq.Service;
   24   import org.apache.activemq.command.DiscoveryEvent;
   25   
   26   /**
   27    * An agent used to discover other instances of a service. 
   28    * 
   29    * We typically use a discovery agent to auto-discover JMS clients and JMS brokers on a network
   30    *
   31    * @version $Revision$
   32    */
   33   public interface DiscoveryAgent extends Service {
   34   
   35       /**
   36        * Sets the discovery listener
   37        * @param listener
   38        */
   39       void setDiscoveryListener(DiscoveryListener listener);
   40   
   41       /**
   42        * register a service
   43        * @param name
   44        * @param details
   45        * @throws JMSException
   46        */
   47       void registerService(String name) throws IOException;
   48       
   49       /**
   50        * A process actively using a service may see it go down before the DiscoveryAgent notices the
   51        * service's failure.  That process can use this method to notify the DiscoveryAgent of the failure
   52        * so that other listeners of this DiscoveryAgent can also be made aware of the failure.
   53        */
   54       void serviceFailed(DiscoveryEvent event) throws IOException;
   55       
   56   }

Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » transport » discovery » [javadoc | source]