001/* 002 * Copyright 2009 Red Hat, Inc. 003 * Red Hat licenses this file to you under the Apache License, version 004 * 2.0 (the "License"); you may not use this file except in compliance 005 * with the License. You may obtain a copy of the License at 006 * http://www.apache.org/licenses/LICENSE-2.0 007 * Unless required by applicable law or agreed to in writing, software 008 * distributed under the License is distributed on an "AS IS" BASIS, 009 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 010 * implied. See the License for the specific language governing 011 * permissions and limitations under the License. 012 */ 013 014package org.hornetq.api.core.management; 015 016import java.util.Map; 017 018/** 019 * A ClusterConnectionControl is used to manage a cluster connection. 020 * 021 * @author <a href="jmesnil@redhat.com">Jeff Mesnil</a> 022 * 023 */ 024public interface ClusterConnectionControl extends HornetQComponentControl 025{ 026 /** 027 * Returns the configuration name of this cluster connection. 028 */ 029 String getName(); 030 031 /** 032 * Returns the address used by this cluster connection. 033 */ 034 String getAddress(); 035 036 /** 037 * Returns the node ID used by this cluster connection. 038 */ 039 String getNodeID(); 040 041 /** 042 * Return whether this cluster connection use duplicate detection. 043 */ 044 boolean isDuplicateDetection(); 045 046 /** 047 * Return whether this cluster connection forward messages when it has no local consumers. 048 */ 049 boolean isForwardWhenNoConsumers(); 050 051 /** 052 * Return the Topology that this Cluster Connection knows about 053 */ 054 String getTopology(); 055 /** 056 * Returns the maximum number of hops used by this cluster connection. 057 */ 058 int getMaxHops(); 059 060 /** 061 * Returns the list of static connectors 062 */ 063 Object[] getStaticConnectors(); 064 065 /** 066 * Returns the list of static connectors as JSON 067 */ 068 String getStaticConnectorsAsJSON() throws Exception; 069 070 /** 071 * Returns the name of the discovery group used by this cluster connection. 072 */ 073 String getDiscoveryGroupName(); 074 075 /** 076 * Returns the connection retry interval used by this cluster connection. 077 */ 078 long getRetryInterval(); 079 080 /** 081 * Returns a map of the nodes connected to this cluster connection. 082 * <br> 083 * keys are node IDs, values are the addresses used to connect to the nodes. 084 */ 085 Map<String, String> getNodes() throws Exception; 086}