Examples of UpstreamMessageEvent


Examples of org.jboss.netty.channel.UpstreamMessageEvent

               }
            }
            active = true;
            handShakeFuture.run();
         }
         MessageEvent event = new UpstreamMessageEvent(e.getChannel(), response.getContent(), e.getRemoteAddress());
         waitingGet = false;
         ctx.sendUpstream(event);
      }
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

      HttpRequest request = (HttpRequest)e.getMessage();
      HttpMethod method = request.getMethod();
      // if we are a post then we send upstream, otherwise we are just being prompted for a response.
      if (method.equals(HttpMethod.POST))
      {
         MessageEvent event = new UpstreamMessageEvent(e.getChannel(), request.getContent(), e.getRemoteAddress());
         ctx.sendUpstream(event);
      }
      // add a new response
      responses.put(new ResponseHolder(System.currentTimeMillis() + responseTime,
                                       new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK)));
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

               }
            }
            active = true;
            handShakeFuture.run();
         }
         MessageEvent event = new UpstreamMessageEvent(e.getChannel(), response.getContent(), e.getRemoteAddress());
         waitingGet = false;
         ctx.sendUpstream(event);
      }
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

               }
            }
            active = true;
            handShakeFuture.run();
         }
         MessageEvent event = new UpstreamMessageEvent(e.getChannel(), response.getContent(), e.getRemoteAddress());
         waitingGet = false;
         ctx.sendUpstream(event);
      }
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

        log.debug(new String(Arrays.toString(array)));
        return;
      }

      final MessageEvent eventOut =
          new UpstreamMessageEvent(eventIn.getChannel(), messageDDF,
              null);

      context.sendUpstream(eventOut);

    } else {
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

               }
            }
            active = true;
            handShakeFuture.run();
         }
         MessageEvent event = new UpstreamMessageEvent(e.getChannel(), response.getContent(), e.getRemoteAddress());
         waitingGet = false;
         ctx.sendUpstream(event);
      }
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

        log.debug(new String(Arrays.toString(array)));
        return;
      }

      final MessageEvent eventOut =
          new UpstreamMessageEvent(eventIn.getChannel(), messageDDF,
              null);

      context.sendUpstream(eventOut);

    } else {
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

        final Object originalMessage = e.getMessage();
        final Object decodedMessage = decode(ctx, e.getChannel(), originalMessage);
        if (originalMessage == decodedMessage)
            ctx.sendUpstream(evt);
        else if (decodedMessage != null)
            ctx.sendUpstream(new UpstreamMessageEvent(ctx.getChannel(), decodedMessage, e.getRemoteAddress())); // Channels.fireMessageReceived(ctx, decodedMessage, e.getRemoteAddress());
    }
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

                    break;
            }
        }

        if (e instanceof UpstreamMessageEvent) {
            UpstreamMessageEvent ume = (UpstreamMessageEvent) e;
            if (ume.getMessage() instanceof ChannelBuffer) {
                ChannelBuffer cb = (ChannelBuffer) ume.getMessage();
                int readableBytes = cb.readableBytes();
                //  compute stats here, bytes read from remote
                bytesRead.getAndAdd(readableBytes);
            }
        }
View Full Code Here

Examples of org.jboss.netty.channel.UpstreamMessageEvent

               }
            }
            active = true;
            handShakeFuture.run();
         }
         MessageEvent event = new UpstreamMessageEvent(e.getChannel(), response.getContent(), e.getRemoteAddress());
         waitingGet = false;
         ctx.sendUpstream(event);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.