Search in sources :

Example 1 with ExtensionFactory

use of org.eclipse.jetty.websocket.api.extensions.ExtensionFactory in project jetty.project by eclipse.

the class ExtensionStackProcessingTest method assumeDeflateFrameAvailable.

private void assumeDeflateFrameAvailable() {
    NativeWebSocketConfiguration configuration = (NativeWebSocketConfiguration) servletContextHandler.getServletContext().getAttribute(NativeWebSocketConfiguration.class.getName());
    ExtensionFactory serverExtensionFactory = configuration.getFactory().getExtensionFactory();
    Assume.assumeTrue("Server has permessage-deflate extension registered", serverExtensionFactory.isAvailable("permessage-deflate"));
}
Also used : NativeWebSocketConfiguration(org.eclipse.jetty.websocket.server.NativeWebSocketConfiguration) ExtensionFactory(org.eclipse.jetty.websocket.api.extensions.ExtensionFactory)

Example 2 with ExtensionFactory

use of org.eclipse.jetty.websocket.api.extensions.ExtensionFactory in project jetty.project by eclipse.

the class ClientContainer method getInstalledExtensions.

@Override
public Set<Extension> getInstalledExtensions() {
    Set<Extension> ret = new HashSet<>();
    ExtensionFactory extensions = client.getExtensionFactory();
    for (String name : extensions.getExtensionNames()) {
        ret.add(new JsrExtension(name));
    }
    return ret;
}
Also used : Extension(javax.websocket.Extension) ExtensionFactory(org.eclipse.jetty.websocket.api.extensions.ExtensionFactory) HashSet(java.util.HashSet)

Aggregations

ExtensionFactory (org.eclipse.jetty.websocket.api.extensions.ExtensionFactory)2 HashSet (java.util.HashSet)1 Extension (javax.websocket.Extension)1 NativeWebSocketConfiguration (org.eclipse.jetty.websocket.server.NativeWebSocketConfiguration)1