JSR-356 Improving Debugging of Annotated EventDrivers
This commit is contained in:
parent
2f01bdcdec
commit
9a8580b580
|
@ -144,15 +144,22 @@ public class JsrAnnotatedEventDriver extends AbstractJsrEventDriver implements E
|
|||
@Override
|
||||
public void onBinaryMessage(byte[] data)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ByteBuffer buf = ByteBuffer.wrap(data);
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
{
|
||||
LOG.debug("onBinary({})",data);
|
||||
LOG.debug("onBinaryMessage({})",BufferUtil.toDetailString(buf));
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// FIN is always true here
|
||||
events.callBinary(jsrsession.getAsyncRemote(),websocket,ByteBuffer.wrap(data),true);
|
||||
events.callBinary(jsrsession.getAsyncRemote(),websocket,buf,true);
|
||||
}
|
||||
catch (DecodeException e)
|
||||
{
|
||||
|
|
|
@ -83,4 +83,16 @@ public class AnnotatedServerEndpointMetadata extends AnnotatedEndpointMetadata<S
|
|||
{
|
||||
return config.getPath();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("AnnotatedServerEndpointMetadata[endpoint=");
|
||||
builder.append(endpoint);
|
||||
builder.append(",config=");
|
||||
builder.append(config);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue