01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package org.jboss.ha.framework.server.util;
23:
24: import java.util.ArrayList;
25:
26: /**
27: * @author Scott.Stark@jboss.org
28: * @version $Revision: 57188 $
29: */
30: public interface PingJndiMBean {
31: /** Get the names of JNDI bindings that should be queried on each host
32: * @return the array of target names to test
33: */
34: public String[] getLookupNames();
35:
36: /** Set the names of JNDI bindings that should be queried on each host
37: * @param names
38: */
39: public void setLookupNames(String[] names);
40:
41: /** Get the Context.PROVIDER_URL regular expression.
42: * @return the expression containing the ${host} reference, for example
43: * 'jnp://${host}:1099/'
44: */
45: public String getProviderURLPattern();
46:
47: /** Set the expression containing the hostname/IP ${host} reference of
48: * the JNDI provider. This expression is used to build the JNDI
49: * Context.PROVIDER_URL for each node in the cluster. The expression
50: * should contain a "(host)" component that will be replaced with the
51: * cluster node hostname.
52: *
53: * @param regex the regular expression containing the host, for example
54: * 'jnp://(host):1099/'
55: */
56: public void setProviderURLPattern(String regex);
57:
58: /** The TopologyMonitorService trigger callback operation.
59: *
60: * @param deadMembers ArrayList<AddressPort> of nodes that were removed
61: * @param newMembers ArrayList<AddressPort> of nodes that were added
62: * @param allMembers ArrayList<AddressPort> of nodes currently in the cluster
63: * @param logCategoryName the log4j category name used by the
64: * TopologyMonitorService. This is used for logging to integrate with
65: * the TopologyMonitorService output.
66: */
67: public void membershipChanged(ArrayList deadMembers,
68: ArrayList newMembers, ArrayList allMembers,
69: String logCategoryName);
70: }
|