org.apache.commons.jnet
Class ParentAwareURLStreamHandlerFactory

java.lang.Object
  extended by org.apache.commons.jnet.ParentAwareURLStreamHandlerFactory
All Implemented Interfaces:
URLStreamHandlerFactory
Direct Known Subclasses:
DynamicURLStreamHandlerFactory, URLStreamHandlerFactoryWrapper

public abstract class ParentAwareURLStreamHandlerFactory
extends Object
implements URLStreamHandlerFactory

A parent aware url stream handler factory delegates to a parent url stream handler factory,


Field Summary
protected  URLStreamHandlerFactory parentFactory
           
 
Constructor Summary
ParentAwareURLStreamHandlerFactory()
           
 
Method Summary
protected abstract  URLStreamHandler create(String protocol)
          This method can be overwritten by subclasses to instantiate url stream handlers for the given protocol.
 URLStreamHandler createURLStreamHandler(String protocol)
           
 URLStreamHandlerFactory getParent()
          Return the parent factory.
 void setParentFactory(URLStreamHandlerFactory factory)
          Set the parent factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentFactory

protected URLStreamHandlerFactory parentFactory
Constructor Detail

ParentAwareURLStreamHandlerFactory

public ParentAwareURLStreamHandlerFactory()
Method Detail

setParentFactory

public void setParentFactory(URLStreamHandlerFactory factory)
Set the parent factory.

Parameters:
factory -

getParent

public URLStreamHandlerFactory getParent()
Return the parent factory.

Returns:
The parent factory.

createURLStreamHandler

public URLStreamHandler createURLStreamHandler(String protocol)
Specified by:
createURLStreamHandler in interface URLStreamHandlerFactory
See Also:
URLStreamHandlerFactory.createURLStreamHandler(java.lang.String)

create

protected abstract URLStreamHandler create(String protocol)
This method can be overwritten by subclasses to instantiate url stream handlers for the given protocol.

Parameters:
protocol - The protocol.
Returns:
A url stream handler for the protocol or null.


Copyright © 2007-2008 The Apache Software Foundation. All Rights Reserved.