java.lang.Object
org.vrspace.server.Dispatcher
org.vrspace.server.ProxyDispatcher
- public class ProxyDispatcher
- extends Dispatcher
This dispatcher only forwards events to/from client/other host.
But it should maintain a scene for all foreign objects, in order to reduce
network trafic and speed up event distribution, also keep local-remote
user mappings etc.
| Fields inherited from class org.vrspace.server.Dispatcher |
clients, daemonSessions, initialized, receivedBytes, receivedChars, receivedRequests, sentBytes, sentChars, sentRequests, server, space, startTime |
| Methods inherited from class org.vrspace.server.Dispatcher |
get, getAuthInfo, getByName, getDB, getRange, getRange, getServer, getTransform, init, put, putTransform, remove, remove, removeTransform |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
connections
protected static java.util.Hashtable connections
remove
public boolean remove
autocommit
public boolean autocommit
ProxyDispatcher
public ProxyDispatcher(Client gate,
Client client)
throws java.lang.Exception
ProxyDispatcher
public ProxyDispatcher(java.lang.String host,
int port,
Client client)
throws java.lang.Exception
checkConnections
private void checkConnections(Client client)
connected
private void connected(Client client,
AuthInfo a)
throws java.lang.Exception
startDB
private void startDB(Client client,
java.lang.String name)
getAuthInfo
private AuthInfo getAuthInfo(Client client,
java.lang.String name)
remove
void remove(ProxyDispatcher.Proxy proxy)
- Return client to previous state
login
public void login(Client c)
throws org.vrspace.util.ConnectionException
- start
forward
protected void forward(Request r)
- Forward Request to the Client
remoteRequest
void remoteRequest(Request r)
throws RequestException
- Process remote request and forward it to the client
request
public void request(Request r)
throws RequestException
- Process request from the client. This forwards request to remote host, changes local client ID to remote ID if necessary
- Overrides:
request in class Dispatcher
login
public Client login(Session session,
java.lang.String login,
java.lang.String password,
boolean daemon)
throws java.lang.Exception
- This should not be called
- Overrides:
login in class Dispatcher
logout
protected void logout(Client c,
Session s)
- Logout Client c from remote host, session is not used
- Overrides:
logout in class Dispatcher
shutdown
protected void shutdown()
- Called from server upon shutdown
- Overrides:
shutdown in class Dispatcher