summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schulthess2017-05-18 13:24:33 +0200
committerChristoph Schulthess2017-05-18 13:24:33 +0200
commit53aa1a67c2deeb4cff989571413d966541a8cc8a (patch)
tree40b86cfc449215274a0076b347c16811499b4207
parentRemoteDebug w/o extensive logging (diff)
downloadtmlite-bwlp-53aa1a67c2deeb4cff989571413d966541a8cc8a.tar.gz
tmlite-bwlp-53aa1a67c2deeb4cff989571413d966541a8cc8a.tar.xz
tmlite-bwlp-53aa1a67c2deeb4cff989571413d966541a8cc8a.zip
removed debug informationremote-debug
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/RemoteDebug.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/RemoteDebug.java b/src/main/java/org/openslx/taskmanager/tasks/RemoteDebug.java
index a30db08..fd4bec3 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/RemoteDebug.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/RemoteDebug.java
@@ -118,7 +118,7 @@ public class RemoteDebug extends AbstractTask
* @param poolSock - SSLSocket retrieved via srvSock.accept()
* Create and start the two necessary relays. Join them, so that proper postcondition is enforced.
*/
- private void relay( SSLSocket dbgSock, SSLSocket poolSock ) {
+ protected void relay( SSLSocket dbgSock, SSLSocket poolSock ) {
Relay toDbg = new Relay( poolSock, dbgSock, status );
Relay toPool = new Relay( dbgSock, poolSock, status );
toDbg.setName( "PoolToDebug" );
@@ -169,7 +169,7 @@ public class RemoteDebug extends AbstractTask
* @return SSLServerSocket
* @throws IOException
*/
- private SSLServerSocket getSrvSock( SSLContext ctx ) throws IOException
+ protected SSLServerSocket getSrvSock( SSLContext ctx ) throws IOException
{
status.addMessage( "INFO: Creating server socket." );
SSLServerSocketFactory sssf = ctx.getServerSocketFactory();
@@ -184,7 +184,7 @@ public class RemoteDebug extends AbstractTask
* @return SSLSocket
* @throws IOException
*/
- private SSLSocket getDbgSock( SSLContext ctx ) throws IOException
+ protected SSLSocket getDbgSock( SSLContext ctx ) throws IOException
{
status.addMessage( "INFO: Creating debug socket." );
SSLSocketFactory ssf = ctx.getSocketFactory();
@@ -214,12 +214,12 @@ public class RemoteDebug extends AbstractTask
protected String messages = null;
protected Date d = null;
- protected InetAddress cltAddr = null;
+ protected String cltAddr = null;
protected int listenPort = -1;
public void setListenPort ( int port ) { listenPort = port; }
public int getListenPort () { return listenPort; }
- public void setCltAddr ( InetAddress addr ) { cltAddr = addr; }
+ public void setCltAddr ( InetAddress addr ) { cltAddr = addr.getHostAddress(); }
public void addMessage( String str )
{
@@ -258,7 +258,6 @@ public class RemoteDebug extends AbstractTask
int readBytes;
try ( InputStream in = srcSock.getInputStream();
OutputStream out = destSock.getOutputStream() ) {
- status.addMessage( "INFO: " + this.getName() );
while( active ) {
readBytes = in.read( buffer );
out.write( buffer, 0, readBytes );
@@ -268,19 +267,19 @@ public class RemoteDebug extends AbstractTask
}
}
} catch ( Exception e ) {
- status.addMessage( "DEBUG: " + this.getName() + " - " + getStrStackTrace( e ) );
+ //status.addMessage( "DEBUG: " + this.getName() + " - " + getStrStackTrace( e ) );
active = false;
return;
}
}
}
- public static String getStrStackTrace(Throwable aThrowable) {
- Writer result = new StringWriter();
- PrintWriter printWriter = new PrintWriter(result);
- aThrowable.printStackTrace(printWriter);
- return result.toString();
- }
+// public static String getStrStackTrace(Throwable aThrowable) {
+// Writer result = new StringWriter();
+// PrintWriter printWriter = new PrintWriter(result);
+// aThrowable.printStackTrace(printWriter);
+// return result.toString();
+// }
}