public abstract class OSServiceHandler
extends java.lang.Object
implements org.processmining.framework.util.socket.ServiceHandler
Modifier and Type | Field and Description |
---|---|
protected OSXMLConverter |
converter |
protected static java.lang.String |
hostId |
Constructor and Description |
---|
OSServiceHandler(int portOffset,
int maxClients) |
Modifier and Type | Method and Description |
---|---|
protected abstract Response |
getResult(org.processmining.framework.util.socket.ServiceEnvironment environment,
Request request) |
void |
handleRequest(org.processmining.framework.util.socket.ServiceEnvironment environment,
java.io.BufferedReader in,
java.io.PrintWriter out)
Invoked whenever a client connects to the service.
|
protected abstract java.lang.String |
processInfo(org.processmining.framework.util.socket.ServiceEnvironment environment,
java.lang.String provider,
java.lang.String info) |
protected void |
sendError(java.io.PrintWriter out,
java.lang.String reason,
java.lang.Exception e) |
protected void |
setupPorts() |
protected void |
writeLine(java.io.Writer out,
java.lang.String line) |
protected static java.lang.String hostId
protected OSXMLConverter converter
protected void setupPorts()
public void handleRequest(org.processmining.framework.util.socket.ServiceEnvironment environment, java.io.BufferedReader in, java.io.PrintWriter out) throws java.io.IOException
org.processmining.framework.util.socket.ServiceHandler
handleRequest
in interface org.processmining.framework.util.socket.ServiceHandler
environment
- is the registered environment of the service. A handler can
use this parameter to, for example, log messages.in
- is the buffer from which the client's request can be read.out
- is the buffer where a possible response to the client can be
written.java.io.IOException
protected void writeLine(java.io.Writer out, java.lang.String line) throws java.io.IOException
java.io.IOException
protected void sendError(java.io.PrintWriter out, java.lang.String reason, java.lang.Exception e) throws java.io.IOException
java.io.IOException
protected abstract Response getResult(org.processmining.framework.util.socket.ServiceEnvironment environment, Request request)
protected abstract java.lang.String processInfo(org.processmining.framework.util.socket.ServiceEnvironment environment, java.lang.String provider, java.lang.String info)