org.openejb.ri.server
Class Server

java.lang.Object
  |
  +--org.openejb.ri.server.Server
All Implemented Interfaces:
ApplicationServer, java.lang.Runnable

public class Server
extends java.lang.Object
implements java.lang.Runnable, ApplicationServer


Inner Class Summary
 class Server.ServerControl
           
 class Server.SocketHandler
          This inner class defines objects that manage a connection from a EJBHome or EJBObject proxy on a client.
 
Field Summary
(package private)  java.util.Vector clientSockets
           
static java.lang.String[] COMMANDS
           
static int EXIT
           
static int HELP
           
(package private)  java.lang.String ip
           
(package private)  java.lang.Thread myThread
           
static java.lang.String NAMING_SERVER_PROPERTIES_FILE
           
(package private)  NamingServer namingServer
           
static java.lang.String OPENEJB_CONFIG_FILE
           
static int PAUSE
           
(package private)  int port
           
(package private)  java.util.Properties props
           
(package private)  java.util.HashMap proxyMap
           
(package private) static java.lang.reflect.Method removeMethod
           
static int RESTART
           
static java.lang.String RI_HOST_IP
           
static java.lang.String RI_HOST_PORT
           
(package private)  java.net.ServerSocket serverSocket
           
static int START
           
static int STOP
           
(package private) static boolean SYSTEM_STABLE
          The SYSTEM_STABLE variable is used in the run method of the SocketHanlder inner class.
 
Constructor Summary
Server(java.util.Properties props)
           
 
Method Summary
(package private) static void ()
           
 void checkAuthorization(MethodInvocation methodInvocation)
          Checks the authorization of the client requesting access to the Ri server.
protected  void dereference(Server.SocketHandler hndlr)
           
 javax.ejb.EJBHome getEJBHome(ProxyInfo proxyInfo)
           
 javax.ejb.EJBMetaData getEJBMetaData(ProxyInfo proxyInfo)
           
 javax.ejb.EJBObject getEJBObject(ProxyInfo proxyInfo)
           
 javax.ejb.Handle getHandle(ProxyInfo proxyInfo)
           
 java.lang.Object invokeMethod(MethodInvocation mi)
           
static void main(java.lang.String[] args)
           
static void println(java.lang.String str)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_STABLE

static boolean SYSTEM_STABLE
The SYSTEM_STABLE variable is used in the run method of the SocketHanlder inner class. It allows the SocketHanlder objects to continue to process requests when its value is true. The SYSTEM_STABLE variable is set to false if a org.openejb.SystemException is thrown by the container System. This allows all current requests to finish processing but will not allow new requests to be processed.

namingServer

NamingServer namingServer

OPENEJB_CONFIG_FILE

public static final java.lang.String OPENEJB_CONFIG_FILE

RI_HOST_IP

public static final java.lang.String RI_HOST_IP

RI_HOST_PORT

public static final java.lang.String RI_HOST_PORT

NAMING_SERVER_PROPERTIES_FILE

public static final java.lang.String NAMING_SERVER_PROPERTIES_FILE

removeMethod

static java.lang.reflect.Method removeMethod

serverSocket

java.net.ServerSocket serverSocket

clientSockets

java.util.Vector clientSockets

proxyMap

java.util.HashMap proxyMap

port

int port

ip

java.lang.String ip

myThread

java.lang.Thread myThread

props

java.util.Properties props

COMMANDS

public static final java.lang.String[] COMMANDS

HELP

public static final int HELP

STOP

public static final int STOP

START

public static final int START

RESTART

public static final int RESTART

PAUSE

public static final int PAUSE

EXIT

public static final int EXIT
Constructor Detail

Server

public Server(java.util.Properties props)
       throws java.lang.Exception
Method Detail

static void ()

run

public void run()
Specified by:
run in interface java.lang.Runnable

dereference

protected void dereference(Server.SocketHandler hndlr)

main

public static void main(java.lang.String[] args)

checkAuthorization

public void checkAuthorization(MethodInvocation methodInvocation)
                        throws OpenEJBException
Checks the authorization of the client requesting access to the Ri server.
Parameters:
methodInvocation -  
Throws:
OpenEJBException -  

invokeMethod

public java.lang.Object invokeMethod(MethodInvocation mi)
                              throws OpenEJBException

println

public static void println(java.lang.String str)

getEJBMetaData

public javax.ejb.EJBMetaData getEJBMetaData(ProxyInfo proxyInfo)
Specified by:
getEJBMetaData in interface ApplicationServer

getHandle

public javax.ejb.Handle getHandle(ProxyInfo proxyInfo)
Specified by:
getHandle in interface ApplicationServer

getEJBObject

public javax.ejb.EJBObject getEJBObject(ProxyInfo proxyInfo)
Specified by:
getEJBObject in interface ApplicationServer

getEJBHome

public javax.ejb.EJBHome getEJBHome(ProxyInfo proxyInfo)
Specified by:
getEJBHome in interface ApplicationServer