Examples of registerListener()


Examples of chatbot.client.MessageChannel.registerListener()

  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.alibaba.wasp.executor.ExecutorService.registerListener()

  private void modifyTable(final byte[] tableName, final FTable htd)
      throws IOException {
    FMasterServices services = TEST_UTIL.getMiniWaspCluster().getMaster();
    ExecutorService executor = services.getExecutorService();
    AtomicBoolean done = new AtomicBoolean(false);
    executor.registerListener(EventType.C_M_MODIFY_TABLE,
        new DoneListener(done));
    admin.modifyTable(tableName, htd);
    while (!done.get()) {
      synchronized (done) {
        try {
View Full Code Here

Examples of com.alibaba.wasp.zookeeper.ZooKeeperWatcher.registerListener()

    ms1.stop("stopping first server");

    // Use a listener to capture when the node is actually deleted
    NodeDeletionListener listener = new NodeDeletionListener(zk,
        zk.getMasterAddressZNode());
    zk.registerListener(listener);

    LOG.info("Deleting master node");
    ZKUtil.deleteNode(zk, zk.getMasterAddressZNode());

    // Wait for the node to be deleted
View Full Code Here

Examples of com.hazelcast.cache.impl.CacheService.registerListener()

                if (endpoint.isAlive()) {
                    endpoint.sendEvent(eventObject, getCallId());
                }
            }
        };
        return service.registerListener(name, entryListener);
    }

    public String getServiceName() {
        return CacheService.SERVICE_NAME;
    }
View Full Code Here

Examples of com.hazelcast.client.spi.impl.ClientInvocationServiceImpl.registerListener()

                future = invocationService.invokeOnRandomTarget(request, handler);
            } else {
                future = invocationService.invokeOnKeyOwner(request, key, handler);
            }
            String registrationId = context.getSerializationService().toObject(future.get());
            invocationService.registerListener(registrationId, request.getCallId());
            return registrationId;
        } catch (Exception e) {
            throw ExceptionUtil.rethrow(e);
        }
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService.registerListener()

        nodeEngine.getEventService().deregisterAllListeners(SERVICE_NAME, name);
    }

    public String addItemListener(String name, ItemListener listener, boolean includeValue) {
        EventService eventService = nodeEngine.getEventService();
        EventRegistration registration = eventService.registerListener(QueueService.SERVICE_NAME, name, new QueueEventFilter(includeValue), listener);
        return registration.getId();
    }

    public boolean removeItemListener(String name, String registrationId) {
        EventService eventService = nodeEngine.getEventService();
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseFlat.registerListener()

    db.open("admin", "admin");

    ORecordFlat record1 = new ORecordFlat(db);
    record1.value("This is the first version").save();

    db.registerListener(new ODatabaseListener() {

      public void onAfterTxCommit(ODatabase iDatabase) {
      }

      public void onAfterTxRollback(ODatabase iDatabase) {
View Full Code Here

Examples of com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.registerListener()

      final OChannelBinaryAsynchClient ch = new OChannelBinaryAsynchClient(remoteHost, remotePort, databaseName,
          clientConfiguration, OChannelBinaryProtocol.CURRENT_PROTOCOL_VERSION, asynchEventListener);

      // REGISTER MYSELF AS LISTENER TO REMOVE THE CHANNEL FROM THE POOL IN CASE OF CLOSING
      ch.registerListener(this);

      return ch;

    } catch (OIOException e) {
      // RE-THROW IT
View Full Code Here

Examples of eu.admire.gateway.engine.DISPELGraphExecutor.registerListener()

    private void processLocally(RequestContext context, Graph graph)
    {
        LOG.debug("Processing graph locally.");
        DISPELGraphExecutor processor = GatewayBeanFactory.getInstance().createDispelGraphExecutor();    
        processor.setRequestContext(context);
        processor.registerListener(new LoggingProgressListener());
        processor.registerListener(new ResultDataSourceListener(this));
        processor.registerListener(new ProcessingErrorListener(this, mErrors));
       
        //here register listener to final workflow - radek
        LOG.debug("registering workflow listener.");
View Full Code Here

Examples of net.sf.ehcache.event.RegisteredEventListeners.registerListener()

  public EhCacheDistributedImpl(Cache ehcache)
  {
    super(ehcache);
    RegisteredEventListeners listeners = ehcache
        .getCacheEventNotificationService();
    listeners.registerListener(this);

  }

  public CacheElement get(Object key)
  {
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.