001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jnp.server;
023:
024: import java.net.UnknownHostException;
025: import java.rmi.server.RMIClientSocketFactory;
026: import java.rmi.server.RMIServerSocketFactory;
027:
028: import javax.net.ServerSocketFactory;
029:
030: /**
031: * The Mbean interface for the jnp provider server.
032: *
033: * @author Rickard Oberg
034: * @author Scott.Stark@jboss.org
035: * @version $Revision: 60231 $
036: */
037: public interface MainMBean extends NamingBean {
038: // Attributes ---------------------------------------------------
039:
040: void setRmiPort(int port);
041:
042: int getRmiPort();
043:
044: void setPort(int port);
045:
046: int getPort();
047:
048: void setBindAddress(String host) throws UnknownHostException;
049:
050: String getBindAddress();
051:
052: void setRmiBindAddress(String host) throws UnknownHostException;
053:
054: String getRmiBindAddress();
055:
056: void setBacklog(int backlog);
057:
058: int getBacklog();
059:
060: /** Whether the MainMBean's Naming server will be installed as the NamingContext.setLocal global value */
061: void setInstallGlobalService(boolean flag);
062:
063: boolean getInstallGlobalService();
064:
065: /** Get the UseGlobalService which defines whether the MainMBean's
066: * Naming server will initialized from the existing NamingContext.setLocal
067: * global value.
068: *
069: * @return true if this should try to use VM global naming service, false otherwise
070: */
071: public boolean getUseGlobalService();
072:
073: /** Set the UseGlobalService which defines whether the MainMBean's
074: * Naming server will initialized from the existing NamingContext.setLocal global
075: * value. This allows one to export multiple servers via different transports
076: * and still share the same underlying naming service.
077: *
078: * @return true if this should try to use VM global naming service, false otherwise
079: */
080: public void setUseGlobalService(boolean flag);
081:
082: /** The RMIClientSocketFactory implementation class */
083: void setClientSocketFactory(String factoryClassName)
084: throws ClassNotFoundException, InstantiationException,
085: IllegalAccessException;
086:
087: String getClientSocketFactory();
088:
089: /** The RMIClientSocketFactory bean */
090: public RMIClientSocketFactory getClientSocketFactoryBean();
091:
092: public void setClientSocketFactoryBean(
093: RMIClientSocketFactory factory);
094:
095: /** The RMIServerSocketFactory implementation class */
096: void setServerSocketFactory(String factoryClassName)
097: throws ClassNotFoundException, InstantiationException,
098: IllegalAccessException;
099:
100: String getServerSocketFactory();
101:
102: /** The RMIServerSocketFactory bean */
103: public RMIServerSocketFactory getServerSocketFactoryBean();
104:
105: public void setServerSocketFactoryBean(
106: RMIServerSocketFactory factory);
107:
108: /** The JNPServerSocketFactory implementation class */
109: ServerSocketFactory getJNPServerSocketFactoryBean();
110:
111: void setJNPServerSocketFactoryBean(ServerSocketFactory factory);
112:
113: public String getJNPServerSocketFactory();
114:
115: void setJNPServerSocketFactory(String factoryClassName)
116: throws ClassNotFoundException, InstantiationException,
117: IllegalAccessException;
118:
119: // Operations ----------------------------------------------------
120:
121: public void start() throws Exception;
122:
123: public void stop();
124:
125: }
|