summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
+// }
}