summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src/main/java/thrift/ThriftConnection.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-06-02 19:53:31 +0200
committerSimon Rettberg2015-06-02 19:53:31 +0200
commit1bc83891c68ee269727e81a13cc70da698bcc7a7 (patch)
treeb052a72ad7d65864068752f71c5ed2b49a171276 /dozentenmodulserver/src/main/java/thrift/ThriftConnection.java
parent[server] Started work on the internal file server (diff)
downloadtutor-module-1bc83891c68ee269727e81a13cc70da698bcc7a7.tar.gz
tutor-module-1bc83891c68ee269727e81a13cc70da698bcc7a7.tar.xz
tutor-module-1bc83891c68ee269727e81a13cc70da698bcc7a7.zip
[server] Compiling again, still lots of stubs
Diffstat (limited to 'dozentenmodulserver/src/main/java/thrift/ThriftConnection.java')
-rw-r--r--dozentenmodulserver/src/main/java/thrift/ThriftConnection.java54
1 files changed, 0 insertions, 54 deletions
diff --git a/dozentenmodulserver/src/main/java/thrift/ThriftConnection.java b/dozentenmodulserver/src/main/java/thrift/ThriftConnection.java
deleted file mode 100644
index 65a905bb..00000000
--- a/dozentenmodulserver/src/main/java/thrift/ThriftConnection.java
+++ /dev/null
@@ -1,54 +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 org.openslx.sat.thrift.iface.Server;
-import org.openslx.sat.thrift.iface.Server.Client;
-//import models.SessionData;
-import org.apache.log4j.Logger;
-
-public class ThriftConnection {
-
- private final static Logger LOGGER = Logger.getLogger(ThriftConnection.class);
-
- private String satAddress = ""+SessionData.session.getServerAdress();
- final TTransport transport = new TSocket(satAddress, 9090);
-
- public ThriftConnection() {
- // TODO Auto-generated constructor stub
- }
-
- public Client getThriftConnection()
- {
-
- try {
- transport.open();
- } catch (TTransportException e) {
- LOGGER.error("Keine Verbindung möglich! Satellit: " + satAddress);
- e.printStackTrace();
- JOptionPane.showMessageDialog(null,
- "Konnte keine Verbindung zum Satellit '" + satAddress + "' aufbauen!",
- "Debug-Message", JOptionPane.ERROR_MESSAGE);
- return null;
- }
-
- final TProtocol protocol = new TBinaryProtocol(transport);
-
- final Server.Client client = new Server.Client(protocol);
- LOGGER.info("Verbindung zu "+satAddress+" wurde aufgebaut.");
-
- return client;
- }
-
- public void closeThriftConnection()
- {
- LOGGER.info("Verbindung wird geplant getrennt.");
- transport.close();
- }
-}
- \ No newline at end of file