站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 naming API Documentation 英文版文档

Main (JBoss Naming API) - JBoss 3.2.7 naming API Documentation 英文版文档


org.jnp.server
Class Main

java.lang.Object
  extended byorg.jnp.server.Main
All Implemented Interfaces:
MainMBean

public class Main
extends Object
implements MainMBean

A main() entry point for running the jnp naming service implementation as a standalone process.

Version:
$Revision: 1.12.2.12 $
Author:
oberg, Scott.Stark@jboss.org

Field Summary
protected  int backlog
          The serverSocket listen queue depth
protected  InetAddress bindAddress
          The interface to bind to for the lookup socket.
protected  RMIClientSocketFactory clientSocketFactory
          An optional custom client socket factory
protected  String clientSocketFactoryName
          The class name of the optional custom client socket factory
protected  boolean InstallGlobalService
          A flag indicating if theServer will be set as the NamingContext.setLocal value
protected  boolean isStubExported
           
protected  ServerSocketFactory jnpServerSocketFactory
          An optional custom server socket factory
protected  String jnpServerSocketFactoryName
          The class name of the optional custom JNP server socket factory
protected  org.jboss.logging.Logger log
           
protected  org.jboss.util.threadpool.ThreadPool lookupPool
           
protected  int port
          The jnp protocol listening port.
protected  InetAddress rmiBindAddress
          The interface to bind to for the Naming RMI server.
protected  int rmiPort
          The RMI port on which the Naming implementation will be exported.
protected  ServerSocket serverSocket
          The jnp server socket through which the NamingServer stub is vended
protected  RMIServerSocketFactory serverSocketFactory
          An optional custom server socket factory
protected  String serverSocketFactoryName
          The class name of the optional custom server socket factory
protected  MarshalledObject serverStub
           
protected  NamingServer theServer
          The Naming interface server implementation
 
Constructor Summary
Main()
           
Main(String categoryName)
           
 
Method Summary
 int getBacklog()
           
 String getBindAddress()
           
 String getClientSocketFactory()
          Get the RMIClientSocketFactory implementation class
 boolean getInstallGlobalService()
          Get the InstallGlobalService which defines whether the MainMBean's Naming server will be installed as the NamingContext.setLocal global value.
 org.jboss.util.threadpool.ThreadPool getLookupPool()
           
 int getPort()
           
 String getRmiBindAddress()
           
 int getRmiPort()
           
 Naming getServer()
           
 String getServerSocketFactory()
          Get the RMIServerSocketFactory implementation class
protected  void initBootstrapListener()
          Bring up the bootstrap lookup port for obtaining the naming service proxy
protected  void initCustomSocketFactories()
          Init the clientSocketFactory, serverSocketFactory using the bind address.
protected  void initJnpInvoker()
          This code should be moved to a seperate invoker in the org.jboss.naming package.
static void main(String[] args)
           
 void setBacklog(int backlog)
           
 void setBindAddress(String host)
           
 void setClientSocketFactory(String factoryClassName)
          Set the RMIClientSocketFactory implementation class
 void setInstallGlobalService(boolean flag)
          Set the InstallGlobalService which defines whether the MainMBean's Naming server will be installed as the NamingContext.setLocal global value.
 void setJNPServerSocketFactory(String factoryClassName)
          Set the ServerSocketFactory implementation class
 void setLookupPool(org.jboss.util.threadpool.ThreadPool lookupPool)
           
 void setNamingProxy(Object proxy)
           
 void setPort(int p)
           
 void setRmiBindAddress(String host)
           
 void setRmiPort(int p)
           
 void setServerSocketFactory(String factoryClassName)
          Set the RMIServerSocketFactory implementation class
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theServer

protected NamingServer theServer
The Naming interface server implementation


serverStub

protected MarshalledObject serverStub

isStubExported

protected boolean isStubExported

serverSocket

protected ServerSocket serverSocket
The jnp server socket through which the NamingServer stub is vended


clientSocketFactory

protected RMIClientSocketFactory clientSocketFactory
An optional custom client socket factory


serverSocketFactory

protected RMIServerSocketFactory serverSocketFactory
An optional custom server socket factory


jnpServerSocketFactory

protected ServerSocketFactory jnpServerSocketFactory
An optional custom server socket factory


clientSocketFactoryName

protected String clientSocketFactoryName
The class name of the optional custom client socket factory


serverSocketFactoryName

protected String serverSocketFactoryName
The class name of the optional custom server socket factory


jnpServerSocketFactoryName

protected String jnpServerSocketFactoryName
The class name of the optional custom JNP server socket factory


bindAddress

protected InetAddress bindAddress
The interface to bind to for the lookup socket. This is useful for multi-homed hosts that want control over which interfaces accept connections.


rmiBindAddress

