TYRUS_CONNECTION.set(ctx.getConnection(), tyrusConnection);
TASK_PROCESSOR.set(ctx.getConnection(), new TaskProcessor());
final String ATTR_NAME = "org.glassfish.tyrus.container.grizzly.WebSocketFilter.HANDSHAKE_PROCESSED";
final AttributeHolder attributeHolder = ctx.getAttributes();
if (attributeHolder != null) {
final Object attribute = attributeHolder.getAttribute(ATTR_NAME);
if (attribute != null) {
// handshake was already performed on this context.
return ctx.getInvokeAction();
} else {
attributeHolder.setAttribute(ATTR_NAME, true);
}
}
if (content.getContent().hasRemaining()) {