Package org.activemq.message

Examples of org.activemq.message.PacketListener


     * @param packet to consume
     */
    public void consume(Packet packet) {
        //do processing
        //avoid a lock
        PacketListener listener = getPacketListener();
        if (listener != null) {
            listener.consume(packet);
        }
    }
View Full Code Here


              HttpServerTransportChannel transportChannel = getTransportChannel(request);
              if (transportChannel == null) {
                  response.setStatus(HttpServletResponse.SC_NOT_FOUND);
              }
                else {
                    PacketListener packetListener = transportChannel.getPacketListener();
                    if (packetListener == null) {
                        log.error("No packetListener available to process inbound packet: " + packet);
                    }
                    else {
                        packetListener.consume(packet);
                    }
                }
            }
        }
        catch (IOException e) {
View Full Code Here

     * to the ultimate PacketListener (typically the JMS client)
     *
     * @return
     */
    protected PacketListener createPacketListenerSender() {
        return new PacketListener() {
            public void consume(Packet packet) {
                doConsumePacket(packet, getPacketListener());
            }
        };
    }
View Full Code Here

     * to the ultimate PacketListener (typically the JMS client)
     *
     * @return
     */
    protected PacketListener createPacketListenerSender() {
        return new PacketListener() {
            public void consume(Packet packet) {
                doConsumePacket(packet, getPacketListener());
            }
        };
    }
View Full Code Here

    protected void configureChannel() {
        ExceptionListener exceptionListener = getExceptionListener();
        if (exceptionListener != null) {
            channel.setExceptionListener(exceptionListener);
        }
        PacketListener packetListener = getPacketListener();
        if (packetListener != null) {
            channel.setPacketListener(packetListener);
        }
       
        channel.addTransportStatusEventListener(this);
View Full Code Here

     * @param packet to consume
     */
    public void consume(Packet packet) {
        //do processing
        //avoid a lock
        PacketListener listener = getPacketListener();
        if (listener != null) {
            listener.consume(packet);
        }
    }
View Full Code Here

                String message = "Sender got an exception:";
                logMessage(message, ex);
            }
        });

        sender.setPacketListener(new PacketListener() {

            public void consume(Packet packet) {
                System.err.println("Error - sender received a packet: " + packet);
                exceptions.add(packet);
            }
View Full Code Here

TOP

Related Classes of org.activemq.message.PacketListener

Copyright © 2018 www.massapicom. 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.