All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.tools.resources.ResourceFrame

java.lang.Object
   |
   +----org.w3c.tools.resources.AttributeHolder
           |
           +----org.w3c.tools.resources.Resource
                   |
                   +----org.w3c.tools.resources.FramedResource
                           |
                           +----org.w3c.tools.resources.ResourceFrame

public class ResourceFrame
extends FramedResource
implements AttributeChangedListener
The resource frame class. A ResourceFrame can be attached to a resource.


Variable Index

 o filterClass
The special class of filter.
 o frameListener
Our FrameEventListener.
 o resource
Our target resource.

Constructor Index

 o ResourceFrame()

Method Index

 o addFrameEventListener(FrameEventListener)
Add a frame event listener.
 o attributeChanged(AttributeChangedEvent)
Listen its resource.
 o checkRequest(RequestInterface)
Check if this kind of request can be perform by this resource.
 o fireFrameEvent(FrameEvent)
Fire a frameEvent.
 o frameModified(FrameEvent)
This handles the FRAME_MODIFIED kind of events.
 o getFilters()
Get our whole list of filters.
 o getFilters(Class)
Get the list of filters of this class.
 o getFrameReference()
Get The FrameReference of this frame, or null if this frame is not registered.
 o getResource()
Get the target resource.
 o getResourceReference()
Get the ResourceReference of that resource.
 o getSpaceEntry()
Get the space entry for that resource.
 o getURLPath()
Get the file part of the URL this resource is attached to.
 o lookup(LookupState, LookupResult)
Lookup the target resource.
 o lookupFilters(LookupState, LookupResult)
lookup only filters.
 o lookupFrames(LookupState, LookupResult)
lookup frames excluding filters.
 o perform(RequestInterface)
Perform the request
 o postFrameEvent(int)
Post a frameEvent.
 o processEvent(ResourceEvent)
(AWT Like), dspatch the Event to all our listeners.
 o registerResource(FramedResource)
Register a target resource.
 o removeFrameEventListener(FrameEventListener)
Remove a frame event listener.
 o setValue(int, Object)
We overide setValue, to fire event.
 o unregisterResource(Resource)
Register a target resource.
 o updateDefaultChildAttributes(Hashtable)
If our target resource has some children, we could have some attribute to give to them.

Variables

 o filterClass
 protected static Class filterClass
The special class of filter.

 o frameListener
 protected transient FrameEventListener frameListener
Our FrameEventListener.

 o resource
 protected FramedResource resource
Our target resource.

Constructors

 o ResourceFrame
 public ResourceFrame()

Methods

 o getURLPath
 public String getURLPath()
Get the file part of the URL this resource is attached to.

Returns:
An URL object specifying the location in the information space of this resource.
Overrides:
getURLPath in class Resource
 o getSpaceEntry
 protected SpaceEntry getSpaceEntry()
Get the space entry for that resource. This Object is use to retrieve the resource in the resource space. A ResourceFrame has no SpaceEntry.

Returns:
always null.
Overrides:
getSpaceEntry in class Resource
 o getFrameReference
 public ResourceReference getFrameReference()
Get The FrameReference of this frame, or null if this frame is not registered.

Returns:
A ResourceReference instance.
 o getResourceReference
 public ResourceReference getResourceReference()
Get the ResourceReference of that resource.

Overrides:
getResourceReference in class Resource
 o updateDefaultChildAttributes
 protected void updateDefaultChildAttributes(Hashtable attrs)
If our target resource has some children, we could have some attribute to give to them.

Parameters:
attrs - A Hashtable.
 o checkRequest
 public boolean checkRequest(RequestInterface request)
Check if this kind of request can be perform by this resource.

Parameters:
request - A RequestInterface instance
Returns:
a boolean.
 o perform
 public ReplyInterface perform(RequestInterface request) throws ProtocolException, ResourceException
Perform the request

Parameters:
request - the incomming request
Throws: ProtocolException
If an error relative to the protocol occurs
Throws: ResourceException
If an error not relative to the protocol occurs
Overrides:
perform in class FramedResource
 o lookupFilters
 protected boolean lookupFilters(LookupState ls,
                                 LookupResult lr) throws ProtocolException
lookup only filters.

Throws: ProtocolException
If an error relative to the protocol occurs
 o lookupFrames
 protected boolean lookupFrames(LookupState ls,
                                LookupResult lr) throws ProtocolException
lookup frames excluding filters.

Throws: ProtocolException
If an error relative to the protocol occurs
 o lookup
 public boolean lookup(LookupState ls,
                       LookupResult lr) throws ProtocolException
Lookup the target resource.

Parameters:
ls - The current lookup state
lr - The result
Throws: ProtocolException
If an error relative to the protocol occurs
Overrides:
lookup in class FramedResource
 o processEvent
 public void processEvent(ResourceEvent evt)
(AWT Like), dspatch the Event to all our listeners.

Overrides:
processEvent in class FramedResource
 o addFrameEventListener
 public void addFrameEventListener(FrameEventListener l)
Add a frame event listener.

Parameters:
l - The new frame event listener.
 o removeFrameEventListener
 public void removeFrameEventListener(FrameEventListener l)
Remove a frame event listener.

Parameters:
l - The listener to remove.
 o postFrameEvent
 protected void postFrameEvent(int type)
Post a frameEvent.

Parameters:
the - frame event type.
 o fireFrameEvent
 protected void fireFrameEvent(FrameEvent evt)
Fire a frameEvent.

Parameters:
the - frame event type.
 o attributeChanged
 public void attributeChanged(AttributeChangedEvent evt)
Listen its resource.

 o frameModified
 public void frameModified(FrameEvent evt)
This handles the FRAME_MODIFIED kind of events.

Parameters:
evt - The event describing the change.
Overrides:
frameModified in class FramedResource
 o setValue
 public synchronized void setValue(int idx,
                                   Object value)
We overide setValue, to fire event.

Parameters:
idx - The index of the attribute to modify.
value - The new attribute value.
Overrides:
setValue in class FramedResource
 o getResource
 public FramedResource getResource()
Get the target resource.

Returns:
a resource instance.
 o registerResource
 public void registerResource(FramedResource resource)
Register a target resource. Called after initialize, set the context. getServer() can be call only after this method call.

Parameters:
e - resource The resource to register.
 o unregisterResource
 public void unregisterResource(Resource resource)
Register a target resource.

Parameters:
e - resource The resource to register.
 o getFilters
 public synchronized ResourceFilter[] getFilters()
Get our whole list of filters.

 o getFilters
 public synchronized ResourceFilter[] getFilters(Class cls)
Get the list of filters of this class.

Parameters:
cls - The class of filters requested.
Returns:
An array of filters, which are instances of the given class.

All Packages  Class Hierarchy  This Package  Previous  Next  Index