Package org.apache.tika.pipes.grpc
Class TikaGrpcServer
- java.lang.Object
-
- org.apache.tika.pipes.grpc.TikaGrpcServer
-
public class TikaGrpcServer extends Object
Server that manages startup/shutdown of the GRPC Tika server.
-
-
Field Summary
Fields Modifier and Type Field Description static intTIKA_SERVER_GRPC_DEFAULT_PORT
-
Constructor Summary
Constructors Constructor Description TikaGrpcServer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidblockUntilShutdown()Await termination on the main thread since the grpc library uses daemon threads.static voidmain(String[] args)Main launches the server from the command line.TikaGrpcServersetCertChain(File certChain)TikaGrpcServersetClientAuthRequired(boolean clientAuthRequired)TikaGrpcServersetPort(Integer port)TikaGrpcServersetPrivateKey(File privateKey)TikaGrpcServersetPrivateKeyPassword(String privateKeyPassword)TikaGrpcServersetSecure(boolean secure)TikaGrpcServersetServer(io.grpc.Server server)TikaGrpcServersetTikaConfigXml(File tikaConfigXml)TikaGrpcServersetTrustCertCollection(File trustCertCollection)voidstart()voidstop()
-
-
-
Field Detail
-
TIKA_SERVER_GRPC_DEFAULT_PORT
public static final int TIKA_SERVER_GRPC_DEFAULT_PORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
stop
public void stop() throws InterruptedException- Throws:
InterruptedException
-
blockUntilShutdown
public void blockUntilShutdown() throws InterruptedExceptionAwait termination on the main thread since the grpc library uses daemon threads.- Throws:
InterruptedException
-
main
public static void main(String[] args) throws Exception
Main launches the server from the command line.- Throws:
Exception
-
setTikaConfigXml
public TikaGrpcServer setTikaConfigXml(File tikaConfigXml)
-
setServer
public TikaGrpcServer setServer(io.grpc.Server server)
-
setPort
public TikaGrpcServer setPort(Integer port)
-
setSecure
public TikaGrpcServer setSecure(boolean secure)
-
setCertChain
public TikaGrpcServer setCertChain(File certChain)
-
setPrivateKey
public TikaGrpcServer setPrivateKey(File privateKey)
-
setPrivateKeyPassword
public TikaGrpcServer setPrivateKeyPassword(String privateKeyPassword)
-
setTrustCertCollection
public TikaGrpcServer setTrustCertCollection(File trustCertCollection)
-
setClientAuthRequired
public TikaGrpcServer setClientAuthRequired(boolean clientAuthRequired)
-
-