Пример #1
0
 @Override
 public void process(Channel ctx) {
   if (ctx.isInitial()) {
     return;
   }
   ctx.writeln(ctx.readln().toUpperCase());
 }
Пример #2
0
        @Override
        public void process(Channel ctx) {
          if (ctx.isInitial()) {
            ctx.writeln("Hi there!");
            return;
          }

          eq(ctx.readln(), "HI THERE!");
        }
Пример #3
0
 @Override
 public W write(File file) {
   long size = file.length();
   U.must(size < Integer.MAX_VALUE);
   conn.write(file);
   return wrote((int) size);
 }
Пример #4
0
 @Override
 public W writeln(String s) {
   byte[] bytes = s.getBytes();
   conn.write(bytes);
   conn.write(CR_LF);
   return wrote(bytes.length + 2);
 }
Пример #5
0
 @Override
 public boolean isClosed() {
   return conn.isClosed();
 }
Пример #6
0
 @Override
 public Buf input() {
   return conn.input();
 }
Пример #7
0
 @Override
 public T close() {
   conn.close();
   return meT();
 }
Пример #8
0
 @Override
 public W write(byte[] bytes, int offset, int length) {
   conn.write(bytes, offset, length);
   return wrote(length);
 }
Пример #9
0
 @Override
 public ChannelHolder createHolder() {
   return conn.createHolder();
 }
Пример #10
0
 @Override
 public long connId() {
   return conn.connId();
 }
Пример #11
0
 @Override
 public synchronized boolean isInitial() {
   return conn.isInitial();
 }
Пример #12
0
 @Override
 public InetSocketAddress getAddress() {
   return conn.getAddress();
 }
Пример #13
0
 @Override
 public RapidoidHelper helper() {
   return conn.helper();
 }
Пример #14
0
 @Override
 public String readN(int count) {
   return conn.readN(count);
 }
Пример #15
0
 @Override
 public String readln() {
   return conn.readln();
 }
Пример #16
0
 @Override
 public Buf output() {
   return conn.output();
 }
Пример #17
0
 @Override
 public void waitUntilClosing() {
   conn.waitUntilClosing();
 }
Пример #18
0
 @Override
 public Buf buffer() {
   return conn.input();
 }
Пример #19
0
 @Override
 public void log(String msg) {
   conn.log(msg);
 }
Пример #20
0
 @Override
 public T restart() {
   conn.restart();
   return meT();
 }
Пример #21
0
 @Override
 public synchronized ConnState state() {
   return conn.state();
 }
Пример #22
0
 @Override
 public W async() {
   conn.async();
   return meW();
 }
Пример #23
0
 @Override
 public String address() {
   return conn.address();
 }
Пример #24
0
 @Override
 public boolean isAsync() {
   return conn.isAsync();
 }
Пример #25
0
 @Override
 public W write(byte[] bytes) {
   conn.write(bytes);
   return wrote(bytes.length);
 }
Пример #26
0
 @Override
 public W writeJSON(Object value) {
   conn.writeJSON(value);
   return meW();
 }
Пример #27
0
 @Override
 public W write(ByteBuffer buf) {
   int n = buf.remaining();
   conn.write(buf);
   return wrote(n);
 }
Пример #28
0
 public W send() {
   conn.send();
   return meW();
 }
Пример #29
0
 @Override
 public W done() {
   conn.done();
   return meW();
 }
Пример #30
0
 @Override
 public T closeIf(boolean condition) {
   conn.closeIf(condition);
   return meT();
 }