dermi
Class EventServer

java.lang.Object
  extended by dermi.EventServer
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DermiProxy, DermiRemoteInterceptorObject, DermiRemoteObject

public class EventServer
extends java.lang.Object
implements java.io.Serializable

This is an utility class for skeletons and stubs (both inherit from EventServer). It handles event service connections, disconnections, event dispatching, exception wrapping, and stub class requests. It is internally used by Dermi, so IT IS NOT AIMED FOR END USERS.

Version:
1.2
Author:
Carles Pairot , Pedro Garcia
See Also:
Serialized Form

Field Summary
protected  java.lang.String className
           
protected  java.lang.String classStore
           
protected  Session conn
           
protected  java.util.Properties eref
           
protected  java.lang.String uid
           
 
Constructor Summary
EventServer()
           
EventServer(java.util.Properties env)
          EventServer constructor
 
Method Summary
 void dispatchDirectEvent(java.util.Hashtable evt)
          Dispatches an event directly without using the event service
 void dispatchDirectEvent(java.util.Hashtable evt, java.io.Serializable params)
          Dispatches an event directly without using the event service
 void dispatchEvent(java.util.Hashtable evt)
          Dispatches an event whose main content is embedded on a hash table
 void dispatchEvent(java.util.Hashtable evt, byte[] data)
          Dispatches an event whose main content is a byte array
 void dispatchEvent(java.util.Hashtable evt, java.io.Serializable data)
          Dispatches an event whose main content is a serializable object
 byte[] getBytes(java.lang.String filename)
          Gets an array of bytes from a file
 java.lang.String getClassStore()
          This method returns the class store
 java.util.Properties getERef()
          Returns the object's reference
 java.lang.String getUID()
          Return object's unique identifier
protected  void start(java.util.Properties env)
           
 void writeERef(java.lang.String fileName)
          Writes this object's reference to a properties file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uid

protected java.lang.String uid

classStore

protected java.lang.String classStore

className

protected java.lang.String className

eref

protected java.util.Properties eref

conn

protected transient Session conn
Constructor Detail

EventServer

public EventServer()

EventServer

public EventServer(java.util.Properties env)
            throws RemoteException
EventServer constructor

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

start

protected void start(java.util.Properties env)
              throws RemoteException
Throws:
RemoteException

dispatchEvent

public void dispatchEvent(java.util.Hashtable evt,
                          byte[] data)
                   throws RemoteException
Dispatches an event whose main content is a byte array

Parameters:
evt - Hashtable Event data
data - byte[] Byte array
Throws:
RemoteException - If something goes wrong ;-)

dispatchEvent

public void dispatchEvent(java.util.Hashtable evt,
                          java.io.Serializable data)
                   throws RemoteException
Dispatches an event whose main content is a serializable object

Parameters:
evt - Hashtable Event data
data - Serializable Object
Throws:
RemoteException - If something goes wrong ;-)

dispatchEvent

public void dispatchEvent(java.util.Hashtable evt)
                   throws RemoteException
Dispatches an event whose main content is embedded on a hash table

Parameters:
evt - Hashtable Event data
Throws:
RemoteException - If something goes wrong ;-)

dispatchDirectEvent

public void dispatchDirectEvent(java.util.Hashtable evt,
                                java.io.Serializable params)
                         throws RemoteException
Dispatches an event directly without using the event service

Parameters:
evt - Hashtable Event data
params - Serializable Object
Throws:
RemoteException - If something goes wrong ;-)

dispatchDirectEvent

public void dispatchDirectEvent(java.util.Hashtable evt)
                         throws RemoteException
Dispatches an event directly without using the event service

Parameters:
evt - Hashtable Event data
Throws:
RemoteException - If something goes wrong ;-)

getUID

public java.lang.String getUID()
Return object's unique identifier

Returns:
String UID

writeERef

public void writeERef(java.lang.String fileName)
Writes this object's reference to a properties file

Parameters:
fileName - String Properties file name

getERef

public java.util.Properties getERef()
Returns the object's reference

Returns:
Properties Object's properties

getBytes

public byte[] getBytes(java.lang.String filename)
                throws java.io.IOException
Gets an array of bytes from a file

Parameters:
filename - String File name
Returns:
byte[] Byte array representing the file
Throws:
java.io.IOException - If something goes wrong ;-)

getClassStore

public java.lang.String getClassStore()
This method returns the class store

Returns:
String