Package org.apfloat.samples
Class OperationServer
- java.lang.Object
-
- org.apfloat.samples.OperationServer
-
public class OperationServer extends java.lang.ObjectServer for executingOperations from remote calls. The client should simply send a class implementing theOperationinterface 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 classOperationServer.Request
-
Field Summary
Fields Modifier and Type Field Description private static intBUFFER_SIZEprivate static intDEBUGprivate static intERRORprivate static intINFOprivate static intmessageLevelprivate static intWARNING
-
Constructor Summary
Constructors Modifier Constructor Description privateOperationServer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voiddebug(java.lang.String message)private static voidinfo(java.lang.String message)static voidmain(java.lang.String[] args)Command-line entry point.private static voidwarning(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.IOExceptionCommand-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)
-
-