Package org.apfloat.samples
Class OperationServer
- java.lang.Object
-
- org.apfloat.samples.OperationServer
-
public class OperationServer extends java.lang.Object
Server for executingOperation
s from remote calls. The client should simply send a class implementing theOperation
interface serialized through a socket connection. Obviously, the class must exist also in the server's classpath. The server will then simply callOperation.execute()
on the operation, and send the resulting object back in the socket, serialized. If an exception occurs during the operation execution, nothing is returned and the socket connection is closed.- Version:
- 1.9.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
OperationServer.Request
-
Field Summary
Fields Modifier and Type Field Description private static int
BUFFER_SIZE
private static int
DEBUG
private static int
ERROR
private static int
INFO
private static int
messageLevel
private static int
WARNING
-
Constructor Summary
Constructors Modifier Constructor Description private
OperationServer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
debug(java.lang.String message)
private static void
info(java.lang.String message)
static void
main(java.lang.String[] args)
Command-line entry point.private static void
warning(java.lang.String message, java.lang.Exception e)
-
-
-
Field Detail
-
BUFFER_SIZE
private static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
ERROR
private static final int ERROR
- See Also:
- Constant Field Values
-
WARNING
private static final int WARNING
- See Also:
- Constant Field Values
-
INFO
private static final int INFO
- See Also:
- Constant Field Values
-
DEBUG
private static final int DEBUG
- See Also:
- Constant Field Values
-
messageLevel
private static int messageLevel
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException
Command-line entry point.- Parameters:
args
- Command-line parameters.- Throws:
java.io.IOException
- In case of unexpected network error.
-
warning
private static void warning(java.lang.String message, java.lang.Exception e)
-
info
private static void info(java.lang.String message)
-
debug
private static void debug(java.lang.String message)
-
-