@Beta public final class JDisc extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
private com.yahoo.container.standalone.StandaloneContainerApplication |
application |
private com.yahoo.container.Container |
container |
private boolean |
deletePathWhenClosing |
private com.yahoo.application.container.impl.ClassLoaderOsgiFramework |
osgiFramework |
private Path |
path |
private com.yahoo.jdisc.test.TestDriver |
testDriver |
Modifier | Constructor and Description |
---|---|
private |
JDisc(Path path,
boolean deletePathWhenClosing,
Networking networking,
com.yahoo.config.model.ConfigModelRepo configModelRepo) |
Modifier and Type | Method and Description |
---|---|
private com.google.inject.Module |
bindings(Path path,
com.yahoo.config.model.ConfigModelRepo configModelRepo,
Networking networking) |
void |
close()
Closes the current JDisc.
|
com.yahoo.component.provider.ComponentRegistry<com.yahoo.component.AbstractComponent> |
components()
Returns a registry of all components available in this
|
DocumentProcessing |
documentProcessing()
Returns a
DocumentProcessing , used to process objects of type Document ,
DocumentRemove and DocumentUpdate . |
static JDisc |
fromPath(Path path,
Networking networking)
Factory method to create a JDisc from an application package.
|
static JDisc |
fromPath(Path path,
Networking networking,
com.yahoo.config.model.ConfigModelRepo configModelRepo)
Create a jDisc instance which is given a config model repo (in which (mock) content clusters
can be looked up).
|
static JDisc |
fromServicesXml(String xml,
Networking networking)
Factory method to create a JDisc from an XML String.
|
private com.yahoo.search.handler.SearchHandler |
getSearchHandler() |
Response |
handleRequest(Request request)
Handles the given
Request by passing it to the RequestHandler
that is bound to the request's URI. |
Processing |
processing()
Returns a
Processing , used to do generic asynchronous operations in a request/response API. |
Search |
search()
Returns a
Search , used to perform search query operations on this container. |
private final com.yahoo.application.container.impl.ClassLoaderOsgiFramework osgiFramework
private final com.yahoo.jdisc.test.TestDriver testDriver
private final com.yahoo.container.standalone.StandaloneContainerApplication application
private final com.yahoo.container.Container container
private final Path path
private final boolean deletePathWhenClosing
private JDisc(Path path, boolean deletePathWhenClosing, Networking networking, com.yahoo.config.model.ConfigModelRepo configModelRepo)
private com.google.inject.Module bindings(Path path, com.yahoo.config.model.ConfigModelRepo configModelRepo, Networking networking)
public static JDisc fromServicesXml(String xml, Networking networking)
fromPath(java.nio.file.Path, com.yahoo.application.Networking)
.xml
- the XML configuration to usepublic static JDisc fromPath(Path path, Networking networking)
path
- the reference to the application package to usenetworking
- enabled or disabledpublic static JDisc fromPath(Path path, Networking networking, com.yahoo.config.model.ConfigModelRepo configModelRepo)
public Search search()
Search
, used to perform search query operations on this container.UnsupportedOperationException
- if this JDisc does not have search configuredprivate com.yahoo.search.handler.SearchHandler getSearchHandler()
public Processing processing()
Processing
, used to do generic asynchronous operations in a request/response API.UnsupportedOperationException
- if this JDisc does not have processing configuredpublic DocumentProcessing documentProcessing()
DocumentProcessing
, used to process objects of type Document
,
DocumentRemove
and DocumentUpdate
.UnsupportedOperationException
- if this JDisc does not have document processing configuredpublic com.yahoo.component.provider.ComponentRegistry<com.yahoo.component.AbstractComponent> components()
public Response handleRequest(Request request)
Request
by passing it to the RequestHandler
that is bound to the request's URI.request
- the request to processpublic void close()
close
in interface AutoCloseable
Copyright © 2018. All rights reserved.