|
Oxygen XML Editor, Version 13.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TargetedURLStreamHandlerPluginExtension
Usually oXygen has specific fixed URL stream handlers for http and https protocols.
This URL stream handler plugin extension provides the possibility to impose
custom stream handlers for specific URLs.
If the plugin decides that it could handle connections for a particular protocol
(canHandleProtocol(String)
), it will be asked to provide the handler
for each opened connection of an URL having that protocol(getURLStreamHandler(URL)
).
This extension can be useful in situations when opened connections from a
specific host must be handled in a particular way.
For example, the Oxygen HTTP URLStreamHandler may not be compatible for sending
and receiving SOAP using the SUN Webservices implementation.
In this case you can override the stream handler set by Oxygen for HTTP to
use the default SUN URLStreamHandler which is more compatible with sending
and receiving SOAP requests.
This extension can handle the following protocols: http
, https
,
ftp
or sftp
.
If it is necessary to impose the application stream URL handlers for
protocols different than the one handled by the application, the
URLStreamHandlerPluginExtension
can be used.
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
Field Summary |
---|
Fields inherited from interface ro.sync.exml.plugin.urlstreamhandler.URLStreamHandlerPluginExtensionConstants |
---|
ADVICE_CLOSE, ADVICE_RELOAD, LOCATION_HEADER, OXYGEN_ACTION_HEADER |
Method Summary | |
---|---|
boolean |
canHandleProtocol(java.lang.String protocol)
Check if the plugin can handle a specific protocol. |
java.net.URLStreamHandler |
getURLStreamHandler(java.net.URL url)
Get the URL handler for the specified URL. |
Method Detail |
---|
boolean canHandleProtocol(java.lang.String protocol)
true
for a specific protocol,
the getURLStreamHandler(URL)
method will be called for each opened
connection of an URL having this protocol.
http
, https
,
ftp
, sftp
.
protocol
- The protocol.
true
if this plugin extension can handle this protocol type.java.net.URLStreamHandler getURLStreamHandler(java.net.URL url)
canHandleProtocol(String)
method returns true
.
If this method returns null
, the Oxygen URLStreamHandler
is used.
url
- The URL to provide a handler for.
|
Oxygen XML Editor, Version 13.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |