Examples of MessageDispatcher


Examples of chatbot.client.MessageDispatcher

  }

  @Override
  public void onConnectionSuccessful() {
    MessageChannel channel = this.clientConnection.joinChannel(this.channelName);
    MessageDispatcher dispatcher = new RedditMessageDispatcher(channel);
    RedditClient redditClient = new RedditClient(dispatcher);
    MessageListener messageListener = new RedditMessageResponseListener(this.responseStrategy, redditClient);
    channel.registerListener(messageListener);
  }
View Full Code Here

Examples of com.opensymphony.messagework.jms.dispatcher.MessageDispatcher

        Queue queue = (Queue) appContext.getBean("messageworkDestination");
        try {
            for (int i = 0; i < numListeners; i++) {
                LOG.debug("Creating a new QueueConnection...");
                QueueConnection newConnection = queueConnectionFactory.createQueueConnection();
                MessageDispatcher dispatcher = new MessageDispatcher();
                QueueSession session = newConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
                QueueReceiver messageConsumer = session.createReceiver(queue);
                messageConsumer.setMessageListener(dispatcher);
                newConnection.start();
                connections.add(newConnection);
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.MessageDispatcher

    {
        final Set<Entry<File, Set<Object>>> fls = aFileMap.entrySet();

        for (Entry<File, Set<Object>> entry : fls) {
            final File currentFile = entry.getKey();
            final MessageDispatcher dispatcher = getMessageDispatcher();
            final String path = currentFile.getPath();
            dispatcher.fireFileStarted(path);
            final Set<Object> currentKeys = entry.getValue();

            // Clone the keys so that they are not lost
            final Set<Object> keysClone = Sets.newHashSet(aKeys);
            keysClone.removeAll(currentKeys);

            // Remaining elements in the key set are missing in the current file
            if (!keysClone.isEmpty()) {
                for (Object key : keysClone) {
                    log(0, "translation.missingKey", key);
                }
            }
            fireErrors(path);
            dispatcher.fireFileFinished(path);
        }
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.MessageDispatcher

    /** {@inheritDoc} */
    public void process(List<File> aFiles)
    {
        final List<File> files = filter(aFiles);
        final MessageDispatcher dispatcher = getMessageDispatcher();
        for (final File file : files) {
            final String path = file.getPath();
            dispatcher.fireFileStarted(path);
            RandomAccessFile randomAccessFile = null;
            try {
                randomAccessFile = new RandomAccessFile(file, "r");
                if (!endsWithNewline(randomAccessFile)) {
                    log(0, "noNewlineAtEOF", path);
                }
            }
            catch (final IOException e) {
                ///CLOVER:OFF
                logIOException(e);
                ///CLOVER:ON
            }
            finally {
                if (randomAccessFile != null) {
                    try {
                        randomAccessFile.close();
                    }
                    catch (final IOException e) {
                        ///CLOVER:OFF
                        logIOException(e);
                        ///CLOVER:ON
                    }
                }
            }
            fireErrors(path);
            dispatcher.fireFileFinished(path);
        }
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.MessageDispatcher

    /** {@inheritDoc} */
    public void process(List<File> aFiles)
    {

        final MessageDispatcher msgDispatcher = getMessageDispatcher();
        final RegexpHeaderChecker regexpHeaderChecker =
            new RegexpHeaderChecker(
                    mHeaderInfo, new FileSetCheckViolationMonitor());
        final List<File> files = filter(aFiles);
        for (final File file : files) {
            final String path = file.getPath();
            msgDispatcher.fireFileStarted(path);
            try {
                final String[] lines = Utils.getLines(path);
                regexpHeaderChecker.checkLines(lines);
            }
            catch (IOException ex) {
                log(0, "unable to open file: " + ex);
            }
            fireErrors(path);
            msgDispatcher.fireFileFinished(path);
        }
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.MessageDispatcher

    {
        final List<File> javaFiles = filter(aFiles);
        final Set<File> directories = getParentDirs(javaFiles);
        for (File dir : directories) {
            // Check for the preferred file.
            final MessageDispatcher dispatcher = getMessageDispatcher();
            final File packageInfo = new File(dir, "package-info.java");
            final File packageHtml = new File(dir, "package.html");
            final String path;

            if (packageInfo.exists()) {
                path = packageInfo.getPath();
                dispatcher.fireFileStarted(path);
                if (packageHtml.exists()) {
                    log(0, "javadoc.legacyPackageHtml");
                }
            }
            else if (mAllowLegacy && packageHtml.exists()) {
                path = packageHtml.getPath();
                dispatcher.fireFileStarted(path);
            }
            else {
                path = packageInfo.getPath();
                dispatcher.fireFileStarted(path);
                log(0, "javadoc.packageInfo");
            }
            fireErrors(path);
            dispatcher.fireFileFinished(path);
        }
    }
View Full Code Here

Examples of marauroa.server.game.messagehandler.MessageDispatcher

    playerContainer = PlayerEntryContainer.getContainer();
   
    delayedEventHandler= new DelayedEventHandlerThread(rpMan);

    messageDispatcher = new MessageDispatcher();
    messageDispatcher.init(netMan, rpMan, playerContainer, Statistics.getStatistics(), key);
  }
View Full Code Here

Examples of org.apache.tuscany.core.wire.impl.MessageDispatcher

    @Override
    public void build() {

        if (requestHandlers != null && targetInterceptorChainHead != null) {
            // on target-side, connect existing handlers and interceptors
            MessageHandler messageDispatcher = new MessageDispatcher(targetInterceptorChainHead);
            requestHandlers.add(messageDispatcher);
        }

        if (requestHandlers != null) {
            MessageChannel requestChannel = new MessageChannelImpl(requestHandlers);
View Full Code Here

Examples of org.apache.tuscany.core.wire.impl.MessageDispatcher

     */
    @Override
    public void build() {
        if (requestHandlers != null && interceptorChainHead != null) {
            // on target-side, connect existing handlers and interceptors
            MessageHandler messageDispatcher = new MessageDispatcher(interceptorChainHead);
            requestHandlers.add(messageDispatcher);
        }
    }
View Full Code Here

Examples of org.jgroups.blocks.MessageDispatcher

        public void run() {
            try {
                c.connect("ChannelConcurrencyTest");
                if(useDispatcher && c.isConnected()) {
                    final MessageDispatcher md=new MessageDispatcher(c, null, null, new MyHandler());
                    for(int i=0;i < 10;i++) {
                        final RspList rsp=md.castMessage(null,
                                                         new Message(null, null, i),
                                                         GroupRequest.GET_ALL,
                                                         2500);
                        for(Object o:rsp.getResults()) {
                            assertEquals("Wrong result received at " + c.getAddress(), i, o);
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.