|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.geronimo.system.url.GeronimoURLFactory
This service replaces the URLStreamHandlerFactory used in URL, which gives Geronimo complete control over the URLs creted in the server. This allows us to replace the broken implementation of the "file" protocol.
Field Summary | |
static org.apache.geronimo.gbean.GBeanInfo |
GBEAN_INFO
|
Constructor Summary | |
GeronimoURLFactory()
|
Method Summary | |
void |
doFail()
|
void |
doStart()
|
void |
doStop()
|
static void |
forceInstall()
Installs the factory into directly URL's private and package protected fields using Field.setAccessable(true). |
static org.apache.geronimo.gbean.GBeanInfo |
getGBeanInfo()
|
URLStreamHandler |
getRegisteredHandler(String protocol)
Gets the handler registered for the specified protocol |
Map |
getRegisteredHandlers()
Gets a map of all registered handlers keyed by protocol name. |
static void |
install()
Installs the factory into URL using the setURLStreamHandlerFactory method. |
static boolean |
isInstalled()
Is our factory installed? |
void |
registerHandler(String protocol,
URLStreamHandler handler)
Assigns the handler to the specified protocol. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail |
public GeronimoURLFactory()
Method Detail |
public void doStart() throws org.apache.geronimo.gbean.WaitingException, Exception
doStart
in interface org.apache.geronimo.gbean.GBeanLifecycle
org.apache.geronimo.gbean.WaitingException
Exception
public void doStop() throws org.apache.geronimo.gbean.WaitingException, Exception
doStop
in interface org.apache.geronimo.gbean.GBeanLifecycle
org.apache.geronimo.gbean.WaitingException
Exception
public void doFail()
doFail
in interface org.apache.geronimo.gbean.GBeanLifecycle
public void registerHandler(String protocol, URLStreamHandler handler)
protocol
- the prototcol namehandler
- the url handler for the protocol
IllegalStateException
- if a handler is alreayd assigned to the protocolpublic URLStreamHandler getRegisteredHandler(String protocol)
protocol
- the protocol name
public Map getRegisteredHandlers()
public static boolean isInstalled()
public static void install() throws Error, SecurityException
Error
- if the application has already set a factory
SecurityException
- if a security manager exists and its checkSetFactory method doesn't allow the operationpublic static void forceInstall() throws Error, SecurityException
Error
- if the application has already set a factory
SecurityException
- if a security manager exists and its checkSetFactory method doesn't allow the operationpublic static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |