public static class Application.Builder.Container extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
Application.Builder.Container.ComponentItem<T> |
Modifier and Type | Field and Description |
---|---|
private List<Application.Builder.Container.ComponentItem<? extends com.yahoo.jdisc.service.ClientProvider>> |
clients |
private List<Application.Builder.Container.ComponentItem<?>> |
components |
private List<com.yahoo.config.ConfigInstance> |
configs |
private Map<String,List<Application.Builder.Container.ComponentItem<? extends com.yahoo.docproc.DocumentProcessor>>> |
docprocs |
private boolean |
enableSearch |
private List<Application.Builder.Container.ComponentItem<? extends com.yahoo.jdisc.handler.RequestHandler>> |
handlers |
private List<Application.Builder.Container.ComponentItem<? extends com.yahoo.search.rendering.Renderer>> |
renderers |
private Map<String,List<Application.Builder.Container.ComponentItem<? extends com.yahoo.search.Searcher>>> |
searchers |
private List<Application.Builder.Container.ComponentItem<? extends com.yahoo.jdisc.service.ServerProvider>> |
servers |
Constructor and Description |
---|
Container() |
Modifier and Type | Method and Description |
---|---|
private void |
build(PrintWriter xml,
String id,
int port) |
Application.Builder.Container |
client(String binding,
Class<? extends com.yahoo.jdisc.service.ClientProvider> client) |
Application.Builder.Container |
component(Class<?> component) |
Application.Builder.Container |
component(String id,
Class<?> component,
com.yahoo.config.ConfigInstance... configs) |
Application.Builder.Container |
config(com.yahoo.config.ConfigInstance config) |
Application.Builder.Container |
documentProcessor(Class<? extends com.yahoo.docproc.DocumentProcessor> docproc) |
Application.Builder.Container |
documentProcessor(String chainName,
Class<? extends com.yahoo.docproc.DocumentProcessor> docproc,
com.yahoo.config.ConfigInstance... configs) |
Application.Builder.Container |
documentProcessor(String id,
String chainName,
Class<? extends com.yahoo.docproc.DocumentProcessor> docproc,
com.yahoo.config.ConfigInstance... configs) |
private void |
generateComponent(PrintWriter xml,
Application.Builder.Container.ComponentItem<?> componentItem,
String elementName) |
private void |
generateConfig(PrintWriter xml,
com.yahoo.config.ConfigInstance config) |
private void |
generateConfigField(PrintWriter xml,
com.yahoo.config.InnerNode node,
Field field) |
private void |
generateConfigNode(PrintWriter xml,
com.yahoo.config.InnerNode node) |
Application.Builder.Container |
handler(String binding,
Class<? extends com.yahoo.jdisc.handler.RequestHandler> handler) |
Application.Builder.Container |
renderer(String id,
Class<? extends com.yahoo.search.rendering.Renderer> renderer,
com.yahoo.config.ConfigInstance... configs) |
Application.Builder.Container |
search(boolean enableSearch) |
Application.Builder.Container |
searcher(Class<? extends com.yahoo.search.Searcher> searcher) |
Application.Builder.Container |
searcher(String chainName,
Class<? extends com.yahoo.search.Searcher> searcher,
com.yahoo.config.ConfigInstance... configs) |
Application.Builder.Container |
searcher(String id,
String chainName,
Class<? extends com.yahoo.search.Searcher> searcher,
com.yahoo.config.ConfigInstance... configs) |
Application.Builder.Container |
server(String id,
Class<? extends com.yahoo.jdisc.service.ServerProvider> server) |
private final Map<String,List<Application.Builder.Container.ComponentItem<? extends com.yahoo.docproc.DocumentProcessor>>> docprocs
private final Map<String,List<Application.Builder.Container.ComponentItem<? extends com.yahoo.search.Searcher>>> searchers
private final List<Application.Builder.Container.ComponentItem<? extends com.yahoo.search.rendering.Renderer>> renderers
private final List<Application.Builder.Container.ComponentItem<? extends com.yahoo.jdisc.handler.RequestHandler>> handlers
private final List<Application.Builder.Container.ComponentItem<? extends com.yahoo.jdisc.service.ClientProvider>> clients
private final List<Application.Builder.Container.ComponentItem<? extends com.yahoo.jdisc.service.ServerProvider>> servers
private final List<Application.Builder.Container.ComponentItem<?>> components
private final List<com.yahoo.config.ConfigInstance> configs
private boolean enableSearch
public Application.Builder.Container documentProcessor(Class<? extends com.yahoo.docproc.DocumentProcessor> docproc)
docproc
- add this docproc to the default document processing chainpublic Application.Builder.Container documentProcessor(String chainName, Class<? extends com.yahoo.docproc.DocumentProcessor> docproc, com.yahoo.config.ConfigInstance... configs)
chainName
- chain name to add docprocdocproc
- add this docproc to the document processing chainconfigs
- local docproc configspublic Application.Builder.Container documentProcessor(String id, String chainName, Class<? extends com.yahoo.docproc.DocumentProcessor> docproc, com.yahoo.config.ConfigInstance... configs)
id
- component idchainName
- chain name to add docprocdocproc
- add this docproc to the document processing chainconfigs
- local docproc configspublic Application.Builder.Container search(boolean enableSearch)
enableSearch
- if true, enable search even without any searchers definedpublic Application.Builder.Container searcher(Class<? extends com.yahoo.search.Searcher> searcher)
searcher
- add this searcher to the default search chainpublic Application.Builder.Container searcher(String chainName, Class<? extends com.yahoo.search.Searcher> searcher, com.yahoo.config.ConfigInstance... configs)
chainName
- chain name to add searchersearcher
- add this searcher to the search chainconfigs
- local searcher configspublic Application.Builder.Container searcher(String id, String chainName, Class<? extends com.yahoo.search.Searcher> searcher, com.yahoo.config.ConfigInstance... configs)
id
- component idchainName
- chain name to add searchersearcher
- add this searcher to the search chainconfigs
- local searcher configspublic Application.Builder.Container renderer(String id, Class<? extends com.yahoo.search.rendering.Renderer> renderer, com.yahoo.config.ConfigInstance... configs)
id
- component id, enable template with ?format=id or ?presentation.format=idrenderer
- add this rendererconfigs
- local renderer configspublic Application.Builder.Container handler(String binding, Class<? extends com.yahoo.jdisc.handler.RequestHandler> handler)
binding
- binding stringhandler
- the handler classpublic Application.Builder.Container client(String binding, Class<? extends com.yahoo.jdisc.service.ClientProvider> client)
binding
- binding stringclient
- the client classpublic Application.Builder.Container server(String id, Class<? extends com.yahoo.jdisc.service.ServerProvider> server)
id
- server compoent idserver
- the server classpublic Application.Builder.Container component(Class<?> component)
component
- make this component available to the containerpublic Application.Builder.Container component(String id, Class<?> component, com.yahoo.config.ConfigInstance... configs)
component
- make this component available to the containerpublic Application.Builder.Container config(com.yahoo.config.ConfigInstance config)
config
- add this config to the applicationprivate void build(PrintWriter xml, String id, int port) throws Exception
Exception
private void generateComponent(PrintWriter xml, Application.Builder.Container.ComponentItem<?> componentItem, String elementName) throws Exception
Exception
private void generateConfig(PrintWriter xml, com.yahoo.config.ConfigInstance config) throws Exception
Exception
private void generateConfigNode(PrintWriter xml, com.yahoo.config.InnerNode node) throws Exception
Exception
private void generateConfigField(PrintWriter xml, com.yahoo.config.InnerNode node, Field field) throws Exception
Exception
Copyright © 2018. All rights reserved.