dermi
Class DermiRemoteObject

java.lang.Object
  extended by dermi.EventServer
      extended by dermi.DermiRemoteObject
All Implemented Interfaces:
RemoteEventListener, java.io.Serializable
Direct Known Subclasses:
ActivatorImpl, DOLRChannelImpl

public abstract class DermiRemoteObject
extends EventServer
implements RemoteEventListener

This class implements the generic skeleton class for any Dermi object

Version:
1.2
Author:
Carles Pairot
See Also:
Serialized Form

Field Summary
protected  java.util.logging.Logger logger
           
 
Fields inherited from class dermi.EventServer
className, classStore, conn, eref, uid
 
Constructor Summary
DermiRemoteObject()
          Local constructor: Entry point to the skeleton class
DermiRemoteObject(java.util.Properties env)
          Constructor: Entry point to the skeleton class
 
Method Summary
 void addListener(java.lang.Class eventClass, BasicListener sL)
           
 java.util.Hashtable anycallEventArrived(java.util.Hashtable evt)
          Method invoked each time the skeleton receives an anycall event
 void close()
          Closes the skeleton
 ERemote copy()
          Returns a stub copy of this class
 void eventArrived(java.util.Hashtable evt)
          Method invoked each time the skeleton receives an event
 void getReplicaState()
          Method for obtaining the object's state from any of the available replicas
 void init()
          Initializes the skeleton
protected  void loadReplicaState()
          This method starts load replica state mechanism
 java.io.Serializable loadState()
          This method is used for a not updated replica in order to obtain the object's state
 void removeListener(java.lang.Class eventClass, BasicListener sL)
           
 void triggerEvent(java.io.Serializable res)
          This method triggers an event (used in listeners)
 
Methods inherited from class dermi.EventServer
dispatchDirectEvent, dispatchDirectEvent, dispatchEvent, dispatchEvent, dispatchEvent, getBytes, getClassStore, getERef, getUID, start, writeERef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected transient java.util.logging.Logger logger
Constructor Detail

DermiRemoteObject

public DermiRemoteObject()
Local constructor: Entry point to the skeleton class


DermiRemoteObject

public DermiRemoteObject(java.util.Properties env)
                  throws RemoteException
Constructor: Entry point to the skeleton class

Parameters:
env - Properties Environment properties
Throws:
RemoteException - When something goes wrong ;-)
Method Detail

loadReplicaState

protected void loadReplicaState()
                         throws RemoteException
This method starts load replica state mechanism

Throws:
RemoteException - If replica state cannot be loaded

getReplicaState

public void getReplicaState()
                     throws RemoteException
Method for obtaining the object's state from any of the available replicas

Throws:
RemoteException

eventArrived

public void eventArrived(java.util.Hashtable evt)
Method invoked each time the skeleton receives an event

Specified by:
eventArrived in interface RemoteEventListener
Parameters:
evt - Hashtable Information about the received event

anycallEventArrived

public java.util.Hashtable anycallEventArrived(java.util.Hashtable evt)
                                        throws UnmatchedAnycallMethodException
Method invoked each time the skeleton receives an anycall event

Specified by:
anycallEventArrived in interface RemoteEventListener
Parameters:
evt - Hashtable Information about the received event
Returns:
Hashtable
Throws:
UnmatchedAnycallMethodException

triggerEvent

public void triggerEvent(java.io.Serializable res)
                  throws RemoteException
This method triggers an event (used in listeners)

Parameters:
res - Serializable The event to trigger
Throws:
RemoteException - If something goes wrong ;-)

loadState

public java.io.Serializable loadState()
                               throws RemoteException
This method is used for a not updated replica in order to obtain the object's state

Throws:
RemoteException

close

public void close()
           throws RemoteException
Closes the skeleton

Throws:
RemoteException - If something goes wrong ;-)

init

public void init()
          throws RemoteException
Initializes the skeleton

Throws:
RemoteException - If something goes wrong ;-)

copy

public ERemote copy()
             throws RemoteException
Returns a stub copy of this class

Returns:
ERemote The returned stub
Throws:
RemoteException - If something goes wrong ;-)

addListener

public void addListener(java.lang.Class eventClass,
                        BasicListener sL)
                 throws RemoteException
Throws:
RemoteException

removeListener

public void removeListener(java.lang.Class eventClass,
                           BasicListener sL)
                    throws RemoteException
Throws:
RemoteException