com.mindoo.remote.api.ipc
Class IPCConnectionRegistry

java.lang.Object
  extended by com.mindoo.remote.api.ipc.IPCConnectionRegistry

public abstract class IPCConnectionRegistry
extends java.lang.Object

Framework class, for internal purpose only


Nested Class Summary
static class IPCConnectionRegistry.IPCConnectionInfo
          Container for connection metadata
 
Constructor Summary
IPCConnectionRegistry()
           
 
Method Summary
 ThinBridgeObjectCache getCache(java.lang.String connId)
           
 IPCConnectionRegistry.IPCConnectionInfo getConnectionInfo(java.lang.String connId)
          Method to get a connection info object for a connection id
protected abstract  IRemoteEclipseConnectionManager getEclipseConnectionManager()
           
 java.util.List<java.lang.String> getOpenConnectionIds()
           
 void markConnectionActive(java.lang.String connId)
          Use this method to update the last active date of a connection to prevent it from being auto disposed
 void purgeConnections(long maxAge)
          Method to automatically purge all open connections that are older than the specified number of seconds
 IPCConnectionRegistry.IPCConnectionInfo registerConnection(IPCRemoteAPIConnectionDispatcher handler, java.lang.String connId)
           
 void unregisterConnection(java.lang.String connId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IPCConnectionRegistry

public IPCConnectionRegistry()
Method Detail

getCache

public ThinBridgeObjectCache getCache(java.lang.String connId)
                               throws RemoteEclipseAPIException
Throws:
RemoteEclipseAPIException

unregisterConnection

public void unregisterConnection(java.lang.String connId)
                          throws RemoteEclipseAPIException
Throws:
RemoteEclipseAPIException

getEclipseConnectionManager

protected abstract IRemoteEclipseConnectionManager getEclipseConnectionManager()

registerConnection

public IPCConnectionRegistry.IPCConnectionInfo registerConnection(IPCRemoteAPIConnectionDispatcher handler,
                                                                  java.lang.String connId)
                                                           throws java.lang.Exception
Throws:
java.lang.Exception

purgeConnections

public void purgeConnections(long maxAge)
                      throws RemoteEclipseAPIException
Method to automatically purge all open connections that are older than the specified number of seconds

Parameters:
maxAge - max age in seconds
Throws:
RemoteEclipseAPIException

getOpenConnectionIds

public java.util.List<java.lang.String> getOpenConnectionIds()
                                                      throws RemoteEclipseAPIException
Throws:
RemoteEclipseAPIException

markConnectionActive

public void markConnectionActive(java.lang.String connId)
                          throws RemoteEclipseAPIException
Use this method to update the last active date of a connection to prevent it from being auto disposed

Parameters:
connId - connection id
Throws:
RemoteEclipseAPIException

getConnectionInfo

public IPCConnectionRegistry.IPCConnectionInfo getConnectionInfo(java.lang.String connId)
                                                          throws RemoteEclipseAPIException
Method to get a connection info object for a connection id

Parameters:
connId - connection id
Returns:
connection into
Throws:
RemoteEclipseAPIException - if the connection does not exist or has been disposed