All Packages Class Hierarchy This Package Previous Next Index
If you want to be notified when a resource is made available by the Broker, you can implement this interface and register. If you just want to have the Broker fill your orders, you don't need to implement this--you only need this if you want to be spontaneously notified when something happens.
Note that many consumers may be accessing a ResourceEvent at the same time you are. Ensure (in conjunction with the ResourceProvider) that all operations involving resources are thread safe.
public abstract void resourceAvailable(ResourceEvent availableResource)
Thread Policy: The event you have been passed may be revoked at any time; it may already have been revoked by the time you look at it. But it was available at the time you were called, which implies that calls to get its value will never block (though if it has been revoked, may return null.). You MAY call the broker, and you MAY lock this or other ResourceEvents, providing you obey the thread policies of those classes.
Note that other consumers may already be accessing the resource, or may start accessing it while you are.
All Packages Class Hierarchy This Package Previous Next Index