|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ClientletSelector
Interface implemented in order to handle web responses, typically by checking the content types.
NavigatorExtensionContext.addClientletSelector(ClientletSelector)| Method Summary | |
|---|---|
Clientlet |
lastResortSelect(ClientletRequest request,
ClientletResponse response)
This method is meant for the primary extension to handle content that was not handled by any other extension. |
Clientlet |
select(ClientletRequest request,
ClientletResponse response)
This method is invoked after a URL response has been received by the user agent. |
| Method Detail |
|---|
Clientlet select(ClientletRequest request,
ClientletResponse response)
Clientlet instance that can
handle the given request and response. It must
return null if it does not know how to
handle the response. Generally a selector should only attempt to
handle a specific response MIME type. If the MIME type is missing
or is generic (e.g. application/octet-stream), then the selector should
check the file extension. It is recommended that implementors
use the convenience method,
ClientletResponse.matches(String, String[]), to determine
if they should handle a response.
The select method is invoked on all extensions that have registered
one or more clientlet selectors. Extensions are invoked in descending
order of priority. In a extension returns a non-null clientlet, the
rest of the extensions are not invoked.
Clientlet instance, or null
if the clientlet selector does not know how to handle the response.ClientletResponse.matches(String, String[])
Clientlet lastResortSelect(ClientletRequest request,
ClientletResponse response)
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||