appl.parallel.services
Class RemoteEventProxy

java.lang.Object
  extended by appl.parallel.services.RemoteEventProxy
All Implemented Interfaces:
CommEventSink, RemoteEventSink, Service, Remote

public class RemoteEventProxy
extends Object
implements CommEventSink, Service

Delays events and fires them after the delay all at once in one object (this will save communication time)

Author:
Dominik Appl

Constructor Summary
RemoteEventProxy(CommEventSink targetSink, long delay)
          Creates a new proxy
 
Method Summary
 void fireRemoteEvent(RemoteEvent e)
           
 void fireRemoteEvents(RemoteEvent[] e)
           
 boolean isRunning()
           
 boolean isTimeMonitoringEnabled()
           
 boolean isTransferMonitoringEnabled()
           
 void startService()
          Starts the service
 void stopService()
          Stops the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteEventProxy

public RemoteEventProxy(CommEventSink targetSink,
                        long delay)
Creates a new proxy

Parameters:
targetSink - the sink where the events should be submitted to
delay - the delay (in milliseconds)
Method Detail

fireRemoteEvent

public void fireRemoteEvent(RemoteEvent e)
                     throws RemoteException
Specified by:
fireRemoteEvent in interface RemoteEventSink
Throws:
RemoteException

fireRemoteEvents

public void fireRemoteEvents(RemoteEvent[] e)
                      throws RemoteException
Specified by:
fireRemoteEvents in interface RemoteEventSink
Throws:
RemoteException

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Service
Returns:
true, if the service is running

isTimeMonitoringEnabled

public boolean isTimeMonitoringEnabled()
                                throws RemoteException
Specified by:
isTimeMonitoringEnabled in interface CommEventSink
Returns:
true if the service is running and time monitoring is enabled
Throws:
RemoteException

isTransferMonitoringEnabled

public boolean isTransferMonitoringEnabled()
                                    throws RemoteException
Specified by:
isTransferMonitoringEnabled in interface CommEventSink
Returns:
true if the service is running and tansfer monitoring is enabled
Throws:
RemoteException

startService

public void startService()
Description copied from interface: Service
Starts the service

Specified by:
startService in interface Service

stopService

public void stopService()
Description copied from interface: Service
Stops the service

Specified by:
stopService in interface Service