Class SimplePlugin
java.lang.Object
ecmwf.common.technical.ThreadService.ConfigurableRunnable
ecmwf.common.plugin.PluginThread
ecmwf.common.plugin.ServerPlugin
ecmwf.common.plugin.SimplePlugin
- All Implemented Interfaces:
MBeanService
,Runnable
- Direct Known Subclasses:
ECpdsPlugin
,ECproxyPlugin
The Class SimplePlugin.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
The Class ParameterException. -
Field Summary
Fields inherited from class ecmwf.common.plugin.PluginThread
_params
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Error.protected InputStream
Gets the input stream.Gets the opts.boolean
Gets the opts.protected OutputStream
Gets the output stream.protected static String[]
getParameter
(String param) Gets the parameter.protected static String
getParameter
(String[] parameters) Gets the parameter.void
Invoke.void
Opts req.parseCommand
(String command) Parses the command.protected void
Prints the.protected void
Println.protected String
readLine()
Read line.void
refuseConnection
(Socket socket, int connectionsCount) Refuse connection.void
releaseConnection
(Socket socket, boolean close) Release connection.protected void
send
(long message) Sends the.protected void
Sends the.protected void
setLoop
(boolean loop) Sets the loop.protected void
setSeparators
(String separators) Sets the separators.void
startConnection
(Socket socket) Start connection.protected void
Wait.Methods inherited from class ecmwf.common.plugin.ServerPlugin
addConnection, callerBack, callerGone, configurableRun, customizeSocket, getAttribute, getHeader, getInetAddress, getInfo, getMBeanInfo, getPort, getRemoteHost, getRemoteIP, getServerPluginDescriptor, getSocket, invoke, isAvailable, newInstance, setCloseOnExit, start, stop
Methods inherited from class ecmwf.common.plugin.PluginThread
getCaller, getParam, getPluginContainer, getPluginName, getRef, getVersion, handle, handle, setAttribute, setCaller, setPluginContainer, subscribe, unSubscribe
Methods inherited from class ecmwf.common.technical.ThreadService.ConfigurableRunnable
execute, execute, getContextClassLoader, getPriority, getThreadName, interrupt, interrupted, isAlive, isStarted, join, join, run, setContextClassLoader, setForceCookie, setInheritCookie, setPriority, setThreadNameAndCookie
-
Constructor Details
-
SimplePlugin
Instantiates a new simple plugin.- Parameters:
ref
- the refparams
- the paramssocket
- the socket- Throws:
IOException
- Signals that an I/O exception has occurred.
-
SimplePlugin
-
-
Method Details
-
setSeparators
Sets the separators.- Parameters:
separators
- the new separators
-
setLoop
protected void setLoop(boolean loop) Sets the loop.- Parameters:
loop
- the new loop
-
refuseConnection
Refuse connection. Refuse connection.- Specified by:
refuseConnection
in classServerPlugin
- Parameters:
socket
- the socketconnectionsCount
- the connections count- Throws:
IOException
- Signals that an I/O exception has occurred.
-
startConnection
Start connection. Start connection.- Specified by:
startConnection
in classServerPlugin
- Parameters:
socket
- the socket- Throws:
IOException
- Signals that an I/O exception has occurred.
-
invoke
-
releaseConnection
Release connection. Release connection.- Overrides:
releaseConnection
in classServerPlugin
- Parameters:
socket
- the socketclose
- the close
-
parseCommand
-
readLine
Read line.- Returns:
- the string
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
optsReq
Opts req.- Parameters:
parameters
- the parameters- Throws:
SimplePlugin.ParameterException
- the parameter exception
-
getOpts
-
getOpts
Gets the opts.- Parameters:
name
- the namedefaultValue
- the default value- Returns:
- the opts
-
print
Prints the.- Parameters:
message
- the message- Throws:
IOException
- Signals that an I/O exception has occurred.
-
println
Println.- Parameters:
message
- the message- Throws:
IOException
- Signals that an I/O exception has occurred.
-
error
-
send
Sends the.- Parameters:
message
- the message- Throws:
IOException
- Signals that an I/O exception has occurred.
-
wait
Wait.- Parameters:
message
- the message- Throws:
IOException
- Signals that an I/O exception has occurred.
-
send
Sends the.- Parameters:
message
- the message- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getInputStream
-
getOutputStream
-
getParameter
Gets the parameter.- Parameters:
parameters
- the parameters- Returns:
- the parameter
- Throws:
SimplePlugin.ParameterException
- the parameter exception
-
getParameter
-