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
-
EventManagerConnection()
-
-
EventManagerURL(String)
- This method builds a full RMI URL for the Event Manager on the
given host.
-
getEventManagerHost()
- Returns the Event Manager's hostname or an RMI URL to the
Event Manager.
-
makeConnection(boolean)
- This method establishes a connection with the Event Manager on
the same host the caller is currently executing on.
-
makeConnection(String, boolean)
- This method establishes a connection to a potentially
remote Event Manager.
-
postEvent(EventType)
- Post an event to the Event Manager.
-
postEvent(MobileClassWrapper)
- Post an event to the Event Manager.
-
registerAll(EventPost)
- Register interest in receiving all events posted to the EventManager.
-
registerEvents(Class[], EventPost)
-
-
registerEvents(MobileClassWrapper[], EventPost)
- Register interest in receiving specified events.
-
unregisterAll(EventPost)
- Remove registration for all events.
-
unregisterEvents(Class[], EventPost)
- Remove registration for specified events.
-
unregisterEvents(MobileClassWrapper[], EventPost)
- Remove registration for specified events.
-
useProxy()
- Indicates if a proxy is being used.
EventManagerConnection
public EventManagerConnection()
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.
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
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
registerEvents
public void registerEvents(Class eventClass[],
EventPost eventQueue) throws RemoteException, IOException, ServerUnavailableException, SecurityException
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.
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.
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.
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.
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).
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.
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.
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.
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