Commit 26f101b6 authored by legoc's avatar legoc
Browse files

Handler renamings

parent 0f86634b
......@@ -30,7 +30,7 @@ import fr.ill.ics.cameo.strings.Endpoint;
public class Application {
public static interface Handle {
public static interface Handler {
void handle();
}
......@@ -259,7 +259,7 @@ public class Application {
* Sets the stop handler with stopping time that overrides the one that may be defined in the configuration of the server.
* @param handler
*/
static public void handleStop(final Handle handler, int stoppingTime) {
static public void handleStop(final Handler handler, int stoppingTime) {
impl.createStopHandler(handler, stoppingTime);
}
......@@ -267,7 +267,7 @@ public class Application {
* Sets the stop handler with default stopping time.
* @param handler
*/
static public void handleStop(final Handle handler) {
static public void handleStop(final Handler handler) {
handleStop(handler, -1);
}
......
......@@ -16,17 +16,17 @@
package fr.ill.ics.cameo.base;
import fr.ill.ics.cameo.base.Application.Handle;
import fr.ill.ics.cameo.base.Application.Handler;
import fr.ill.ics.cameo.base.Application.State;
import fr.ill.ics.cameo.base.impl.ThisImpl;
public class Handler {
public class HandlerRunner {
private ThisImpl application;
private Handle handler;
private Handler handler;
private Thread thread = null;
public Handler(ThisImpl application, Handle handler) {
public HandlerRunner(ThisImpl application, Handler handler) {
this.application = application;
this.handler = handler;
}
......
......@@ -22,13 +22,13 @@ import org.json.simple.parser.ParseException;
import fr.ill.ics.cameo.ProcessHandlerImpl;
import fr.ill.ics.cameo.base.Application;
import fr.ill.ics.cameo.base.Application.Handle;
import fr.ill.ics.cameo.base.Application.Handler;
import fr.ill.ics.cameo.base.Application.State;
import fr.ill.ics.cameo.base.CancelEvent;
import fr.ill.ics.cameo.base.ConnectionTimeout;
import fr.ill.ics.cameo.base.Event;
import fr.ill.ics.cameo.base.EventListener;
import fr.ill.ics.cameo.base.Handler;
import fr.ill.ics.cameo.base.HandlerRunner;
import fr.ill.ics.cameo.base.InvalidArgumentException;
import fr.ill.ics.cameo.base.Server;
import fr.ill.ics.cameo.base.StatusEvent;
......@@ -54,7 +54,7 @@ public class ThisImpl {
// Definition of a EventListener member.
private EventListener eventListener = new EventListener();
private Handler stopHandler;
private HandlerRunner stopHandler;
private WaitingSet waitingSet = new WaitingSet();
/**
......@@ -312,7 +312,7 @@ public class ThisImpl {
/**
*
*/
public void createStopHandler(Handle handler, int stoppingTime) {
public void createStopHandler(Handler handler, int stoppingTime) {
if (handler == null) {
return;
......@@ -321,7 +321,7 @@ public class ThisImpl {
// Notify the server.
setStopHandler(stoppingTime);
stopHandler = new Handler(this, handler);
stopHandler = new HandlerRunner(this, handler);
stopHandler.start();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment