Package org.gatein.wsrp

Examples of org.gatein.wsrp.WSRPConsumer


         boolean activate = Boolean.valueOf(beanContext.getParameter("activate"));
         try
         {
            if (activate)
            {
               WSRPConsumer consumer = getSelectedConsumer();
               if (consumer.isRefreshNeeded())
               {
                  RefreshResult result = internalRefresh(consumer);
                  if (result != null && !result.hasIssues())
                  {
                     getRegistry().activateConsumerWith(selectedId);
View Full Code Here


   public void destroyConsumer(String id)
   {
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "Consumer identifier", "Destroying a Consumer");

      WSRPConsumer consumer = getConsumer(id);
      if (consumer != null)
      {
         ProducerInfo info = consumer.getProducerInfo();

         try
         {
            consumer.releaseSessions();
         }
         catch (PortletInvokerException e)
         {
            log.debug("releaseSessions failed when attempting to destroy " + CONSUMER_WITH_ID + id + "'");
         }
View Full Code Here

         String oldId = update(producerInfo);

         // if we updated and oldId is not null, we need to update the local information
         if (oldId != null)
         {
            WSRPConsumer consumer = createConsumerFrom(producerInfo, true);

            // update the federating portlet invoker if needed
            if (federatingPortletInvoker.isResolved(oldId))
            {
               federatingPortletInvoker.unregisterInvoker(oldId);
View Full Code Here

   public void registerOrDeregisterConsumerWith(String id, boolean register)
   {
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "Consumer identifier", "Registering or deregistering a Consumer");

      WSRPConsumer consumer = getConsumer(id);

      if (consumer == null)
      {
         throw new ConsumerException(CONSUMER_WITH_ID + id + "' doesn't exist!");
      }

      try
      {
         if (register)
         {
            consumer.getProducerInfo().register();
         }
         else
         {
            consumer.getProducerInfo().deregister();
         }
      }
      catch (Exception e)
      {
         // unexpected exception: deactivate the consumer
View Full Code Here

      }

      public WSRPConsumer getConsumer(String id)
      {
         // try cache first
         WSRPConsumer consumer = consumers.get(id);

         return getUpdatedConsumer(id, consumer);
      }
View Full Code Here

         }

         // then check, for each consumer, if it has been modified since we last checked
         for (String id : consumersIds)
         {
            WSRPConsumer consumerInfo = consumers.get(id);
            if (consumerInfo != null)
            {
               getUpdatedConsumer(id, consumerInfo);
            }
            else
View Full Code Here

TOP

Related Classes of org.gatein.wsrp.WSRPConsumer

Copyright © 2018 www.massapicom. 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.