Examples of Subscriber


Examples of org.olat.core.util.notifications.Subscriber

       this.subToSubInfo = subToSubInfo;
     }
    
     public Object getValueAt(int row, int col) {
       PortletEntry entry = getObject(row);
        Subscriber subscriber = (Subscriber)entry.getValue();
        Publisher pub = subscriber.getPublisher();
        switch (col) {
          case 0:
            Object subsInfoObj = subToSubInfo.get(subscriber);
            if(subsInfoObj instanceof SubscriptionInfo) {
              SubscriptionInfo subsInfo = (SubscriptionInfo)subsInfoObj;
View Full Code Here

Examples of org.olat.core.util.notifications.Subscriber

            return "ERROR";
        }
      }
    
     public Subscriber getSubscriberAt(int row) {
        Subscriber subscriber = (Subscriber) getObject(row).getValue();
        return subscriber;
      }
View Full Code Here

Examples of org.olat.core.util.notifications.Subscriber

      /**
       * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int, int)
       */
      public final Object getValueAt(int row, int col) {
        PortletEntry entry = getObject(row);
        Subscriber subscriber = (Subscriber) entry.getValue();
        Publisher pub = subscriber.getPublisher();
        switch (col) {
          case 0: {       
            SubscriptionInfo subsInfo = subToSubInfo.get(subscriber);
            return subsInfo.getTitle(SubscriptionInfo.MIME_PLAIN);
          }
View Full Code Here

Examples of org.olat.core.util.notifications.Subscriber

      subscriptionKey = new Long(constSID.trim());
    } catch (NumberFormatException nfe) {
      return null;
    }

    Subscriber sub = NotificationsManagerImpl.getInstance().getSubscriber(subscriptionKey);
    if (sub == null) { // the subscription does not exist anymore
      return null;
    }
    Identity owner = sub.getIdentity();
    Identity requestor = ureq.getIdentity();
    if (!owner.equalsByPersistableKey(requestor)) throw new OLATSecurityException("tried to access subscription sub, key:" + sub.getKey()
        + ", owner is :" + owner.getName() + ", but was requested by " + requestor.getName());

    Publisher pub = sub.getPublisher();
   
    final OLATResourceable ores = OresHelper.createOLATResourceableInstance(pub.getResName(), pub.getResId());
    final String subidentifier = pub.getSubidentifier();
    final String title = "";
View Full Code Here

Examples of org.olat.core.util.notifications.Subscriber

   * @see org.olat.core.gui.components.table.DefaultTableDataModel#getValueAt(int,
   *      int)
   */
  @Override
  public Object getValueAt(int row, int col) {
    Subscriber sub = getObject(row);
    Publisher pub = sub.getPublisher();
   
    switch (col) {
      case 0:
        String innerType = pub.getType();
        String typeName = ControllerFactory.translateResourceableTypeName(innerType, getLocale());
View Full Code Here

Examples of org.omg.dds.Subscriber

     */
    public void Lookup_Sub_interesded_of_topic(String topic_name){
       
        org.omg.dds.DomainParticipant  domain_temp ;
        DomainParticipantImpl domain_impl ;
        Subscriber sub_temp ;
        SubscriberImpl sub_impl ;
        Iterator _it_DomainParticipant = references_domaines_participant.iterator();
        Iterator _it_Subscriber ;
       
        while(_it_DomainParticipant.hasNext()){
           
            try{
                domain_temp = (DomainParticipant)_it_DomainParticipant.next();
                domain_impl =(DomainParticipantImpl) poa.reference_to_servant(domain_temp);
                _it_Subscriber = domain_impl.getVector_Subscriber().iterator() ;
               
                while(_it_Subscriber.hasNext()){                   
                    sub_temp =  (Subscriber) _it_Subscriber.next();
                    if(sub_temp.lookup_datareader(topic_name) != null){                       
                        all_Sub.add(sub_temp);                   
                    }                   
                }
            }
            catch(Exception e){
View Full Code Here

Examples of org.omg.dds.Subscriber

    {
       
        Object instance = null  ;
        boolean is_topic= false ;
        boolean is_instance = false ;
        Subscriber sub_temp ;
        SubscriberImpl sub_impl_temp ;
        DataReader DR ;
        Class typehelper = null ;
        Class  type_param_extract [] = new Class [1 ];
        java.lang.Object valu_param_extract[] = new java.lang.Object[1];
        Iterator It ;
       
        if(data.type().equal(TopicHelper.type()))
        {                       
            is_topic = true ;
            topic = TopicHelper.extract(data) ;          
        }
        else
        {           
            is_instance = true ;
            valu_param_extract[0] = data ;
            type_param_extract[0] = Any.class ;
           
            try{
                typehelper  = Class.forName(topic.get_type_name()+"Helper") ;
                Method extract = typehelper.getMethod("extract",type_param_extract);
                instance = extract.invoke(null ,valu_param_extract);
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }         
        }
       
        if(is_topic){           
            Lookup_Sub_interesded_of_topic(topic.get_name());          
        }
        else if( is_instance)
        {          
            try{               
                It = all_Sub.iterator() ;
                while(It.hasNext()){
                    sub_temp = (Subscriber)It.next() ;
                    sub_impl_temp = (SubscriberImpl)poa.reference_to_servant(sub_temp);
                    sub_impl_temp.setInstance(instance);                   
                    DR = sub_temp.lookup_datareader(topic.get_name());                   
                    DR.take_instance_from_subscriber() ;
                   
                    if(DR.get_listener()!= null ){                       
                        DR.get_listener().on_data_available(DR);                       
                    }                                                          
View Full Code Here

Examples of org.omg.dds.Subscriber

     * @return
     */
    public int delete_topic(Topic a_topic) {

        Iterator It = Vector_Subscriber.iterator() ;
        Subscriber temp ;
        while(It.hasNext()){
            temp = (Subscriber)It.next() ;
            if (temp.lookup_datareader(a_topic.get_name())!= null){

                return RETCODE_PRECONDITION_NOT_MET.value ;
            }
        }
        It = Vector_Publisher.iterator() ;
View Full Code Here

Examples of org.projectodd.stilts.stomplet.Subscriber

    }

    @Override
    public void onSubscribe(Subscriber subscriber) throws StompException {
        String subscriptionId = subscriber.getSubscriptionId();
        Subscriber xaSubscriber = new SubscriberImpl( subscriber.getSession(), stomplet, subscriptionId, subscriber.getDestination(), subscriber.getParamters(), new PseudoXAStompletAcknowledgeableMessageSink(
                this.resourceManager, subscriber ),
                subscriber.getAckMode() );
        this.subscribers.put( subscriber.getId(), xaSubscriber );
        this.stomplet.onSubscribe( xaSubscriber );
    }
View Full Code Here

Examples of org.vosao.business.mq.Subscriber

  @Override
  public void execute(Message message) {
    if (subscribers.containsKey(message.getTopic())) {
      for (Class subscriberClass : subscribers.get(message.getTopic())) {
        try {
          Subscriber subscriber = (Subscriber)
              subscriberClass.newInstance();
          subscriber.onMessage(message);
        }
        catch (IllegalAccessException e) {
          logger.error(e.getMessage());
        }
        catch (InstantiationException e) {
          logger.error(e.getMessage());
        }
      }
    }
    if (!StringUtils.isEmpty(message.getCommandClassName())) {
      try {
        Class clazz = loadClass(message.getCommandClassName());
        if (clazz != null) {
          Subscriber subscriber = (Subscriber)clazz.newInstance();
          subscriber.onMessage(message);
        }
        else {
          logger.error("Command class not found: "
              + message.getCommandClassName());
        }
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.