|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IResourcePublisher
The IResourcePublisher interface provides for subscribing and
publishing resource subscription events.
The remote resource model uses publish/subscribe mechanism to synchronize
physical model layer's changes to anything that references physical objects.
Each resource object that wants to participate in the publish/subscribe
mechanism should return an object implementing this interface through the
getResourcePublisher method.
You can subscribe to events for the resource using the resource publisher. The resource publisher can also be used to publish resource subscription events to all the subscribers.
IPhysicalResource.getResourcePublisher()| Field Summary | |
|---|---|
static String |
COPY_RIGHT
|
| Method Summary | |
|---|---|
List |
getSubscriptions()
Returns a list of all subscriptions attached to this resource publisher. |
void |
publish(IResourceSubscriptionEvent event)
Notifies all subscribers that an event pertaining to this publisher occurred. |
void |
subscribe(IResourceSubscription subscription)
Attaches a new subscription to this resource publisher. |
void |
unsubscribe(Object subscriber)
Detaches the subscription associated with the subscriber from this publisher. |
| Field Detail |
|---|
static final String COPY_RIGHT
| Method Detail |
|---|
void subscribe(IResourceSubscription subscription)
subscription - the subscription to be added for this resource
publishervoid unsubscribe(Object subscriber)
subscriber - the subscriber associated with the subscription
to be detached from this resource publisher.
If no subscription is associated with the specified
subscriber, do nothing.void publish(IResourceSubscriptionEvent event)
IResourceSubscription,
IResourceSubscription.notifySubscriber(IResourceSubscriptionEvent)
method is called for each subscription.
event - the event to publish to all the subscribersList getSubscriptions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||