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.naming;
23:
24: /**
25: * MBean interface.
26: */
27: public interface NamingServiceMBean extends
28: org.jboss.system.ServiceMBean, org.jnp.server.MainMBean {
29:
30: //default object name
31: public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory
32: .create("jboss:service=Naming");
33:
34: /**
35: * Set the thread pool used for the bootstrap lookups
36: * @param poolMBean */
37: void setLookupPool(
38: org.jboss.util.threadpool.BasicThreadPoolMBean poolMBean);
39:
40: /**
41: * Get the call by value flag for jndi lookups.
42: * @return true if all lookups are unmarshalled using the caller's TCL, false if in VM lookups return the value by reference. */
43: boolean getCallByValue();
44:
45: /**
46: * Set the call by value flag for jndi lookups.
47: * @param flag - true if all lookups are unmarshalled using the caller's TCL, false if in VM lookups return the value by reference. */
48: void setCallByValue(boolean flag);
49:
50: /**
51: * Expose the Naming service interface mapping as a read-only attribute
52: * @return A Map<Long hash, Method> of the Naming interface */
53: java.util.Map getMethodMap();
54:
55: /**
56: * Expose the Naming service via JMX to invokers.
57: * @param invocation A pointer to the invocation object
58: * @return Return value of method invocation.
59: * @throws Exception Failed to invoke method. */
60: java.lang.Object invoke(org.jboss.invocation.Invocation invocation)
61: throws java.lang.Exception;
62:
63: /**
64: * Create an alias
65: *
66: * @param fromName the from name
67: * @param toName the to name
68: * @throws Exception for any error
69: */
70: void createAlias(String fromName, String toName) throws Exception;
71:
72: /**
73: * Remove an alias
74: *
75: * @param name the name
76: * @throws Exception for any error
77: */
78: void removeAlias(String name) throws Exception;
79: }
|