Examples of subscribe()


Examples of org.terasology.rendering.nui.widgets.UIButton.subscribe()

    }

    public static void trySubscribe(UIWidget widget, String id, ActivateEventListener listener) {
        UIButton button = widget.find(id, UIButton.class);
        if (button != null) {
            button.subscribe(listener);
        } else {
            logger.warn("Contents of {} missing button with id '{}'", widget, id);
        }
    }
View Full Code Here

Examples of org.terasology.world.block.internal.BlockManagerImpl.subscribe()

        BlockManagerImpl blockManager;
        BlockFamilyFactoryRegistry blockFamilyFactoryRegistry = CoreRegistry.get(BlockFamilyFactoryRegistry.class);
        if (networkSystem.getMode().isAuthority()) {
            blockManager = new BlockManagerImpl(atlas, gameManifest.getRegisteredBlockFamilies(), gameManifest.getBlockIdMap(), true, blockFamilyFactoryRegistry);
            blockManager.subscribe(CoreRegistry.get(NetworkSystem.class));
        } else {
            blockManager = new BlockManagerImpl(atlas, gameManifest.getRegisteredBlockFamilies(), gameManifest.getBlockIdMap(), false, blockFamilyFactoryRegistry);
        }
        CoreRegistry.put(BlockManager.class, blockManager);
View Full Code Here

Examples of org.wso2.carbon.broker.core.BrokerService.subscribe()

            BrokerService brokerService = CEPServiceValueHolder.getInstance().getBrokerService();
            BrokerConfigurationHelper brokerConfigurationHelper = new BrokerConfigurationHelper();
            BrokerConfiguration brokerConfiguration =
                    brokerConfigurationHelper.getBrokerConfiguration(input.getBrokerName(), tenantId);
            try {
                brokerService.subscribe(brokerConfiguration, input.getTopic(),
                        brokerEventListener, axisConfiguration);
            } catch (BrokerEventProcessingException e) {
                String errorMessage = "Can not subscribe to the broker " + input.getBrokerName();
                log.error(errorMessage);
                throw new CEPConfigurationException(errorMessage, e);
View Full Code Here

Examples of org.wso2.carbon.event.client.broker.BrokerClient.subscribe()

        messageReceiver.start();
       
        BrokerClient brokerClient = new BrokerClient("http://127.0.0.1:9763/services/EventBrokerService");
        //brokerClient.subscribe(topic, messageReceiver.getListenerUrl());
       
        brokerClient.subscribe(topic, "http://parakum:6666/axis2/services/MessageCollector/receive/");
       
       
       
       
        OMFactory fac = OMAbstractFactory.getOMFactory();
View Full Code Here

Examples of org.wso2.carbon.event.core.EventBroker.subscribe()

            subscription.setTopicName(UsageAgentConstants.BAM_SERVER_STAT_FILTER);
            subscription.setOwner(CarbonConstants.REGISTRY_SYSTEM_USERNAME);
            subscription.setEventDispatcherName(EventBrokerConstants.WS_EVENT_DISPATCHER_NAME);

            try {
                eventBrokerService.subscribe(subscription);
            } catch (EventBrokerException e) {
                String msg = "Cannot subscribe to the event broker ";
                log.error(msg);
                throw e;
            }
View Full Code Here

Examples of org.wso2.carbon.registry.eventing.services.EventingService.subscribe()

            SuperTenantCarbonContext currentContext = SuperTenantCarbonContext.getCurrentContext();
            currentContext.setTenantId(registry.getCallerTenantId(), true);
            currentContext.setUserRealm(registry.getUserRealm());
            currentContext.setUsername(registry.getUserName());

            return eventingService.subscribe(subscription);
        } catch (InvalidMessageException e) {
            throw new DeploymentSynchronizerException("Error while subscribing for registry " +
                    "events on collection: " + absolutePath, e);
        } finally {
            SuperTenantCarbonContext.endTenantFlow();
View Full Code Here

Examples of org.xmlBlaster.client.I_XmlBlasterAccess.subscribe()

         if (action.equals(MethodName.SUBSCRIBE)) { // "subscribe"
            log.fine("subscribe arrived ...");
           
            if (oid != null) {
               SubscribeKey xmlKey = new SubscribeKey(glob, oid);
               SubscribeReturnQos ret = xmlBlaster.subscribe(xmlKey.toXml(), qos);
               log.info("Subscribed to simple key.oid=" + oid + ": " + ret.getSubscriptionId());
            }
            else if (key != null) {
               SubscribeReturnQos ret = xmlBlaster.subscribe(key, qos);
               log.info("Subscribed to " + key + ": SubscriptionId=" + ret.getSubscriptionId() + " qos=" + qos);
View Full Code Here

Examples of org.xmlBlaster.contrib.dbwatcher.mom.XmlBlasterPublisher.subscribe()

      System.setProperty("protocol/socket/hostname", "192.168.110.10");
      */

      DbWatcher pc = new DbWatcher(info);
      XmlBlasterPublisher mom = (XmlBlasterPublisher)pc.getMom();
      mom.subscribe("XPATH://key", new I_Update() {
         public void update(String topic, java.io.InputStream is, Map attrMap) {
            log.info("Received '" + topic + "' from MoM");
            try {
               writeToFile(topic, new String(TestUtils.getContent(is)));
            }
View Full Code Here

Examples of org.xmlBlaster.engine.admin.I_AdminSession.subscribe()

      subQos.setMultiSubscribe(false);
      subQos.setWantInitialUpdate(false);
      subQos.setPersistent(true);
      // this fills the client properties with the contents of the individualInfo object.
      new ClientPropertiesInfo(subQos.getData().getClientProperties(), individualInfo);
      session.subscribe(this.dataTopic, subQos.toXml());
      synchronized(this.initSync) {
         setStatus(STATUS_INITIAL);
      }
   }
  
View Full Code Here

Examples of org.zeromq.ZMQ.Socket.subscribe()

        else
            subscriber.connect("tcp://localhost:5556");

        Random rand = new Random(System.currentTimeMillis());
        String subscription = String.format("%03d", rand.nextInt(1000));
        subscriber.subscribe(subscription.getBytes());

        while (true) {
            String topic = subscriber.recvStr();
            if (topic == null)
                break;
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.