All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.meitca.concordia.event.EventManagerConnection


java.lang.Object

   |

   +----COM.meitca.concordia.event.EventManagerConnection


public class EventManagerConnection
extends Object
implements Serializable

Constructor Index

 o EventManagerConnection()

Method Index

 o EventManagerURL(String)
This method builds a full RMI URL for the Event Manager on the given host.
 o getEventManagerHost()
Returns the Event Manager's hostname or an RMI URL to the Event Manager.
 o makeConnection(boolean)
This method establishes a connection with the Event Manager on the same host the caller is currently executing on.
 o makeConnection(String, boolean)
This method establishes a connection to a potentially remote Event Manager.
 o postEvent(EventType)
Post an event to the Event Manager.
 o postEvent(MobileClassWrapper)
Post an event to the Event Manager.
 o registerAll(EventPost)
Register interest in receiving all events posted to the EventManager.
 o registerEvents(Class[], EventPost)
 o registerEvents(MobileClassWrapper[], EventPost)
Register interest in receiving specified events.
 o unregisterAll(EventPost)
Remove registration for all events.
 o unregisterEvents(Class[], EventPost)
Remove registration for specified events.
 o unregisterEvents(MobileClassWrapper[], EventPost)
Remove registration for specified events.
 o useProxy()
Indicates if a proxy is being used.

Constructors

 o EventManagerConnection

 public EventManagerConnection()

Methods

 o EventManagerURL

 public static String EventManagerURL(String hostname)

This method builds a full RMI URL for the Event Manager on the given host.

Parameters:
The - name of the Event Manager's host.
 o makeConnection

 public void makeConnection(boolean useProxy) throws NoSuchObjectException, RemoteException

This method establishes a connection with the Event Manager on the same host the caller is currently executing on.

Parameters:
useProxy - This argument specifies if the caller should create a direct connection to the Event Manager or utilize a proxy. The proxy establishes a persistent connection to the Event Manager. So using a proxy shields the caller from Event Manager failures.
Throws: NoSuchObjectException
The Event Manager could not be located.
Throws: RemoteException
if a network error occurs when trying to contact the Event Manager
 o makeConnection

 public void makeConnection(String url,

                            boolean useProxy) throws NoSuchObjectException, RemoteException

This method establishes a connection to a potentially remote Event Manager.

Parameters:
url - A full RMI URL for an Event Manager. This URL can be constructed via the static EventManagerURL method.

useProxy - This argument specifies if the caller should create a direct connection to the Event Manager or utilize a proxy. The proxy establishes a persistent connection to the Event Manager. So using a proxy shields the caller from Event Manager failures.
Throws: NoSuchObjectException
The Event Manager could not be located.
Throws: RemoteException
if a network error occurs when trying to contact the Event Manager
 o registerEvents

 public void registerEvents(Class eventClass[],

                            EventPost eventQueue) throws RemoteException, IOException, ServerUnavailableException, SecurityException

 o registerEvents

 public void registerEvents(MobileClassWrapper eventWrappers[],

                            EventPost eventQueue) throws RemoteException, IOException, ServerUnavailableException, SecurityException

Register interest in receiving specified events.

Parameters:
eventWrappers - An array of wrapped Class objects describing the events that an object is interested in receiving.

eventQueue - The receiver's EventPost implementation (i.e., either an EventNotifyImpl or an EventQueueImpl object or stub).
Throws: RemoteException
If the Event Manager cannot be contacted.
Throws: ServerUnavailableException
If the Event Manager is down or suspended.
Throws: SecurityException
If the Event.Register permission is denied for the default user.
 o registerAll

 public void registerAll(EventPost eventQueue) throws RemoteException, IOException, ServerUnavailableException, SecurityException

Register interest in receiving all events posted to the EventManager.

Parameters:
eventQueue - The receiver's EventPost implementation (i.e., either an EventNotifyImpl or an EventQueueImpl object or stub).
Throws: RemoteException
If an error occurrs setting up network connections.
Throws: ServerUnavailableException
If the Event Manager is down or suspended.
Throws: SecurityException
If the Event.Register permission or the Event.RegisterAll permission is denied for the default user.
 o unregisterEvents

 public void unregisterEvents(Class eventClass[],

                              EventPost eventQueue) throws RemoteException, IOException, ServerUnavailableException, EventManagerException

Remove registration for specified events.

Parameters:
eventClass - An array of Class objects describing the events that an object is no longer interested in receiving.

eventQueue - The receiver's EventPost implementation (i.e., either an EventNotifyImpl or an EventQueueImpl object or stub).
Throws: ServerUnavailableException
If the Event Manager is down or suspended.
Throws: RemoteException
If an error occurrs setting up network connections.
Throws: EventManagerException
If the caller is not registered for one or more of the specified exceptions.
 o unregisterEvents

 public void unregisterEvents(MobileClassWrapper eventWrappers[],

                              EventPost eventQueue) throws RemoteException, IOException, ServerUnavailableException, EventManagerException

Remove registration for specified events.

Parameters:
eventWrappers - An array of wrapped Class objects describing the events that an object is no longer interested in receiving.

eventQueue - The receiver's EventPost implementation (i.e., either an EventNotifyImpl or an EventQueueImpl object or stub).
Throws: ServerUnavailableException
If the Event Manager is down or suspended.
Throws: RemoteException
If an error occurrs setting up network connections.
Throws: EventManagerException
If the caller is not registered for one or more of the specified exceptions.
 o unregisterAll

 public void unregisterAll(EventPost eventQueue)

Remove registration for all events.

Parameters:
eventQueue - The receiver's EventPost implementation (i.e., either an EventNotifyImpl or an EventQueueImpl object or stub).
 o postEvent

 public void postEvent(EventType event) throws RemoteException, IOException, EventException, ServerUnavailableException, SecurityException

Post an event to the Event Manager.

Parameters:
event - The event to post.
Throws: RemoteException
If an error occurrs setting up network connections.
Throws: EventException
If an error occurs posting the event.
Throws: ServerUnavailableException
If the Event Manager is down or suspended.
Throws: SecurityException
If the Event.Post resource permission is denied for the default user.
 o postEvent

 public void postEvent(MobileClassWrapper eventWrapper) throws RemoteException, IOException, EventException, ServerUnavailableException, SecurityException

Post an event to the Event Manager.

Parameters:
eventWrapper - A wrapper for the event to post.
Throws: RemoteException
If an error occurrs setting up network connections.
Throws: EventException
If an error occurs posting the event.
Throws: ServerUnavailableException
If the Event Manager is down or suspended.
Throws: SecurityException
If the Event.Post resource permission is denied for the default user.
 o getEventManagerHost

 public final String getEventManagerHost()

Returns the Event Manager's hostname or an RMI URL to the Event Manager.

Returns:
a String containing the Event Manager's hostname or an RMI URL to the Event Manager.
 o useProxy

 public boolean useProxy()

Indicates if a proxy is being used.

Returns:
A boolean that indicates if a proxy is being used to communicate with the Event Manager.


All Packages  Class Hierarchy  This Package  Previous  Next  Index