KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ha > jndi > DetachedHANamingServiceMBean


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * 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.jndi;
23
24 import java.net.UnknownHostException JavaDoc;
25 import java.util.Map JavaDoc;
26 import javax.management.ObjectName JavaDoc;
27
28 import org.jboss.ha.framework.server.ClusterPartitionMBean;
29 import org.jboss.invocation.Invocation;
30 import org.jboss.util.threadpool.BasicThreadPoolMBean;
31
32 /** The standard mbean management interface for the DetachedHANamingService
33  *
34  * @author Scott.Stark@jboss.org
35  * @version $Revision: 56090 $
36  *
37  * <p><b>Revisions:</b><br>
38  */

39 public interface DetachedHANamingServiceMBean
40    extends org.jboss.system.ServiceMBean
41 {
42    /**
43     * Gets the name of the HAPartition used by this service.
44     *
45     * @return the name of the partition
46     *
47     * @deprecate use {@link #getClusterPartition()}
48     */

49    String JavaDoc getPartitionName();
50    /**
51     * Sets the name of the HAPartition used by this service.
52     *
53     * @param name the name of the partition
54     *
55     * @deprecate use {@link #setClusterPartition()}
56     */

57    void setPartitionName(String JavaDoc name);
58    
59    /**
60     * Get the underlying partition used by this service.
61     *
62     * @return the partition
63     */

64    ClusterPartitionMBean getClusterPartition();
65    
66    /**
67     * Sets the underlying partition used by this service.
68     *
69     * @param clusterPartition the partition
70     */

71    void setClusterPartition(ClusterPartitionMBean clusterPartition);
72
73    /** Get the proxy factory service name used to create the Naming transport
74     * proxy.
75     */

76    public ObjectName JavaDoc getProxyFactoryObjectName();
77    /** Set the proxy factory service name used to create the Naming transport
78     * proxy.
79     */

80    public void setProxyFactoryObjectName(ObjectName JavaDoc proxyFactory);
81
82    /** Get the bootstrap port on which the HA-JNDI stub is made available
83     */

84    int getPort();
85    /** Set the bootstrap port on which the HA-JNDI stub is made available
86     */

87    void setPort(int p);
88
89    /** Get the bootstrap IP address on which the HA-JNDI stub is made available
90     */

91    String JavaDoc getBindAddress();
92    /** Set the bootstrap IP address on which the HA-JNDI stub is made available
93     */

94    void setBindAddress(String JavaDoc host) throws UnknownHostException JavaDoc;
95
96    /** Get the accept backlog for the bootstrap server socket
97     */

98    int getBacklog();
99    /** Set the accept backlog for the bootstrap server socket
100     */

101    void setBacklog(int backlog);
102  
103    /**
104     * prevent autodiscovery service from starting
105     */

106    void setDiscoveryDisabled(boolean disabled);
107
108    /**
109     * prevent autodiscovery service from starting
110     */

111    boolean getDiscoveryDisabled();
112
113    /** Get the Auto-discovery multicast port
114     */

115    int getAutoDiscoveryGroup();
116    /** Set the Auto-discovery multicast port.
117     */

118    void setAutoDiscoveryGroup(int adGroup);
119
120    /** Get the auto-discovery bootstrap multicast address.
121     */

122    String JavaDoc getAutoDiscoveryAddress();
123    /** Set the auto-discovery bootstrap multicast address. If null or empty, no
124     * auto-discovery bootstrap socket will be created.
125     */

126    void setAutoDiscoveryAddress(String JavaDoc adAddress);
127
128    /** Get the auto-discovery bootstrap multicast bind address.
129     */

130    String JavaDoc getAutoDiscoveryBindAddress();
131    /** Set the auto-discovery bootstrap multicast bind address. If not specified
132     * and a BindAddress is specified, the BindAddress will be used.
133     */

134    void setAutoDiscoveryBindAddress(String JavaDoc adAddress)
135       throws UnknownHostException JavaDoc;
136
137    /** Get the TTL (time-to-live) for autodiscovery IP multicast packets */
138    int getAutoDiscoveryTTL();
139
140    /** Set the TTL (time-to-live) for autodiscovery IP multicast packets */
141    void setAutoDiscoveryTTL(int ttl);
142
143    /** Set the thread pool used for the bootstrap and autodiscovery lookups
144     *
145     * @param poolMBean
146     */

147    public void setLookupPool(BasicThreadPoolMBean poolMBean);
148
149    /** Expose the Naming service interface mapping as a read-only attribute
150     *
151     * @jmx:managed-attribute
152     *
153     * @return A Map<Long hash, Method> of the Naming interface
154     */

155    public Map JavaDoc getMethodMap();
156
157    /** Expose the Naming service via JMX for detached invokers.
158     *
159     * @param invocation A pointer to the invocation object
160     * @return Return value of method invocation.
161     *
162     * @throws Exception Failed to invoke method.
163     */

164    public Object JavaDoc invoke(Invocation invocation) throws Exception JavaDoc;
165 }
Popular Tags