|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdaptorContext
Methods for an Adaptor to communicate with the adaptor library. Implementations of this class must be thread-safe.
Method Summary | |
---|---|
void |
addStatusSource(StatusSource source)
Add a status source to the dashboard. |
HttpContext |
createHttpContext(String path,
HttpHandler handler)
Registers a handler with the library's HttpServer in similar fashion to HttpServer.createContext(java.lang.String, com.sun.net.httpserver.HttpHandler) . |
AsyncDocIdPusher |
getAsyncDocIdPusher()
Callback object for asynchronously pushing DocId s to the GSA
at any time. |
Config |
getConfig()
Configuration instance for the adaptor and all things within the adaptor library. |
DocIdEncoder |
getDocIdEncoder()
A way to construct URIs from DocIds. |
DocIdPusher |
getDocIdPusher()
Callback object for pushing DocId s to the GSA at any time. |
ExceptionHandler |
getGetDocIdsFullErrorHandler()
Retrieve the current ExceptionHandler for full push. |
ExceptionHandler |
getGetDocIdsIncrementalErrorHandler()
Retrieve the current ExceptionHandler for incremental push. |
SensitiveValueDecoder |
getSensitiveValueDecoder()
Retrieve decoder for sensitive values, like passwords. |
Session |
getUserSession(HttpExchange ex,
boolean create)
Get the session for the user communicating via ex . |
void |
setAuthnAuthority(AuthnAuthority authnAuthority)
Register an authentication provider, so it can authenticate users for the GSA. |
void |
setAuthzAuthority(AuthzAuthority authzAuthority)
Register an authorization provider, so it can check authorization of users for the GSA. |
void |
setGetDocIdsFullErrorHandler(ExceptionHandler handler)
Override the default ExceptionHandler for full push. |
void |
setGetDocIdsIncrementalErrorHandler(ExceptionHandler handler)
Override the default ExceptionHandler for incremental push. |
void |
setPollingIncrementalLister(PollingIncrementalLister lister)
Register a polling incremental lister, so that it can be called when appropriate. |
Method Detail |
---|
Config getConfig()
DocIdPusher getDocIdPusher()
DocId
s to the GSA at any time.
AsyncDocIdPusher getAsyncDocIdPusher()
DocId
s to the GSA
at any time.
DocIdEncoder getDocIdEncoder()
void addStatusSource(StatusSource source)
Adaptor.destroy()
. Source registration should
occur during Adaptor.init(com.google.enterprise.adaptor.AdaptorContext)
.
void setGetDocIdsFullErrorHandler(ExceptionHandler handler)
ExceptionHandler
for full push.
ExceptionHandler getGetDocIdsFullErrorHandler()
ExceptionHandler
for full push.
void setGetDocIdsIncrementalErrorHandler(ExceptionHandler handler)
ExceptionHandler
for incremental push.
ExceptionHandler getGetDocIdsIncrementalErrorHandler()
ExceptionHandler
for incremental push.
SensitiveValueDecoder getSensitiveValueDecoder()
HttpContext createHttpContext(String path, HttpHandler handler)
HttpServer
in similar fashion to HttpServer.createContext(java.lang.String, com.sun.net.httpserver.HttpHandler)
. The handler will
automatically be removed during adaptor shutdown. Handler registration
should occur during Adaptor.init(com.google.enterprise.adaptor.AdaptorContext)
.
Although path
may be passed directly to the underlying HttpServer
, that is not necessarily the case. Thus, implementations should
use the returned context's path when forming URLs to the handler. In
addition, the handler and context may be modified before being returned;
this is primarily to allow adding commonly-needed filters for error
handling and logging, but also available for implementation-specific needs.
Session getUserSession(HttpExchange ex, boolean create)
ex
. If a session
does not already exist, then create
determines if one should be
created.
ex
- exchange which user issued requestcreate
- whether a new session should be created if one does not
already exist for this user
null
if session did not already exist
and create = false
void setPollingIncrementalLister(PollingIncrementalLister lister)
Adaptor.init(com.google.enterprise.adaptor.AdaptorContext)
.
void setAuthnAuthority(AuthnAuthority authnAuthority)
Adaptor.init(com.google.enterprise.adaptor.AdaptorContext)
.
void setAuthzAuthority(AuthzAuthority authzAuthority)
Adaptor.init(com.google.enterprise.adaptor.AdaptorContext)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |