Commit d364c8ad authored by legoc's avatar legoc
Browse files

Renamed ApplicationImpl into ThisImpl

parent f630d6cd
......@@ -20,7 +20,7 @@ package fr.ill.ics.cameo;
import java.util.ArrayList;
import java.util.List;
import fr.ill.ics.cameo.impl.ApplicationImpl;
import fr.ill.ics.cameo.impl.ThisImpl;
import fr.ill.ics.cameo.impl.InstanceImpl;
import fr.ill.ics.cameo.impl.PublisherImpl;
import fr.ill.ics.cameo.impl.RequestImpl;
......@@ -35,13 +35,13 @@ public class Application {
}
public static class This {
static ApplicationImpl impl;
static ThisImpl impl;
private static Server server;
private static Server starterServer;
static public void init(String[] args) {
impl = new ApplicationImpl(args);
impl = new ThisImpl(args);
server = new Server(impl.getEndpoint());
server.registerEventListener(impl.getEventListener());
......
......@@ -21,11 +21,11 @@ import fr.ill.ics.cameo.Application.State;
public class HandlerImpl {
private ApplicationImpl application;
private ThisImpl application;
private Handler handler;
private Thread thread = null;
public HandlerImpl(ApplicationImpl application, Handler handler) {
public HandlerImpl(ThisImpl application, Handler handler) {
this.application = application;
this.handler = handler;
}
......
......@@ -31,7 +31,7 @@ public class PublisherImpl {
private static final String STREAM = "STREAM";
private static final String ENDSTREAM = "ENDSTREAM";
private ApplicationImpl application;
private ThisImpl application;
Zmq.Context context;
private int publisherPort;
private int synchronizerPort;
......@@ -41,7 +41,7 @@ public class PublisherImpl {
private boolean ended = false;
private PublisherWaitingImpl waiting = new PublisherWaitingImpl(this);
public PublisherImpl(ApplicationImpl application, Zmq.Context context, int publisherPort, int synchronizerPort, String name, int numberOfSubscribers) {
public PublisherImpl(ThisImpl application, Zmq.Context context, int publisherPort, int synchronizerPort, String name, int numberOfSubscribers) {
this.application = application;
this.context = context;
this.publisherPort = publisherPort;
......
......@@ -23,7 +23,7 @@ import fr.ill.ics.cameo.proto.Messages.MessageType.Type;
public class RequestImpl {
private ApplicationImpl application;
private ThisImpl application;
private String requesterEndpoint;
private ByteString message;
private ByteString message2;
......@@ -31,7 +31,7 @@ public class RequestImpl {
private int requesterApplicationId;
private String requesterServerEndpoint;
public RequestImpl(ApplicationImpl application, String requesterApplicationName, int requesterApplicationId, ByteString message, String serverUrl, int serverPort, int requesterPort) {
public RequestImpl(ThisImpl application, String requesterApplicationName, int requesterApplicationId, ByteString message, String serverUrl, int serverPort, int requesterPort) {
this.application = application;
this.requesterEndpoint = serverUrl + ":" + requesterPort;
......
......@@ -30,7 +30,7 @@ public class RequesterImpl {
public static final String REQUESTER_PREFIX = "req.";
private ApplicationImpl application;
private ThisImpl application;
Zmq.Context context;
private String responderEndpoint;
private int requesterPort;
......@@ -47,7 +47,7 @@ public class RequesterImpl {
private boolean canceled = false;
private RequesterWaitingImpl waiting = new RequesterWaitingImpl(this);
public RequesterImpl(ApplicationImpl application, Zmq.Context context, String url, int requesterPort, int responderPort, String name, int responderId, int requesterId) {
public RequesterImpl(ThisImpl application, Zmq.Context context, String url, int requesterPort, int responderPort, String name, int responderId, int requesterId) {
this.application = application;
this.context = context;
this.requesterPort = requesterPort;
......
......@@ -26,7 +26,7 @@ public class ResponderImpl {
public static final String RESPONDER_PREFIX = "rep.";
private ApplicationImpl application;
private ThisImpl application;
Zmq.Context context;
private int responderPort;
private String name;
......@@ -36,7 +36,7 @@ public class ResponderImpl {
private boolean canceled = false;
private ResponderWaitingImpl waiting = new ResponderWaitingImpl(this);
public ResponderImpl(ApplicationImpl application, Zmq.Context context, int responderPort, String name) {
public ResponderImpl(ThisImpl application, Zmq.Context context, int responderPort, String name) {
this.application = application;
this.context = context;
this.responderPort = responderPort;
......
......@@ -50,7 +50,7 @@ import fr.ill.ics.cameo.proto.Messages.SetStatusCommand;
import fr.ill.ics.cameo.proto.Messages.StopCommand;
import fr.ill.ics.cameo.proto.Messages.TerminatePublisherCommand;
public class ApplicationImpl extends ServicesImpl {
public class ThisImpl extends ServicesImpl {
private String name;
private int id;
......@@ -72,7 +72,7 @@ public class ApplicationImpl extends ServicesImpl {
* Some methods may throw the runtime ConnectionTimeout exception, so it is recommended to catch the exception at a global scope if a timeout is set.
* @param args
*/
public ApplicationImpl(String[] args) {
public ThisImpl(String[] args) {
id = -1;
......
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