|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public DynamicResolver
This provides a system plugin point where extensions can be registered to provide immediate resolution of IO requests for data that can be retrieved from the client. It allows circumvention of remote requests to serve data that is already available in the system. It also allows an completely extensible URL naming system such that URLs passed to IO requests can take on formats besides typical ones such as http or https. Extension formats and schemes can be handled by custom plugins to allow an arbitrary mapping of resources on the client to URLs that can be serviced through normal IO requests. The service can be retrieved using the following code:
var dynamicResolver = com.ibm.mashups.services.ServiceManager.getService(
com.ibm.mashups.enabler.io.DynamicResolver.SERVICE_NAME);
Field Summary | |
---|---|
String |
SERVICE_NAME
The service name to be used to fetch the service from the ServiceManager |
Method Summary | |
---|---|
void |
register(String id,
Function matcher,
Function resolver,
Boolean first)
Registers a plugin for immediate request resolution. |
void |
unregister(String id)
Unregisters a plugin by its registered id. |
Field Detail |
---|
String SERVICE_NAME
Method Detail |
---|
void register(String id, Function matcher, Function resolver, Boolean first)
id
-
the id of the pluginmatcher
-
the function that returns a validation result to verify if the plugin can resolve the current request. Function format: Function(String url)
.resolver
-
the function that resolves the current request and passes the response data back to the caller. Function format: Function(String url, Anything validationResult)
.first
-
optional argument to specify if this plugin should take precedence over all existing plugins if set to true. If it is false the plugin will take lowest precedence of existing plugins. Default is false.void unregister(String id)
id
-
the id of the plugin to unregister
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |