diff options
| author | Simon Rettberg | 2014-07-14 20:58:42 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2014-07-14 20:58:42 +0200 |
| commit | 67511b8aad6c1162bbd8ba01e1d4cd9a0bb1e107 (patch) | |
| tree | 82b1d287d0b7304d2c5b8bc4d958694fd8fd2b4d /Dozentenmodul/src/thrift/MasterThriftConnection.java | |
| parent | Converted DMS to Maven project (1/2) (diff) | |
| download | tutor-module-67511b8aad6c1162bbd8ba01e1d4cd9a0bb1e107.tar.gz tutor-module-67511b8aad6c1162bbd8ba01e1d4cd9a0bb1e107.tar.xz tutor-module-67511b8aad6c1162bbd8ba01e1d4cd9a0bb1e107.zip | |
mavenization on its way...
Diffstat (limited to 'Dozentenmodul/src/thrift/MasterThriftConnection.java')
| -rw-r--r-- | Dozentenmodul/src/thrift/MasterThriftConnection.java | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/Dozentenmodul/src/thrift/MasterThriftConnection.java b/Dozentenmodul/src/thrift/MasterThriftConnection.java deleted file mode 100644 index 11a27368..00000000 --- a/Dozentenmodul/src/thrift/MasterThriftConnection.java +++ /dev/null @@ -1,46 +0,0 @@ -package thrift; - -import javax.swing.JOptionPane; - -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; - -import thrift.ImageServer.Client; - - - -public class MasterThriftConnection { - - public static final String MASTERSERVERIP="132.230.4.16"; - //public static final String MASTERSERVERIP="127.0.0.1"; - - final TTransport transport = new TSocket(MASTERSERVERIP, 9090); - - public Client getMasterThriftConnection() - { - - try { - transport.open(); - } catch (TTransportException e) { - System.out.println("Keine Verbindung m\u00f6glich!"); - 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("Masterserver erreichbar."); - - return client; - } - - public void closeMasterThriftConnection() - { - transport.close(); - } -} |
