summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
index 723da9b..0502768 100644
--- a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
+++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
@@ -255,6 +255,11 @@ public class ThriftConnection
return newClient;
}
+ /**
+ * Publish new user to master-server, which insert it to his db.
+ * @param userInfo
+ * @return true, if successful.
+ */
public static boolean publishUser( UserInfo userInfo )
{
ImageServer.Client theClient = null;
@@ -273,6 +278,15 @@ public class ThriftConnection
return false;
}
+ /**
+ * Register new, by master unknown satellite - server with organizationId,
+ * ipAddress and key - information.
+ * @param organizationId
+ * @param ipAddress
+ * @param modulus
+ * @param exponent
+ * @return true, if successful.
+ */
public static boolean registerSatellite( String organizationId, String ipAddress, String modulus, String exponent )
{
ImageServer.Client theClient = null;
@@ -285,4 +299,24 @@ public class ThriftConnection
return false;
}
}
+
+ /**
+ * Update in master - DB existing satellite - ipAddress.
+ * @param ipAddress
+ * @return true, if successful.
+ */
+ public static boolean updateSatelliteAddress(String ipAddress) {
+ ImageServer.Client theClient = null;
+ theClient = getConnection();
+ if ( theClient == null) {
+ log.error( "Client was null!" );
+ return false;
+ }
+ try {
+ return theClient.updateSatelliteAddress( sSD.sessionId, ipAddress );
+ } catch ( TException e ) {
+ log.error( "TException", e );
+ return false;
+ }
+ }
}