org.globus.gatekeeper
Class GateKeeperServer

java.lang.Object
  extended by org.globus.net.BaseServer
      extended by org.globus.gatekeeper.GateKeeperServer
All Implemented Interfaces:
Runnable

public class GateKeeperServer
extends BaseServer

Globus GateKeeper.


Field Summary
protected static int PORT
           
 
Fields inherited from class org.globus.net.BaseServer
_server, accept, authorization, credentials, deactivator, gssMode, SO_TIMEOUT, timeout, url
 
Constructor Summary
GateKeeperServer()
          Initializes the GateKeeperServer with default credentials and starts to listen to client connections
GateKeeperServer(GSSCredential cred, int port)
          initializes the GateKeeperServer with the provided credentials and starts to listen to client connections on the port passed as a parameter
GateKeeperServer(int port)
          initializes the GateKeeperServer with default credentials and starts to listen to client connections on the port passed as a parameter
 
Method Summary
 void addListener(GateKeeperListener listener)
          Add a new listener for this Gatekeeper.
 String getContact()
           
 GridMap getGridMap()
           
 Service getService(String serviceName)
           
protected  void handleConnection(Socket socket)
          Handles individual client connections by starting a different thread.
 void registerService(String serviceName, Class clazz, String[] args)
           
 void registerService(String serviceName, String className, String[] args)
           
 void registerServices(Properties servicesInfo)
           
 void removeListener(GateKeeperListener listener)
          Remove a listener from this Gatekeeper.
 void setGridMap(GridMap gridMap)
           
 void setLogFile(String file)
           
 boolean unregisterService(String serviceName)
           
 
Methods inherited from class org.globus.net.BaseServer
getCredentials, getHost, getHostname, getPort, getProtocol, getTimeout, getURL, initialize, registerDefaultDeactivator, run, setAuthorization, setGssMode, setTimeout, shutdown, start, unregisterDefaultDeactivator, wrapSocket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

protected static final int PORT
See Also:
Constant Field Values
Constructor Detail

GateKeeperServer

public GateKeeperServer()
                 throws IOException
Initializes the GateKeeperServer with default credentials and starts to listen to client connections

Throws:
IOException - is thrown when the port cannot be opened

GateKeeperServer

public GateKeeperServer(int port)
                 throws IOException
initializes the GateKeeperServer with default credentials and starts to listen to client connections on the port passed as a parameter

Parameters:
port - the port number used by this server
Throws:
IOException - is thrown when the port cannot be opened

GateKeeperServer

public GateKeeperServer(GSSCredential cred,
                        int port)
                 throws IOException
initializes the GateKeeperServer with the provided credentials and starts to listen to client connections on the port passed as a parameter

Parameters:
cred - the credentials used by this server, if null then default credentials are used.
port - the port number used by this server
Throws:
IOException
Method Detail

setLogFile

public void setLogFile(String file)

setGridMap

public void setGridMap(GridMap gridMap)

getGridMap

public GridMap getGridMap()

handleConnection

protected void handleConnection(Socket socket)
Handles individual client connections by starting a different thread.

Specified by:
handleConnection in class BaseServer
Parameters:
socket - is connected to a client ready to send request to the gatekeeper.

addListener

public void addListener(GateKeeperListener listener)
Add a new listener for this Gatekeeper.

Parameters:
listener -

removeListener

public void removeListener(GateKeeperListener listener)
Remove a listener from this Gatekeeper.

Parameters:
listener -

getContact

public String getContact()
                  throws UnknownHostException
Throws:
UnknownHostException

registerServices

public void registerServices(Properties servicesInfo)
                      throws Exception
Throws:
Exception

getService

public Service getService(String serviceName)
                   throws GateKeeperException
Throws:
GateKeeperException

registerService

public void registerService(String serviceName,
                            String className,
                            String[] args)
                     throws ClassNotFoundException
Throws:
ClassNotFoundException

registerService

public void registerService(String serviceName,
                            Class clazz,
                            String[] args)

unregisterService

public boolean unregisterService(String serviceName)