Examples of MessageListener


Examples of javax.jms.MessageListener

   {
      if (trace) { log.trace("setMessageListener()"); }
     
      MethodInvocation mi = (MethodInvocation)invocation;
     
      MessageListener listener = (MessageListener)mi.getArguments()[0];
     
      if (listener == null)
      {
         throw new IllegalStateException("Cannot set a null MessageListener on the session");
      }

Examples of javax.jms.MessageListener

   {
      JBossConnectionFactory cf1 = (JBossConnectionFactory)ic[1].lookup("/ConnectionFactory");
      Connection conn1 = cf1.createConnection();
      Session sess1 = conn1.createSession(false, Session.CLIENT_ACKNOWLEDGE);
      MessageConsumer cons1 = sess1.createConsumer(queue[1]);
      cons1.setMessageListener(new MessageListener() {
         public void onMessage(Message m)
         {
            try
            {
               log.error("receiving " + m);

Examples of listeners.MessageListener

          ListenerManager<? extends PircBotX> l = bot.getListenerManager();
          l.addListener(conndat);
          l.addListener(new RoomListener(nc));
          l.addListener(new ServerListener(nc));
          l.addListener(new UserListener(nc));
          l.addListener(new MessageListener(nc));
          l.addListener(new ScriptListener(nc));
          l.addListener(new DisconnectListener(nc));
          // connecting to server
          try {
            attemptToConnect(cs);

Examples of net.rim.device.api.io.messaging.MessageListener

            nonBlockRecvDest =
                    (NonBlockingReceiverDestination) DestinationFactory
                            .getReceiverDestination(URI.create(uriStr));
            if (nonBlockRecvDest == null) // Not registered yet
            {
                final MessageListener responseListener =
                        new DestinationListener("NonBlockingReceiverBES", true);

                // Prepare the in-bound destination for incoming messages
                // (BES/http)
                final InboundDestinationConfiguration config =

Examples of net.sf.myway.gps.garmin.unit.MessageListener

  public GarminSerialDownloadHandler(final ProtocolListener unit, final ProtocolFinder finder,
    final InputStream gpsInputStream, final SerialPort serialPort) {
    try {
      _reader = new SerialMessageReader(gpsInputStream);
      serialPort.addEventListener(_reader);
      _reader.addMessageListener(new MessageListener() {
        @Override
        public void messageReceived(final GarminMessage m) {
          _log.info("received " + m);
          if (_currentProtocol == null)
            _currentProtocol = finder.findProtocol(m);

Examples of net.sf.saxon.s9api.MessageListener

                                       new XdmAtomicValue(entry.getValue()));
                }

               
                trans.setMessageListener(
                   new MessageListener(){
                       @Override
                       public void message(XdmNode xn, boolean bln, SourceLocator sl) {
                            String msg = "[XSLT MSG] " + xn.getStringValue();
                            updateMessage(msg);
                       }

Examples of nu.fw.jeti.events.MessageListener

  }
 
  /*-------------------------------Message-------------------------*/
  private void message(Message message)
  {
    MessageListener messageListener = backend.getMessageListener(message.getFrom());
    if(messageListener != null)
    {
      messageListener.message(message);
       return;
    }
   
    if (message.getBody() != null || message.getType().equals("groupchat"))
    {

Examples of org.apache.catalina.cluster.MessageListener

                        log.warn("Context manager doesn't exist:" + ctxname);
                }//end if
            else {
                //invoke all the listeners
                for ( int i=0; i<clusterListeners.size(); i++ ) {
                    MessageListener listener = (MessageListener)clusterListeners.elementAt(i);
                    if ( myobj!=null &&
                         myobj instanceof ClusterMessage &&
                         listener.accept((ClusterMessage)myobj) ) {
                        listener.messageReceived((ClusterMessage)myobj);
                    }//end if
                   
                }//for
            }//end if
               

Examples of org.apache.catalina.tribes.MessageListener

            if (aCluster instanceof SimpleTcpCluster) {
                // Store nested <Listener> elements
                LifecycleListener listeners[] = ((SimpleTcpCluster)cluster).findLifecycleListeners();
                storeElementArray(aWriter, indent, listeners);
                // Store nested <ClusterListener> elements
                MessageListener mlisteners[] = ((SimpleTcpCluster)cluster).findClusterListeners();
                storeElementArray(aWriter, indent, mlisteners);
            }           
        }
    }

Examples of org.apache.helix.MessageListener

                                                 changeContext);

      }
      else if (_changeType == MESSAGE)
      {
        MessageListener messageListener = (MessageListener) _listener;
        subscribeForChanges(changeContext, _path, true, false);
        String instanceName = PropertyPathConfig.getInstanceNameFromPath(_path);
        List<Message> messages =
            _accessor.getChildValues(keyBuilder.messages(instanceName));

        messageListener.onMessage(instanceName, messages, changeContext);

      }
      else if (_changeType == MESSAGES_CONTROLLER)
      {
        MessageListener messageListener = (MessageListener) _listener;
        subscribeForChanges(changeContext, _path, true, false);
        List<Message> messages =
            _accessor.getChildValues(keyBuilder.controllerMessages());

        messageListener.onMessage(_manager.getInstanceName(), messages, changeContext);

      }
      else if (_changeType == EXTERNAL_VIEW)
      {
        ExternalViewChangeListener externalViewListener =
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.