Commit 0f86634b authored by legoc's avatar legoc
Browse files

Handler renamings

parent 2dbe09ab
......@@ -30,7 +30,7 @@ import fr.ill.ics.cameo.strings.Endpoint;
public class Application {
public static interface Handler {
public static interface Handle {
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 Handler handler, int stoppingTime) {
static public void handleStop(final Handle 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 Handler handler) {
static public void handleStop(final Handle handler) {
handleStop(handler, -1);
}
......
......@@ -14,18 +14,19 @@
* limitations under the Licence.
*/
package fr.ill.ics.cameo.base.impl;
package fr.ill.ics.cameo.base;
import fr.ill.ics.cameo.base.Application.Handler;
import fr.ill.ics.cameo.base.Application.Handle;
import fr.ill.ics.cameo.base.Application.State;
import fr.ill.ics.cameo.base.impl.ThisImpl;
public class HandlerImpl {
public class Handler {
private ThisImpl application;
private Handler handler;
private Handle handler;
private Thread thread = null;
public HandlerImpl(ThisImpl application, Handler handler) {
public Handler(ThisImpl application, Handle handler) {
this.application = application;
this.handler = handler;
}
......
......@@ -22,12 +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.Handler;
import fr.ill.ics.cameo.base.Application.Handle;
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.InvalidArgumentException;
import fr.ill.ics.cameo.base.Server;
import fr.ill.ics.cameo.base.StatusEvent;
......@@ -53,7 +54,7 @@ public class ThisImpl {
// Definition of a EventListener member.
private EventListener eventListener = new EventListener();
private HandlerImpl stopHandler;
private Handler stopHandler;
private WaitingSet waitingSet = new WaitingSet();
/**
......@@ -311,7 +312,7 @@ public class ThisImpl {
/**
*
*/
public void createStopHandler(Handler handler, int stoppingTime) {
public void createStopHandler(Handle handler, int stoppingTime) {
if (handler == null) {
return;
......@@ -320,7 +321,7 @@ public class ThisImpl {
// Notify the server.
setStopHandler(stoppingTime);
stopHandler = new HandlerImpl(this, handler);
stopHandler = new Handler(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