public interface ExternalModel
extends java.lang.AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
closeServer()
Set a command to the model server that we are done with it.
|
int |
getPort()
Get the port number for this model's server
|
java.lang.Process |
getProcess()
Get the process holding this external port
|
void |
readModel(java.io.InputStream input)
Read file describing model into memory
|
boolean |
serverIsRunning()
Check whether the server is running
|
void |
setCompressionLevel(int level)
Define how well model file is compressed
|
void |
startServer()
Start the server hosting the model.
|
void |
writeModel(java.io.OutputStream output)
Write model to an output stream
|
void startServer()
throws java.lang.Exception
java.lang.Exceptionjava.lang.Process getProcess()
boolean serverIsRunning()
int getPort()
void closeServer()
void readModel(java.io.InputStream input)
throws java.lang.Exception
input - Input stream providing model datajava.io.IOExceptionjava.lang.Exceptionvoid setCompressionLevel(int level)
throws java.lang.Exception
level - Desired level. 1: Fastest, 9: Smallest memory footprintjava.lang.Exception#ScikitModelvoid writeModel(java.io.OutputStream output)
throws java.io.IOException
output - java.io.IOException