4A Server -
2.0
|
Interface for call of SEC API as external program (deamon) More...
Public Member Functions | |
synchronized boolean | init () |
synchronized String | makeRequest (String s) throws Exception |
void | close () |
Static Public Member Functions | |
static boolean | isSecCommandEmpty () |
Static Public Attributes | |
static final String | SEC_API_COMMAND = "/var/sec/SEC_API/sec_api.py" |
static final String | SEC_API_PATH = "/var/sec/SEC_API/" |
static final String | SEC_API_SETTING_NAME = "secCommand" |
static final String | SEC_API_PATH_SETTING_NAME = "secPath" |
Package Attributes | |
OutputStream | stdin = null |
InputStream | stderr = null |
InputStream | stdout = null |
ProcessBuilder | processBuilder |
Process | processVar |
BufferedWriter | brStdIn |
BufferedReader | brStdOut |
BufferedReader | brStdErrOut |
boolean | wasInitialized = false |
Interface for call of SEC API as external program (deamon)
Interface for call of SEC API as external program (deamon)
Note: If SEC API is started locally it will also provide interface on some port (8082 on default installation but if it is used, 8084 is recommended). So there is no need to start other instance if we need to provide SEC API network interface to others. SEC API can also provide services not only to local Annotation Server but also to other annotation servers which has acces to appropriate port.
Definition at line 43 of file SECAPIInterface.java.
void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SECAPIInterface.close | ( | ) |
Destroy process and close streams
Definition at line 237 of file SECAPIInterface.java.
synchronized boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.SECAPIInterface.init | ( | ) |
Initialize process
Definition at line 115 of file SECAPIInterface.java.
|
static |
Returns if SEC API command is empty in database.
Definition at line 164 of file SECAPIInterface.java.
synchronized String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SECAPIInterface.makeRequest | ( | String | s | ) | throws Exception |
Send message to process and return response.
s | Message |
Exception,when | proces was terminated |
Definition at line 185 of file SECAPIInterface.java.
|
package |
Buffered reader for stderr
Definition at line 103 of file SECAPIInterface.java.
|
package |
Buffered writer for stdin
Definition at line 93 of file SECAPIInterface.java.
|
package |
Buffered reader for stdout
Definition at line 98 of file SECAPIInterface.java.
|
package |
Process builder information
Definition at line 83 of file SECAPIInterface.java.
|
package |
Process information
Definition at line 88 of file SECAPIInterface.java.
|
static |
Default command for external program
Definition at line 48 of file SECAPIInterface.java.
|
static |
Default path for external program
Definition at line 53 of file SECAPIInterface.java.
|
static |
Name of setting of command for external program
Definition at line 63 of file SECAPIInterface.java.
|
static |
Name of setting of command for external program
Definition at line 58 of file SECAPIInterface.java.
|
package |
Standard error output of external program
Definition at line 73 of file SECAPIInterface.java.
|
package |
Standard input of external program
Definition at line 68 of file SECAPIInterface.java.
|
package |
Standard output of external program
Definition at line 78 of file SECAPIInterface.java.
|
package |
true - proces was initialized, false proces was not initialized
Definition at line 108 of file SECAPIInterface.java.