org.jboss.naming
Class NamingService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.naming.NamingService
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class NamingService
extends ServiceMBeanSupport (src)

A JBoss service that starts the jnp JNDI server.


Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
NamingService()
           
 
Method Summary
 int getBacklog()
           
 java.lang.String getBindAddress()
           
 boolean getCallByValue()
          Get the call by value flag for jndi lookups.
 java.lang.String getClientSocketFactory()
           
 boolean getInstallGlobalService()
           
 java.util.Map getMethodMap()
          Expose the Naming service interface mapping as a read-only attribute
protected  Main (src) getNamingServer()
          The getNamingServer method makes this class extensible, but it is a hack.
 int getPort()
           
 java.lang.String getRmiBindAddress()
           
 int getRmiPort()
           
 java.lang.String getServerSocketFactory()
           
 java.lang.Object invoke(Invocation (src)  invocation)
          Expose the Naming service via JMX to invokers.
 void setBacklog(int backlog)
           
 void setBindAddress(java.lang.String host)
           
 void setCallByValue(boolean flag)
          Set the call by value flag for jndi lookups.
 void setClientSocketFactory(java.lang.String factoryClassName)
           
 void setInstallGlobalService(boolean flag)
           
 void setInvokerProxyFactory(JRMPProxyFactoryMBean (src)  proxyFactory)
           
 void setJNPServerSocketFactory(java.lang.String factoryClassName)
           
 void setLookupPool(BasicThreadPoolMBean (src)  poolMBean)
          Set the thread pool used for the bootstrap lookups
 void setPort(int port)
           
 void setRmiBindAddress(java.lang.String host)
           
 void setRmiPort(int port)
           
 void setServerSocketFactory(java.lang.String factoryClassName)
           
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamingService

public NamingService()
Method Detail

setLookupPool

public void setLookupPool(BasicThreadPoolMBean (src)  poolMBean)
Set the thread pool used for the bootstrap lookups

Parameters:
poolMBean -

getCallByValue

public boolean getCallByValue()
Get the call by value flag for jndi lookups.

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.

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)

getPort

public int getPort()

setRmiPort

public void setRmiPort(int port)

getRmiPort

public int getRmiPort()

getBindAddress

public java.lang.String getBindAddress()

setBindAddress

public void setBindAddress(java.lang.String host)
                    throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

getRmiBindAddress

public java.lang.String getRmiBindAddress()

setRmiBindAddress

public void setRmiBindAddress(java.lang.String host)
                       throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

getBacklog

public int getBacklog()

setBacklog

public void setBacklog(int backlog)

getInstallGlobalService

public boolean getInstallGlobalService()

setInstallGlobalService

public void setInstallGlobalService(boolean flag)

getClientSocketFactory

public java.lang.String getClientSocketFactory()

setClientSocketFactory

public void setClientSocketFactory(java.lang.String factoryClassName)
                            throws java.lang.ClassNotFoundException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

getServerSocketFactory

public java.lang.String getServerSocketFactory()

setServerSocketFactory

public void setServerSocketFactory(java.lang.String factoryClassName)
                            throws java.lang.ClassNotFoundException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

setJNPServerSocketFactory

public void setJNPServerSocketFactory(java.lang.String factoryClassName)
                               throws java.lang.ClassNotFoundException,
                                      java.lang.InstantiationException,
                                      java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

setInvokerProxyFactory

public void setInvokerProxyFactory(JRMPProxyFactoryMBean (src)  proxyFactory)

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

getNamingServer

protected Main (src)  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 java.util.Map getMethodMap()
Expose the Naming service interface mapping as a read-only attribute

Returns:
A Map of the Naming interface

invoke

public java.lang.Object invoke(Invocation (src)  invocation)
                        throws java.lang.Exception
Expose the Naming service via JMX to invokers.

Parameters:
invocation - A pointer to the invocation object
Returns:
Return value of method invocation.
Throws:
java.lang.Exception - Failed to invoke method.