summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/thrift
diff options
context:
space:
mode:
authorNils Schwabe2014-04-23 15:10:36 +0200
committerNils Schwabe2014-04-23 15:10:36 +0200
commitf71e8a5bcd2d7f85f58fedf3f6ea8dc8c7f89b63 (patch)
tree5a79e7f320e6ca76ade3cf8039079d182f0178ad /src/main/java/org/openslx/imagemaster/thrift
parentFix some issues with FtpCredentialsScheduler (diff)
downloadmasterserver-f71e8a5bcd2d7f85f58fedf3f6ea8dc8c7f89b63.tar.gz
masterserver-f71e8a5bcd2d7f85f58fedf3f6ea8dc8c7f89b63.tar.xz
masterserver-f71e8a5bcd2d7f85f58fedf3f6ea8dc8c7f89b63.zip
Reformat all files with simon's new layout
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/thrift')
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java36
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/server/TBinaryProtocolSafe.java6
2 files changed, 23 insertions, 19 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 60ae19a..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,11 +16,11 @@ 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...");
+ 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 f30ba00..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,13 +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;
@@ -76,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?" );
@@ -114,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 );
}