javax.infobus
Class InfoBusDataConsumerProxy
java.lang.Object
|
+--javax.infobus.InfoBusDataConsumerProxy
- public class InfoBusDataConsumerProxy
- extends java.lang.Object
- implements InfoBusDataConsumer
This proxy class serves as an event listener on behalf
of a parent class that creates the Object. The proxy simply
delegates the events it receives to the parent for all handling.
The purpose for the proxy class is to protect the parent class
from malicious components on the bus.
Events and data items each return a reference to the event
listener of the InfoBus component that created them for identification
purposes. If the event listener were registered as the same class
as the member, the receiver of an event could introspect the member
class and, for example, force the source of the event off the bus by
calling setInfoBus(null). The proxy has nothing interesting that
could be used to disrupt the application, and using it to handle events
isolates the parent class from such disruptions.
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
InfoBusDataConsumerProxy
public InfoBusDataConsumerProxy(InfoBusDataConsumer parent)
- The constructor is called by the Consumer to create an
InfoBusDataConsumerProxy.
- Parameters:
parent
- is a reference to the
Object that will handle InfoBusItemAvailableEvents,
InfoBusItemRevokedEvents, and PropertyChangeEvents received by the
consumer proxy listener.
dataItemAvailable
public void dataItemAvailable(InfoBusItemAvailableEvent iae)
- This method simply delegates the handling of the event to
its parent class.
- Specified by:
- dataItemAvailable in interface InfoBusDataConsumer
- Parameters:
iae
- the InfoBusItemAvailableEvent to be passed.
dataItemRevoked
public void dataItemRevoked(InfoBusItemRevokedEvent ire)
- This method simply delegates the handling of the event to
its parent class.
- Specified by:
- dataItemRevoked in interface InfoBusDataConsumer
- Parameters:
ire
- the InfoBusItemRequestedEvent to be passed.
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent pce)
- This method simply delegates the handling of the event to
its parent class.
- Parameters:
pce
- the PropertyChangeEvent to be passed.