@CreoleResource(name="PythonSlaveLr",
comment="Language Resource to represent a Python slave process.",
helpURL="")
public class PythonSlaveLr
extends gate.creole.AbstractLanguageResource
| Modifier and Type | Field and Description |
|---|---|
protected String |
authToken |
protected String |
host |
protected Boolean |
logActions |
org.apache.log4j.Logger |
logger
Our logger instance.
|
protected Integer |
port |
protected PythonSlave |
pythonSlave |
protected Boolean |
useAuthToken |
| Constructor and Description |
|---|
PythonSlaveLr() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
String |
getAuthToken()
Get the auth token.
|
String |
getHost()
Get the host
|
Boolean |
getLogActions()
Get if actions get logged.
|
Integer |
getPort()
Get the port number.
|
Boolean |
getUseAuthToken()
Should we use an auth token.
|
gate.Resource |
init() |
void |
setAuthToken(String value)
Set auth token
|
void |
setHost(String value)
Set binding host name or address
|
void |
setLogActions(Boolean val)
Set whether or not to log actions.
|
void |
setPort(Integer value)
Set port.
|
void |
setUseAuthToken(Boolean value)
Set if we want to use an auth token.
|
void |
startServer(PythonSlave pslave)
Start the server.
|
void |
stopServer(PythonSlave pslave)
Stop the server.
|
getDataStore, getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, synccheckParameterValues, flushBeanInfoCache, forgetBeanInfo, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic transient org.apache.log4j.Logger logger
protected Integer port
protected String host
protected String authToken
protected Boolean logActions
protected Boolean useAuthToken
protected transient PythonSlave pythonSlave
@Optional
@CreoleParameter(comment="Port number to use.",
defaultValue="25333")
public void setPort(Integer value)
value - port numberpublic Integer getPort()
@Optional
@CreoleParameter(comment="Binding host name or address",
defaultValue="127.0.0.1")
public void setHost(String value)
value - hostpublic String getHost()
@Optional
@CreoleParameter(comment="Auth token to use",
defaultValue="")
public void setAuthToken(String value)
value - auth tokenpublic String getAuthToken()
@CreoleParameter(comment="If actions should get logged",
defaultValue="false")
public void setLogActions(Boolean val)
val - flagpublic Boolean getLogActions()
@CreoleParameter(comment="Whether to use an auth token",
defaultValue="true")
public void setUseAuthToken(Boolean value)
value - flagpublic Boolean getUseAuthToken()
public gate.Resource init()
throws gate.creole.ResourceInstantiationException
init in interface gate.Resourceinit in class gate.creole.AbstractResourcegate.creole.ResourceInstantiationExceptionpublic void cleanup()
cleanup in interface gate.Resourcecleanup in class gate.creole.AbstractLanguageResourcepublic void startServer(PythonSlave pslave)
pslave - the python slave instance that owns the serverpublic void stopServer(PythonSlave pslave)
pslave - the PythonSlave instance that owns the server.Copyright © 2021 GATE Team. All rights reserved.