/** * Add an {@link Handler} mapped to the default, which is '/*' * * @param handler {@link Handler} * @return this */ public Builder resource(Handler handler) { return resource("/*", handler); }
@Override public AsyncIOWriter write(AtmosphereResponse response, byte[] data) throws IOException { write(response, data, 0, data.length); return this; }
/** * Return the {@link org.atmosphere.cpr.AtmosphereFramework} instance * * @return the {@link AtmosphereFramework} instance */ public AtmosphereFramework framework() { return runtime.framework(); }
StreamWriter writer = new StreamWriter("c:\\KBTest.txt"); writer.WriteLine("File created using StreamWriter class."); writer.Close(); this.listbox1.Items.Clear(); addListItem("File Written to C:\\KBTest.txt");
public RuntimeEngine(BridgeRuntime runtime) { this.runtime = runtime; this.httpChannels = runtime.httpChannels(); this.websocketChannels = runtime.websocketChannels(); }
string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); string filename = Path.Combine(path, "myfile.txt"); using (var streamWriter = new StreamWriter(filename, true)) { streamWriter.WriteLine(DateTime.UtcNow); } using (var streamReader = new StreamReader(filename)) { string content = streamReader.ReadToEnd(); System.Diagnostics.Debug.WriteLine(content); }
/** * {@inheritDoc} */ @Override public WebSocket write(byte[] data, int offset, int length) throws IOException { _write(data, offset, length); return this; }
/** * Return the {@link ChannelGroup} associated with websocket requests. * * @return the {@link ChannelGroup} associated with websocket requests. */ public ChannelGroup websocketChannels() { return runtime.websocketChannels(); }
/** * Return the {@link ChannelGroup} associated with HTTP requests. * * @return the {@link ChannelGroup} associated with HTTP requests. */ public ChannelGroup httpChannels() { return runtime.httpChannels(); }
@Override public void operationComplete(ChannelFuture future) throws Exception { prepareForClose(response); } });
public NettyChannelInitializer(final BridgeRuntime bridgeRuntime) { this.bridgeRuntime = bridgeRuntime; config = bridgeRuntime.config(); }
/** * Add an {@link Handler} mapped to the default, which is '/*' * * @param handler {@link Handler} * @return this */ public Builder resource(Handler handler) { return resource("/*", handler); }
public RuntimeEngine(BridgeRuntime runtime) { this.runtime = runtime; this.httpChannels = runtime.httpChannels(); this.websocketChannels = runtime.websocketChannels(); }
/** * {@inheritDoc} */ @Override public WebSocket write(byte[] data, int offset, int length) throws IOException { _write(data, offset, length); return this; }
@Override public AsyncIOWriter write(AtmosphereResponse response, byte[] data) throws IOException { write(response, data, 0, data.length); return this; }
/** * Return the {@link org.atmosphere.cpr.AtmosphereFramework} instance * * @return the {@link AtmosphereFramework} instance */ public AtmosphereFramework framework() { return runtime.framework(); }
/** * Return the {@link ChannelGroup} associated with websocket requests. * * @return the {@link ChannelGroup} associated with websocket requests. */ public ChannelGroup websocketChannels() { return runtime.websocketChannels(); }
/** * Return the {@link ChannelGroup} associated with HTTP requests. * * @return the {@link ChannelGroup} associated with HTTP requests. */ public ChannelGroup httpChannels() { return runtime.httpChannels(); }
@Override public void operationComplete(ChannelFuture future) throws Exception { prepareForClose(response); } });
public WebSocket write(byte[] data) throws IOException { _write(data, 0, data.length); return this; }