summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/thrift/MasterThriftConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'Dozentenmodul/src/thrift/MasterThriftConnection.java')
-rw-r--r--Dozentenmodul/src/thrift/MasterThriftConnection.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/Dozentenmodul/src/thrift/MasterThriftConnection.java b/Dozentenmodul/src/thrift/MasterThriftConnection.java
index ecbc689c..24d034f2 100644
--- a/Dozentenmodul/src/thrift/MasterThriftConnection.java
+++ b/Dozentenmodul/src/thrift/MasterThriftConnection.java
@@ -1,5 +1,7 @@
package thrift;
+import javax.swing.JOptionPane;
+
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TSocket;
@@ -11,7 +13,10 @@ import thrift.ImageServer.Client;
public class MasterThriftConnection {
- final TTransport transport = new TSocket("132.230.4.16", 9090);
+
+ public static final String MASTERSERVERIP="132.230.4.16";
+ final TTransport transport = new TSocket(MASTERSERVERIP, 9090);
+
public Client getMasterThriftConnection()
{
@@ -19,14 +24,15 @@ public class MasterThriftConnection {
transport.open();
} catch (TTransportException e) {
System.out.println("Keine Verbindung möglich!");
+ JOptionPane.showMessageDialog(null,
+ e.getCause()+"\n"+e.getMessage(),
+ "Debug-Message", JOptionPane.ERROR_MESSAGE);
return null;
}
final TProtocol protocol = new TBinaryProtocol(transport);
final Client client = new Client(protocol);
-
-
- System.out.println("Der Server läuft!");
+ System.out.println("Masterserver erreichbar.");
return client;
}