com.javageeks.gjas.services
Class RemoteObjectFactoryService

java.lang.Object
  |
  +--com.javageeks.gjas.services.ThreadedServer
        |
        +--com.javageeks.gjas.services.SocketServer
              |
              +--com.javageeks.gjas.services.RemoteObjectFactoryService
All Implemented Interfaces:
java.io.Serializable, Service

public class RemoteObjectFactoryService
extends SocketServer

RemoteObjectFactoryService

See Also:
Serialized Form

Fields inherited from class com.javageeks.gjas.services.SocketServer
m_serverSocket, PORT_PROP, TIMEOUT_PROP
 
Fields inherited from class com.javageeks.gjas.services.ThreadedServer
m_paused, m_shouldStop
 
Fields inherited from interface com.javageeks.gjas.Service
PAUSED, PAUSING, RESUMING, RUNNING, STARTING, STOPPED, STOPPING
 
Constructor Summary
RemoteObjectFactoryService()
           
 
Method Summary
 void serve(java.net.Socket socket)
          serve() takes a client request, sent via Serialization, and extracts the class name, the constructor, and the array of args to pass to the constructor, and proceeds to attempt to construct an instance of that type.
 
Methods inherited from class com.javageeks.gjas.services.SocketServer
getConfigInfo, getPort, setConfigInfo, setPort, start, stop
 
Methods inherited from class com.javageeks.gjas.services.ThreadedServer
getInstanceID, getState, getThread, isPaused, kill, pause, resume, setRunnable, setState, setThread, shouldStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteObjectFactoryService

public RemoteObjectFactoryService()
Method Detail

serve

public void serve(java.net.Socket socket)
           throws java.lang.Exception
serve() takes a client request, sent via Serialization, and extracts the class name, the constructor, and the array of args to pass to the constructor, and proceeds to attempt to construct an instance of that type. This means that both the Service and the client must have the bytecode of the exact Class returned available on the JVM's CLASSPATH, or ClassNotFoundExceptions will result. (Note that the client doesn't need to know exactly what type it's getting back, it only needs to have it available via the client's ClassLoader--a SocketClassLoader would effectively make the entire mechanism load-on-the-fly.)
Overrides:
serve in class SocketServer