@Test public void negotiateShouldAddTimeoutParameter() throws Exception { PingPongExtension extension = (PingPongExtension) factory.negotiate(requested, extensionHelper, address); assertEquals(extensionName, extension.getExtensionHeader().getExtensionToken()); assertEquals(Utils.toHex(PingPongExtension.CONTROL_BYTES), extension.getExtensionHeader().getParameters().get(0).getName()); }
@Override public WebSocketExtension negotiate(ExtensionHeader requestedExtension, ExtensionHelper extensionHelper, WsResourceAddress address) throws ProtocolException { return new PingPongExtension(requestedExtension, extensionHelper); }
PingPongExtensionFactory extends WebSocketExtensionFactorySpi { @Override public WebSocketExtension negotiate(ExtensionHeader requestedExtension, ExtensionHelper extensionHelper, WsResourceAddress address) throws ProtocolException { return new PingPongExtension(requestedExtension, extensionHelper); } }
PingPongExtensionFactory extends WebSocketExtensionFactorySpi { @Override public WebSocketExtension negotiate(ExtensionHeader requestedExtension, ExtensionHelper extensionHelper, WsResourceAddress address) throws ProtocolException { return new PingPongExtension(requestedExtension, extensionHelper); }  }
PingPongExtensionFactory extends WebSocketExtensionFactorySpi { @Override public WebSocketExtension negotiate(ExtensionHeader requestedExtension, ExtensionHelper extensionHelper, WsResourceAddress address) throws ProtocolException { return new PingPongExtension(requestedExtension, extensionHelper); }  @Override String getExtensionName(); @Override ExtensionOrderCategory getOrderCategory(); @Override WebSocketExtension offer(ExtensionHelper extensionHelper, WsResourceAddress address); @Override WebSocketExtension negotiate(ExtensionHeader requestedExtension, ExtensionHelper extensionHelper, WsResourceAddress address); }
PingPongExtensionFactory extends WebSocketExtensionFactorySpi { @Override public WebSocketExtension negotiate(ExtensionHeader requestedExtension, ExtensionHelper extensionHelper, WsResourceAddress address) throws ProtocolException { return new PingPongExtension(requestedExtension, extensionHelper); }  @Override String getExtensionName(); @Override ExtensionOrderCategory getOrderCategory(); @Override WebSocketExtension offer(ExtensionHelper extensionHelper, WsResourceAddress address); @Override WebSocketExtension negotiate(ExtensionHeader requestedExtension, ExtensionHelper extensionHelper, WsResourceAddress address);  }