summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/thrift/server
diff options
context:
space:
mode:
authorSimon Rettberg2014-04-24 18:59:35 +0200
committerSimon Rettberg2014-04-24 18:59:35 +0200
commited787b6f67954faab790cab107503eac8e6aad3c (patch)
tree6f05300170e670ab5db0ccda62bb918d0371b7ad /src/main/java/org/openslx/imagemaster/thrift/server
parentFix name of format style (diff)
parentAdd FTPS to MasterFtpServer (diff)
downloadmasterserver-ed787b6f67954faab790cab107503eac8e6aad3c.tar.gz
masterserver-ed787b6f67954faab790cab107503eac8e6aad3c.tar.xz
masterserver-ed787b6f67954faab790cab107503eac8e6aad3c.zip
Merge branch 'master' of dnbd3:bwlp/masterserver
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/thrift/server')
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java38
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/server/TBinaryProtocolSafe.java7
2 files changed, 25 insertions, 20 deletions
diff --git a/src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java b/src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java
index 899af1a..16496a2 100644
--- a/src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java
+++ b/src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java
@@ -16,12 +16,12 @@ import org.openslx.imagemaster.thrift.iface.UserInfo;
public class ImageServerHandler implements ImageServer.Iface
{
private static Logger log = Logger.getLogger( ImageServerHandler.class );
-
+
@Override
public boolean ping() throws TException
{
- log.debug("Ping...");
- // TODO: Return false if service unavailable but running
+ log.debug( "Ping..." );
+ // Return false if service unavailable but running
return true;
}
@@ -40,29 +40,33 @@ public class ImageServerHandler implements ImageServer.Iface
}
@Override
- public String startServerAuthentication(String organization)
- throws TException {
- return ApiServer.startServerAuthentication(organization);
+ public String startServerAuthentication( String organization )
+ throws TException
+ {
+ return ApiServer.startServerAuthentication( organization );
}
@Override
- public ServerSessionData serverAuthenticate(String organization,
- String challengeResponse) throws AuthenticationException,
- TException {
- return ApiServer.serverAuthenticate(organization, challengeResponse);
+ public ServerSessionData serverAuthenticate( String organization,
+ String challengeResponse ) throws AuthenticationException,
+ TException
+ {
+ return ApiServer.serverAuthenticate( organization, challengeResponse );
}
@Override
- public FtpCredentials submitImage(String serverSessionId,
- ImageData imageDescription) throws AuthorizationException,
- TException {
- return ApiServer.submitImage(serverSessionId, imageDescription);
+ public FtpCredentials submitImage( String serverSessionId,
+ ImageData imageDescription ) throws AuthorizationException,
+ TException
+ {
+ return ApiServer.submitImage( serverSessionId, imageDescription );
}
@Override
- public boolean finshedUpload(String serverSessionId,
- ImageData imageDescription) throws AuthorizationException {
- return ApiServer.finishedUpload(serverSessionId, imageDescription);
+ public boolean finshedUpload( String serverSessionId,
+ ImageData imageDescription ) throws AuthorizationException
+ {
+ return ApiServer.finishedUpload( serverSessionId, imageDescription );
}
}
diff --git a/src/main/java/org/openslx/imagemaster/thrift/server/TBinaryProtocolSafe.java b/src/main/java/org/openslx/imagemaster/thrift/server/TBinaryProtocolSafe.java
index 614be22..08654d6 100644
--- a/src/main/java/org/openslx/imagemaster/thrift/server/TBinaryProtocolSafe.java
+++ b/src/main/java/org/openslx/imagemaster/thrift/server/TBinaryProtocolSafe.java
@@ -18,12 +18,13 @@ import org.apache.thrift.transport.TTransport;
*/
public class TBinaryProtocolSafe extends TBinaryProtocol
{
-
/**
* Factory
*/
+ @SuppressWarnings( "serial" )
public static class Factory implements TProtocolFactory
{
+
protected boolean strictRead_ = false;
protected boolean strictWrite_ = true;
@@ -75,7 +76,7 @@ public class TBinaryProtocolSafe extends TBinaryProtocol
if ( version != VERSION_1 ) {
throw new TProtocolException( TProtocolException.BAD_VERSION, "Bad version in readMessageBegin" );
}
- return new TMessage( readString(), (byte)( size & 0x000000ff ), readI32() );
+ return new TMessage( readString(), (byte) ( size & 0x000000ff ), readI32() );
} else {
if ( strictRead_ ) {
throw new TProtocolException( TProtocolException.BAD_VERSION, "Missing version in readMessageBegin, old client?" );
@@ -113,7 +114,7 @@ public class TBinaryProtocolSafe extends TBinaryProtocol
return bb;
}
- byte[] buf = new byte[size];
+ byte[] buf = new byte[ size ];
trans_.readAll( buf, 0, size );
return ByteBuffer.wrap( buf );
}