|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--com.ibm.retail.AEF.util.AEFRemoteObject | +--com.ibm.retail.AEF.client.AEFEventListenerProxy
The AEFEventListenerProxy class provides a base class for the client listener proxy objects used to monitor the events of an associated terminal session.
Remote proxy objects extend the appropriate RMI server classes which handle the RMI duties for the client (so the client does not need to deal with rmi server issues). The proxy objects also perform the role of event dispatching.
By default, the listener proxy object will perform event queuing on an AEF event thread. This relieves the client of any "thread swapping" responsibilities and insures that the AEF event dispatching performance is not affected by client processing. To override this default behavior, use the setDispatchQueue() method. The proxy utilizes the EventDispatcher for queueing event listener notification.
To further ensure that the AEF event dispatching thread is not blocked by non-responsive clients, proxies use a default RMI timeout value as specified in config.properties. This value may be overridden using a timeout value on the proxy constructor.
To use a proxy object, the client must implement the listener interface and get the POSDataProvider object from the AEFSession to monitor. The proxy object is then constructed passing a reference to the client and the data provider. The proxy object performs the listener registration and forwards all events from the data provider to the client.
EventDispatcher
,
Serialized FormField Summary | |
---|---|
protected java.lang.String |
dispatchQueueName
|
static int |
SOCKET_CONNECT_TIMEOUT
|
static int |
SOCKET_READ_TIMEOUT
|
Fields inherited from class com.ibm.retail.AEF.util.AEFRemoteObject |
---|
DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT |
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
AEFEventListenerProxy()
Construct an AEFEventListenerProxy |
|
AEFEventListenerProxy(int soTimeout,
int connectTimeout)
Construct an AEFEventListenerProxy. |
Method Summary | |
---|---|
(package private) static java.lang.String |
copyright()
|
void |
dispatchEvent(java.lang.Object evt,
java.lang.Object listener,
java.lang.reflect.Method listenerMethod)
Dispatch an event. |
java.lang.String |
getDispatchQueueName()
Get the dispatch queue name |
protected static java.lang.reflect.Method |
getListenerMethod(java.lang.Class eventClass,
java.lang.Class listenerClass,
java.lang.String methodName)
Determine a listener method |
void |
setDispatchQueueName(java.lang.String queue)
Set the dispatch queue name. |
Methods inherited from class com.ibm.retail.AEF.util.AEFRemoteObject |
---|
getClientSocketConnectTimeout, getClientSocketReadTimeout |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int SOCKET_READ_TIMEOUT
public static int SOCKET_CONNECT_TIMEOUT
protected java.lang.String dispatchQueueName
Constructor Detail |
public AEFEventListenerProxy() throws java.rmi.RemoteException
public AEFEventListenerProxy(int soTimeout, int connectTimeout) throws java.rmi.RemoteException
Method Detail |
static java.lang.String copyright()
public java.lang.String getDispatchQueueName()
AEF_QUEUE
,
AWT_QUEUE
,
NO_QUEUE
public void setDispatchQueueName(java.lang.String queue)
queue
- the dispatch queue name identifierAEF_QUEUE
,
AWT_QUEUE
,
NO_QUEUE
public void dispatchEvent(java.lang.Object evt, java.lang.Object listener, java.lang.reflect.Method listenerMethod)
evt
- the event object to be dispatchedlistener
- the listener object to receive the eventlistenerMethod
- the listener method to be invoked for notificationprotected static java.lang.reflect.Method getListenerMethod(java.lang.Class eventClass, java.lang.Class listenerClass, java.lang.String methodName)
eventClass
- the event classlistenerClass
- the listener classmethodName
- the listener method name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |