Improved dump() output.
This commit is contained in:
parent
395e8f1c8b
commit
75cc42a647
|
@ -563,4 +563,11 @@ public class WebSocketClient extends ContainerLifeCycle implements SessionListen
|
||||||
{
|
{
|
||||||
this.sessionFactory = sessionFactory;
|
this.sessionFactory = sessionFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dump(Appendable out, String indent) throws IOException
|
||||||
|
{
|
||||||
|
dumpThis(out);
|
||||||
|
dump(out, indent, getOpenSessions());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class WebSocketSession extends ContainerLifeCycle implements Session, Inc
|
||||||
@Override
|
@Override
|
||||||
public void dump(Appendable out, String indent) throws IOException
|
public void dump(Appendable out, String indent) throws IOException
|
||||||
{
|
{
|
||||||
super.dump(out, indent);
|
dumpThis(out);
|
||||||
out.append(indent).append(" +- incomingHandler : ");
|
out.append(indent).append(" +- incomingHandler : ");
|
||||||
if (incomingHandler instanceof Dumpable)
|
if (incomingHandler instanceof Dumpable)
|
||||||
{
|
{
|
||||||
|
@ -134,7 +134,7 @@ public class WebSocketSession extends ContainerLifeCycle implements Session, Inc
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out.append(incomingHandler.toString()).append('\n');
|
out.append(incomingHandler.toString()).append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
|
|
||||||
out.append(indent).append(" +- outgoingHandler : ");
|
out.append(indent).append(" +- outgoingHandler : ");
|
||||||
|
@ -144,7 +144,7 @@ public class WebSocketSession extends ContainerLifeCycle implements Session, Inc
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out.append(outgoingHandler.toString()).append('\n');
|
out.append(outgoingHandler.toString()).append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,13 +110,13 @@ public class ExtensionStack extends ContainerLifeCycle implements IncomingFrames
|
||||||
IncomingFrames websocket = getLastIncoming();
|
IncomingFrames websocket = getLastIncoming();
|
||||||
OutgoingFrames network = getLastOutgoing();
|
OutgoingFrames network = getLastOutgoing();
|
||||||
|
|
||||||
out.append(indent).append(" +- Stack\n");
|
out.append(indent).append(" +- Stack").append(System.lineSeparator());
|
||||||
out.append(indent).append(" +- Network : ").append(network.toString()).append('\n');
|
out.append(indent).append(" +- Network : ").append(network.toString()).append(System.lineSeparator());
|
||||||
for (Extension ext : extensions)
|
for (Extension ext : extensions)
|
||||||
{
|
{
|
||||||
out.append(indent).append(" +- Extension: ").append(ext.toString()).append('\n');
|
out.append(indent).append(" +- Extension: ").append(ext.toString()).append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
out.append(indent).append(" +- Websocket: ").append(websocket.toString()).append('\n');
|
out.append(indent).append(" +- Websocket: ").append(websocket.toString()).append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManagedAttribute(name = "Extension List", readonly = true)
|
@ManagedAttribute(name = "Extension List", readonly = true)
|
||||||
|
@ -308,7 +308,8 @@ public class ExtensionStack extends ContainerLifeCycle implements IncomingFrames
|
||||||
{
|
{
|
||||||
StringBuilder s = new StringBuilder();
|
StringBuilder s = new StringBuilder();
|
||||||
s.append("ExtensionStack[");
|
s.append("ExtensionStack[");
|
||||||
s.append("extensions=");
|
s.append("queueSize=").append(entries.size());
|
||||||
|
s.append(",extensions=");
|
||||||
if (extensions == null)
|
if (extensions == null)
|
||||||
{
|
{
|
||||||
s.append("<null>");
|
s.append("<null>");
|
||||||
|
|
|
@ -36,6 +36,8 @@ import org.eclipse.jetty.io.Connection;
|
||||||
import org.eclipse.jetty.io.EndPoint;
|
import org.eclipse.jetty.io.EndPoint;
|
||||||
import org.eclipse.jetty.util.BufferUtil;
|
import org.eclipse.jetty.util.BufferUtil;
|
||||||
import org.eclipse.jetty.util.StringUtil;
|
import org.eclipse.jetty.util.StringUtil;
|
||||||
|
import org.eclipse.jetty.util.component.ContainerLifeCycle;
|
||||||
|
import org.eclipse.jetty.util.component.Dumpable;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
import org.eclipse.jetty.util.thread.Scheduler;
|
import org.eclipse.jetty.util.thread.Scheduler;
|
||||||
|
@ -60,7 +62,7 @@ import org.eclipse.jetty.websocket.common.io.IOState.ConnectionStateListener;
|
||||||
* Provides the implementation of {@link LogicalConnection} within the
|
* Provides the implementation of {@link LogicalConnection} within the
|
||||||
* framework of the new {@link Connection} framework of {@code jetty-io}.
|
* framework of the new {@link Connection} framework of {@code jetty-io}.
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractWebSocketConnection extends AbstractConnection implements LogicalConnection, ConnectionStateListener
|
public abstract class AbstractWebSocketConnection extends AbstractConnection implements LogicalConnection, ConnectionStateListener, Dumpable
|
||||||
{
|
{
|
||||||
private class Flusher extends FrameFlusher
|
private class Flusher extends FrameFlusher
|
||||||
{
|
{
|
||||||
|
@ -565,10 +567,22 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String dump()
|
||||||
|
{
|
||||||
|
return ContainerLifeCycle.dump(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dump(Appendable out, String indent) throws IOException
|
||||||
|
{
|
||||||
|
out.append(toString()).append(System.lineSeparator());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return String.format("%s{g=%s,p=%s}",super.toString(),generator,parser);
|
return String.format("%s{f=%s,g=%s,p=%s}",super.toString(),flusher,generator,parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue