org.jboss.naming
Class NamingService
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.naming.NamingService
- All Implemented Interfaces:
- MBeanRegistration, NotificationBroadcaster, NotificationEmitter, org.jboss.kernel.spi.dependency.KernelControllerContextAware, NamingServiceMBean, Service, ServiceMBean, org.jnp.server.MainMBean, org.jnp.server.NamingBean
public class NamingService
- extends ServiceMBeanSupport
- implements NamingServiceMBean
A JBoss service that starts the jnp JNDI server.
- Version:
- $Revision: 88695 $
- Author:
- Rickard Oberg, Scott Stark., Andreas Schaefer.
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jnp.server.MainMBean |
start, stop |
NamingService
public NamingService()
getNaming
public org.jnp.server.NamingBean getNaming()
setNaming
public void setNaming(org.jnp.server.NamingBean bean)
getNamingInfo
public org.jnp.server.NamingBean getNamingInfo()
- Specified by:
getNamingInfo
in interface org.jnp.server.MainMBean
setNamingInfo
public void setNamingInfo(org.jnp.server.NamingBean bean)
- Specified by:
setNamingInfo
in interface org.jnp.server.MainMBean
getNamingProxy
public Object getNamingProxy()
throws Exception
- Specified by:
getNamingProxy
in interface org.jnp.server.MainMBean
- Throws:
Exception
setNamingProxy
public void setNamingProxy(Object proxy)
throws IOException
- Specified by:
setNamingProxy
in interface org.jnp.server.MainMBean
- Throws:
IOException
getNamingInstance
public org.jnp.interfaces.Naming getNamingInstance()
- Specified by:
getNamingInstance
in interface org.jnp.server.NamingBean
setLookupPool
public void setLookupPool(org.jboss.util.threadpool.BasicThreadPoolMBean poolMBean)
- Set the thread pool used for the bootstrap lookups
- Specified by:
setLookupPool
in interface NamingServiceMBean
- Parameters:
poolMBean
-
getCallByValue
public boolean getCallByValue()
- Get the call by value flag for jndi lookups.
- Specified by:
getCallByValue
in interface NamingServiceMBean
- Specified by:
getCallByValue
in interface org.jnp.server.MainMBean
- Returns:
- true if all lookups are unmarshalled using the caller's TCL,
false if in VM lookups return the value by reference.
setCallByValue
public void setCallByValue(boolean flag)
- Set the call by value flag for jndi lookups.
- Specified by:
setCallByValue
in interface NamingServiceMBean
- Specified by:
setCallByValue
in interface org.jnp.server.MainMBean
- Parameters:
flag
- - true if all lookups are unmarshalled using the caller's TCL,
false if in VM lookups return the value by reference.
setPort
public void setPort(int port)
- Specified by:
setPort
in interface org.jnp.server.MainMBean
getPort
public int getPort()
- Specified by:
getPort
in interface org.jnp.server.MainMBean
setRmiPort
public void setRmiPort(int port)
- Specified by:
setRmiPort
in interface org.jnp.server.MainMBean
getRmiPort
public int getRmiPort()
- Specified by:
getRmiPort
in interface org.jnp.server.MainMBean
getBindAddress
public String getBindAddress()
- Specified by:
getBindAddress
in interface org.jnp.server.MainMBean
setBindAddress
public void setBindAddress(String host)
throws UnknownHostException
- Specified by:
setBindAddress
in interface org.jnp.server.MainMBean
- Throws:
UnknownHostException
getRmiBindAddress
public String getRmiBindAddress()
- Specified by:
getRmiBindAddress
in interface org.jnp.server.MainMBean
setRmiBindAddress
public void setRmiBindAddress(String host)
throws UnknownHostException
- Specified by:
setRmiBindAddress
in interface org.jnp.server.MainMBean
- Throws:
UnknownHostException
getBacklog
public int getBacklog()
- Specified by:
getBacklog
in interface org.jnp.server.MainMBean
setBacklog
public void setBacklog(int backlog)
- Specified by:
setBacklog
in interface org.jnp.server.MainMBean
getInstallGlobalService
public boolean getInstallGlobalService()
- Specified by:
getInstallGlobalService
in interface org.jnp.server.MainMBean
setInstallGlobalService
public void setInstallGlobalService(boolean flag)
- Specified by:
setInstallGlobalService
in interface org.jnp.server.MainMBean
getUseGlobalService
public boolean getUseGlobalService()
- Specified by:
getUseGlobalService
in interface org.jnp.server.MainMBean
setUseGlobalService
public void setUseGlobalService(boolean flag)
- Specified by:
setUseGlobalService
in interface org.jnp.server.MainMBean
getClientSocketFactory
public String getClientSocketFactory()
- Specified by:
getClientSocketFactory
in interface org.jnp.server.MainMBean
setClientSocketFactory
public void setClientSocketFactory(String factoryClassName)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
- Specified by:
setClientSocketFactory
in interface org.jnp.server.MainMBean
- Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
getClientSocketFactoryBean
public RMIClientSocketFactory getClientSocketFactoryBean()
- Specified by:
getClientSocketFactoryBean
in interface org.jnp.server.MainMBean
setClientSocketFactoryBean
public void setClientSocketFactoryBean(RMIClientSocketFactory factory)
- Specified by:
setClientSocketFactoryBean
in interface org.jnp.server.MainMBean
getServerSocketFactory
public String getServerSocketFactory()
- Specified by:
getServerSocketFactory
in interface org.jnp.server.MainMBean
setServerSocketFactory
public void setServerSocketFactory(String factoryClassName)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
- Specified by:
setServerSocketFactory
in interface org.jnp.server.MainMBean
- Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
getServerSocketFactoryBean
public RMIServerSocketFactory getServerSocketFactoryBean()
- Specified by:
getServerSocketFactoryBean
in interface org.jnp.server.MainMBean
setServerSocketFactoryBean
public void setServerSocketFactoryBean(RMIServerSocketFactory factory)
- Specified by:
setServerSocketFactoryBean
in interface org.jnp.server.MainMBean
getJNPServerSocketFactory
public String getJNPServerSocketFactory()
- Specified by:
getJNPServerSocketFactory
in interface org.jnp.server.MainMBean
setJNPServerSocketFactory
public void setJNPServerSocketFactory(String factoryClassName)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
- Specified by:
setJNPServerSocketFactory
in interface org.jnp.server.MainMBean
- Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
getJNPServerSocketFactoryBean
public ServerSocketFactory getJNPServerSocketFactoryBean()
- Specified by:
getJNPServerSocketFactoryBean
in interface org.jnp.server.MainMBean
setJNPServerSocketFactoryBean
public void setJNPServerSocketFactoryBean(ServerSocketFactory factory)
- Specified by:
setJNPServerSocketFactoryBean
in interface org.jnp.server.MainMBean
setInvokerProxyFactory
public void setInvokerProxyFactory(JRMPProxyFactoryMBean proxyFactory)
getBootstrapURL
public String getBootstrapURL()
- Specified by:
getBootstrapURL
in interface org.jnp.server.MainMBean
getLookupListenerException
public Exception getLookupListenerException()
- Specified by:
getLookupListenerException
in interface org.jnp.server.MainMBean
startService
protected void startService()
throws Exception
- Overrides:
startService
in class ServiceMBeanSupport
- Throws:
Exception
stopService
protected void stopService()
throws Exception
- Overrides:
stopService
in class ServiceMBeanSupport
- Throws:
Exception
getNamingServer
protected org.jnp.server.Main getNamingServer()
- The
getNamingServer
method makes this class
extensible, but it is a hack. The NamingServer should be
exposed directly as an xmbean, and the startup logic put in
either an interceptor, the main class itself, or an auxilliary
mbean (for the enc).
- Returns:
- a
Main
value
getMethodMap
public Map getMethodMap()
- Expose the Naming service interface mapping as a read-only attribute
- Specified by:
getMethodMap
in interface NamingServiceMBean
- Returns:
- A Map of the Naming interface
createAlias
public void createAlias(String fromName,
String toName)
throws Exception
- Description copied from interface:
NamingServiceMBean
- Create an alias
- Specified by:
createAlias
in interface NamingServiceMBean
- Parameters:
fromName
- the from nametoName
- the to name
- Throws:
Exception
- for any error
removeAlias
public void removeAlias(String name)
throws Exception
- Description copied from interface:
NamingServiceMBean
- Remove an alias
- Specified by:
removeAlias
in interface NamingServiceMBean
- Parameters:
name
- the name
- Throws:
Exception
- for any error
invoke
public Object invoke(Invocation invocation)
throws Exception
- Expose the Naming service via JMX to invokers.
- Specified by:
invoke
in interface NamingServiceMBean
- Parameters:
invocation
- A pointer to the invocation object
- Returns:
- Return value of method invocation.
- Throws:
Exception
- Failed to invoke method.
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.