Examples of registerCallback()


Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

        if (null == os) {
            return;
        }

        WriteOnCloseOutputStream stream = createCachedStream(message, os);
        stream.registerCallback(new RecorderCallback());
    }
   
   
    public static WriteOnCloseOutputStream createCachedStream(Message message, OutputStream os) {
        // We need to ensure that we have an output stream which won't start writing the
View Full Code Here

Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

            // error does not reach the client when retransmission is scheduled
            message.setContent(Exception.class, null);
            message.getExchange().put(Exception.class, null);
        } else {
            WriteOnCloseOutputStream stream = RMUtils.createCachedStream(message, os);
            stream.registerCallback(new RetransmissionCallback(message, getManager()));
        }
    }
}
   
   
View Full Code Here

Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

        if (null == os) {
            return;
        }

        WriteOnCloseOutputStream stream = RMUtils.createCachedStream(message, os);
        stream.registerCallback(new RecorderCallback());
    }
   
    public List<byte[]> getOutboundMessages() {
        return outbound;
    }
View Full Code Here

Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

        if (null == os) {
            return;
        }

        WriteOnCloseOutputStream stream = RMUtils.createCachedStream(message, os);
        stream.registerCallback(new RecorderCallback());
    }
   
    public List<byte[]> getOutboundMessages() {
        return outbound;
    }
View Full Code Here

Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

            // error does not reach the client when retransmission is scheduled
            message.setContent(Exception.class, null);
            message.getExchange().put(Exception.class, null);
        } else {
            WriteOnCloseOutputStream stream = RMUtils.createCachedStream(message, os);
            stream.registerCallback(new RetransmissionCallback(message, getManager()));
        }
    }
}
   
   
View Full Code Here

Examples of org.apache.cxf.io.WriteOnCloseOutputStream.registerCallback()

        if (null == os) {
            return;
        }

        WriteOnCloseOutputStream stream = createCachedStream(message, os);
        stream.registerCallback(new RecorderCallback());
    }
   
   
    public static WriteOnCloseOutputStream createCachedStream(Message message, OutputStream os) {
        // We need to ensure that we have an output stream which won't start writing the
View Full Code Here

Examples of org.apache.helix.ipc.netty.NettyHelixIPCService.registerCallback()

    final ConcurrentMap<String, AtomicInteger> firstCounts =
        new ConcurrentHashMap<String, AtomicInteger>();
    final HelixIPCService firstIPC =
        new NettyHelixIPCService(new NettyHelixIPCService.Config().setInstanceName(
            firstNode.getInstanceName()).setPort(firstPort));
    firstIPC.registerCallback(messageType, new HelixIPCCallback() {
      @Override
      public void onMessage(HelixMessageScope scope, UUID messageId, ByteBuf message) {
        String key = scope.getPartition() + ":" + scope.getState();
        firstCounts.putIfAbsent(key, new AtomicInteger());
        firstCounts.get(key).incrementAndGet();
View Full Code Here

Examples of org.apache.helix.ipc.netty.NettyHelixIPCService.registerCallback()

    final ConcurrentMap<String, AtomicInteger> secondCounts =
        new ConcurrentHashMap<String, AtomicInteger>();
    final HelixIPCService secondIPC =
        new NettyHelixIPCService(new NettyHelixIPCService.Config().setInstanceName(
            secondNode.getInstanceName()).setPort(secondPort));
    secondIPC.registerCallback(messageType, new HelixIPCCallback() {
      @Override
      public void onMessage(HelixMessageScope scope, UUID messageId, ByteBuf message) {
        String key = scope.getPartition() + ":" + scope.getState();
        secondCounts.putIfAbsent(key, new AtomicInteger());
        secondCounts.get(key).incrementAndGet();
View Full Code Here

Examples of org.apache.helix.ipc.netty.NettyHelixIPCService.registerCallback()

    // First IPC service
    final HelixIPCService firstIPC =
        new NettyHelixIPCService(new NettyHelixIPCService.Config().setInstanceName(
            firstNode.getInstanceName()).setPort(firstPort));
    firstIPC.registerCallback(messageType, new HelixIPCCallback() {
      final Random random = new Random();

      @Override
      public void onMessage(HelixMessageScope scope, UUID messageId, ByteBuf message) {
        if (random.nextInt() % 2 == 0) {
View Full Code Here

Examples of org.apache.helix.ipc.netty.NettyHelixIPCService.registerCallback()

    // Second IPC service
    final HelixIPCService secondIPC =
        new NettyHelixIPCService(new NettyHelixIPCService.Config().setInstanceName(
            secondNode.getInstanceName()).setPort(secondPort));
    secondIPC.registerCallback(messageType, new HelixIPCCallback() {
      final Random random = new Random();

      @Override
      public void onMessage(HelixMessageScope scope, UUID messageId, ByteBuf message) {
        if (random.nextInt() % 2 == 0) {
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.