protected InetAddress rmiBindAddress
The interface to bind to for the Naming RMI server.


backlog

protected int backlog
The serverSocket listen queue depth


port

protected int port
The jnp protocol listening port. The default is 1099, the same as the RMI registry default port.


rmiPort

protected int rmiPort
The RMI port on which the Naming implementation will be exported. The default is 0 which means use any available port.


InstallGlobalService

protected boolean InstallGlobalService
A flag indicating if theServer will be set as the NamingContext.setLocal value


log

protected org.jboss.logging.Logger log

lookupPool

protected org.jboss.util.threadpool.ThreadPool lookupPool
Constructor Detail

Main

public Main()

Main

public Main(String categoryName)
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

getServer

public Naming getServer()

getLookupPool

public org.jboss.util.threadpool.ThreadPool getLookupPool()

setLookupPool

public void setLookupPool(org.jboss.util.threadpool.ThreadPool lookupPool)

setNamingProxy

public void setNamingProxy(Object proxy)
                    throws IOException
Throws:
IOException

setRmiPort

public void setRmiPort(int p)
Specified by:
setRmiPort in interface MainMBean

getRmiPort

public int getRmiPort()
Specified by:
getRmiPort in interface MainMBean

setPort

public void setPort(int p)
Specified by:
setPort in interface MainMBean

getPort

public int getPort()
Specified by:
getPort in interface MainMBean

getBindAddress

public String getBindAddress()
Specified by:
getBindAddress in interface MainMBean

setBindAddress

public void setBindAddress(String host)
                    throws UnknownHostException
Specified by:
setBindAddress in interface MainMBean
Throws:
UnknownHostException

getRmiBindAddress

public String getRmiBindAddress()
Specified by:
getRmiBindAddress in interface MainMBean

setRmiBindAddress

public void setRmiBindAddress(String host)
                       throws UnknownHostException
Specified by:
setRmiBindAddress in interface MainMBean
Throws:
UnknownHostException

getBacklog

public int getBacklog()
Specified by:
getBacklog in interface MainMBean

setBacklog

public void setBacklog(int backlog)
Specified by:
setBacklog in interface MainMBean

getInstallGlobalService

public boolean getInstallGlobalService()
Description copied from interface: MainMBean
Get the InstallGlobalService which defines whether the MainMBean's Naming server will be installed as the NamingContext.setLocal global value.

Specified by:
getInstallGlobalService in interface MainMBean
Returns:
true if this is the VM global naming service, false otherwise

setInstallGlobalService

public void setInstallGlobalService(boolean flag)
Description copied from interface: MainMBean
Set the InstallGlobalService which defines whether the MainMBean's Naming server will be installed as the NamingContext.setLocal global value.

Specified by:
setInstallGlobalService in interface MainMBean
Returns:
true if this is the VM global naming service, false otherwise

getClientSocketFactory

public String getClientSocketFactory()
Description copied from interface: MainMBean
Get the RMIClientSocketFactory implementation class

Specified by:
getClientSocketFactory in interface MainMBean

setClientSocketFactory

public void setClientSocketFactory(String factoryClassName)
                            throws ClassNotFoundException,
                                   InstantiationException,
                                   IllegalAccessException
Description copied from interface: MainMBean
Set the RMIClientSocketFactory implementation class

Specified by:
setClientSocketFactory in interface MainMBean
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException

getServerSocketFactory

public String getServerSocketFactory()
Description copied from interface: MainMBean
Get the RMIServerSocketFactory implementation class

Specified by:
getServerSocketFactory in interface MainMBean

setServerSocketFactory

public void setServerSocketFactory(String factoryClassName)
                            throws ClassNotFoundException,
                                   InstantiationException,
                                   IllegalAccessException
Description copied from interface: MainMBean
Set the RMIServerSocketFactory implementation class

Specified by:
setServerSocketFactory in interface MainMBean
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException

setJNPServerSocketFactory

public void setJNPServerSocketFactory(String factoryClassName)
                               throws ClassNotFoundException,
                                      InstantiationException,
                                      IllegalAccessException
Description copied from interface: MainMBean
Set the ServerSocketFactory implementation class

Specified by:
setJNPServerSocketFactory in interface MainMBean
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException

start

public void start()
           throws Exception
Specified by:
start in interface MainMBean
Throws:
Exception

stop

public void stop()
Specified by:
stop in interface MainMBean

initJnpInvoker

protected void initJnpInvoker()
                       throws IOException
This code should be moved to a seperate invoker in the org.jboss.naming package.

Throws:
IOException

initBootstrapListener

protected void initBootstrapListener()
Bring up the bootstrap lookup port for obtaining the naming service proxy


initCustomSocketFactories

protected void initCustomSocketFactories()
Init the clientSocketFactory, serverSocketFactory using the bind address.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.