public SockJsConfig config() { return service.config(); }
/** * The prefix, or name, of the service. * For example, in the url "http://localhost/echo/111/12345/xhr", 'echo' is the prefix. * * @param prefix the prefix/name of the SockJS service. */ public static Builder withPrefix(final String prefix) { ArgumentUtil.checkNotNullAndNotEmpty(prefix, "prefix"); return new Builder(prefix); }
public void onOpen(final SockJsSessionContext session) { setState(State.OPEN); service.onOpen(session); updateTimestamp(); }
/** * Sole constructor which takes one or more {@code SockJSServiceFactory}. These factories will * later be used by the server to create the SockJS services that will be exposed by this server * * @param factories one or more {@link SockJsServiceFactory}s. */ public SockJsHandler(final SockJsServiceFactory... factories) { for (SockJsServiceFactory factory : factories) { this.factories.put(factory.config().prefix(), factory); } }
public void onMessage(final String message) throws Exception { service.onMessage(message); updateTimestamp(); }
private boolean maxBytesLimit(final int bytesWritten) { bytesSent.addAndGet(bytesWritten); return bytesSent.get() >= config.maxStreamingBytesSize(); }
/** * Builds Config with the previously set values. * * @return {@link SockJsConfig} the configuration for the SockJS service. */ public SockJsConfig build() { if (tls && (keyStore == null || keyStorePassword == null)) { throw new IllegalStateException("keyStore and keyStorePassword must be specified if 'tls' is enabled"); } return new SockJsConfig(this); } }
public void onOpen(final SockJsSessionContext session) { setState(State.OPEN); service.onOpen(session); updateTimestamp(); }
/** * Sole constructor which takes one or more {@code SockJSServiceFactory}. These factories will * later be used by the server to create the SockJS services that will be exposed by this server * * @param factories one or more {@link SockJsServiceFactory}s. */ public SockJsHandler(final SockJsServiceFactory... factories) { for (SockJsServiceFactory factory : factories) { this.factories.put(factory.config().prefix(), factory); } }
/** * The prefix, or name, of the service. * For example, in the url "http://localhost/echo/111/12345/xhr", 'echo' is the prefix. * * @param prefix the prefix/name of the SockJS service. */ public static Builder withPrefix(final String prefix) { ArgumentUtil.checkNotNullAndNotEmpty(prefix, "prefix"); return new Builder(prefix); }
public void onMessage(final String message) throws Exception { service.onMessage(message); updateTimestamp(); }
private boolean maxBytesLimit(final int bytesWritten) { bytesSent.addAndGet(bytesWritten); return bytesSent.get() >= config.maxStreamingBytesSize(); }
public SockJsConfig config() { return service.config(); }
/** * Builds Config with the previously set values. * * @return {@link SockJsConfig} the configuration for the SockJS service. */ public SockJsConfig build() { if (tls && (keyStore == null || keyStorePassword == null)) { throw new IllegalStateException("keyStore and keyStorePassword must be specified if 'tls' is enabled"); } return new SockJsConfig(this); } }
private boolean maxBytesLimit(final int bytesWritten) { bytesSent.addAndGet(bytesWritten); return bytesSent.get() >= config.maxStreamingBytesSize(); }
private boolean maxBytesLimit(final int bytesWritten) { bytesSent.addAndGet(bytesWritten); return bytesSent.get() >= config.maxStreamingBytesSize(); }
private boolean maxBytesLimit(final int bytesWritten) { bytesSent.addAndGet(bytesWritten); return bytesSent.get() >= config.maxStreamingBytesSize(); }
private boolean maxBytesLimit(final int bytesWritten) { bytesSent.addAndGet(bytesWritten); return bytesSent.get() >= config.maxStreamingBytesSize(); }