From c89abbfa830876b7298eb96896a642bc74589651 Mon Sep 17 00:00:00 2001 From: Nils Schwabe Date: Thu, 10 Jul 2014 16:08:36 +0200 Subject: Add some better thread synchonization Restructure some classes Fix small connection issues --- .../imagemaster/serverconnection/Connection.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/java/org/openslx/imagemaster/serverconnection/Connection.java (limited to 'src/main/java/org/openslx/imagemaster/serverconnection/Connection.java') diff --git a/src/main/java/org/openslx/imagemaster/serverconnection/Connection.java b/src/main/java/org/openslx/imagemaster/serverconnection/Connection.java new file mode 100644 index 0000000..c6606ac --- /dev/null +++ b/src/main/java/org/openslx/imagemaster/serverconnection/Connection.java @@ -0,0 +1,30 @@ +package org.openslx.imagemaster.serverconnection; + +public class Connection +{ + /** + * Where the file is stored locally. + */ + protected final String filepath; + + /** + * Type of this connection. + * True if uploading, false if downloading + */ + protected final boolean type; + public UploadingImage image = null; + public final static boolean UPLOADING = true; + public final static boolean DOWNLOADING = false; + + /** + * Create a new connection data + * @param filepath Where the file is stored locally + * @param type True if uploading, false if downloading + * @param listenerThread The active listener thread that listens for incoming connections + */ + protected Connection(String filepath, boolean type) + { + this.filepath = filepath; + this.type = type; + } +} -- cgit v1.2.3-55-g7522