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 classThe Class ParameterException. -
Field Summary
Fields inherited from class ecmwf.common.plugin.PluginThread
_params -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidError.protected InputStreamGets the input stream.Gets the opts.booleanGets the opts.protected OutputStreamGets the output stream.protected static String[]getParameter(String param) Gets the parameter.protected static StringgetParameter(String[] parameters) Gets the parameter.voidInvoke.voidOpts req.parseCommand(String command) Parses the command.protected voidPrints the.protected voidPrintln.protected StringreadLine()Read line.voidrefuseConnection(Socket socket, int connectionsCount) Refuse connection.voidreleaseConnection(Socket socket, boolean close) Release connection.protected voidsend(long message) Sends the.protected voidSends the.protected voidsetLoop(boolean loop) Sets the loop.protected voidsetSeparators(String separators) Sets the separators.voidstartConnection(Socket socket) Start connection.protected voidWait.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, stopMethods inherited from class ecmwf.common.plugin.PluginThread
getCaller, getParam, getPluginContainer, getPluginName, getRef, getVersion, handle, handle, setAttribute, setCaller, setPluginContainer, subscribe, unSubscribeMethods 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:
refuseConnectionin 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:
startConnectionin classServerPlugin- Parameters:
socket- the socket- Throws:
IOException- Signals that an I/O exception has occurred.
-
invoke
-
releaseConnection
Release connection. Release connection.- Overrides:
releaseConnectionin 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
-