}
@SuppressWarnings("rawtypes")
private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTxContext context) {
SimpleWebSocket ws = new SimpleWebSocket(context.getProtocolHandler());
AsyncHttpProviderConfig config = context.getProvider().getClientConfig().getAsyncHttpProviderConfig();
boolean bufferFragments = true;
if (config instanceof GrizzlyAsyncHttpProviderConfig) {
bufferFragments = (Boolean) ((GrizzlyAsyncHttpProviderConfig) config)
.getProperty(GrizzlyAsyncHttpProviderConfig.Property.BUFFER_WEBSOCKET_FRAGMENTS);
}