Package org.gatein.wsrp.consumer.handlers

Examples of org.gatein.wsrp.consumer.handlers.ProducerSessionInformation


      if (info == null)
      {
         return true;
      }

      ProducerSessionInformation sessionInfo = info.sessionInfo;
      if (sessionInfo == null)
      {
         return true;
      }
View Full Code Here


            throw new IllegalArgumentException(endpointAddress + " is not a valid URL for the endpoint address.");
         }
         Cookie[] cookies = CookieUtil.extractCookiesFrom(hostURL, cookieValues);

         CurrentInfo info = getCurrentInfo(true);
         ProducerSessionInformation sessionInfo = info.sessionInfo;

         if (sessionInfo.isPerGroupCookies())
         {
            if (info.groupId == null)
            {
               throw new IllegalStateException("Was expecting a current group Id...");
            }

            sessionInfo.setGroupCookieFor(info.groupId, cookies);
         }
         else
         {
            sessionInfo.setUserCookie(cookies);
         }
      }

      return true;
   }
View Full Code Here

   private static CurrentInfo getCurrentInfo(boolean createIfNeeded)
   {
      CurrentInfo info = local.get();
      if (info == null && createIfNeeded)
      {
         info = new CurrentInfo(null, new ProducerSessionInformation());
         local.set(info);
      }
      return info;
   }
View Full Code Here

   {
      CurrentInfo info = getCurrentInfo(false);
      if (info != null)
      {

         final ProducerSessionInformation sessionInfo = info.sessionInfo;
         if (sessionInfo == null)
         {
            return Collections.emptyList();
         }

         final List<String> cookies = new ArrayList<String>(7);
         if (sessionInfo.isPerGroupCookies())
         {
            if (info.groupId == null)
            {
               throw new IllegalStateException("Was expecting a current group Id...");
            }

            cookies.addAll(sessionInfo.getGroupCookiesFor(info.groupId));
         }

         cookies.addAll(sessionInfo.getUserCookies());

         return cookies;
      }

      return Collections.emptyList();
View Full Code Here

         // extract their metadata and check that they are valid for the given domain
         final List<CookieUtil.Cookie> cookies = CookieUtil.extractCookiesFrom(hostURL, cookieValues);

         // retrieve the session information associated with this interaction
         CurrentInfo info = getCurrentInfo(true);
         ProducerSessionInformation sessionInfo = info.sessionInfo;

         // update the current information with the new information
         if (sessionInfo.isPerGroupCookies())
         {
            if (info.groupId == null)
            {
               throw new IllegalStateException("Was expecting a current group Id...");
            }

            sessionInfo.setGroupCookiesFor(info.groupId, cookies);
         }
         else
         {
            sessionInfo.setUserCookies(cookies);
         }
      }

      // allow other handlers in the chain to process the message
      return true;
View Full Code Here

   private static CurrentInfo getCurrentInfo(boolean createIfNeeded)
   {
      CurrentInfo info = local.get();
      if (info == null && createIfNeeded)
      {
         info = new CurrentInfo(null, new ProducerSessionInformation());
         local.set(info);
      }
      return info;
   }
View Full Code Here

      if (info == null)
      {
         return true;
      }

      ProducerSessionInformation sessionInfo = info.sessionInfo;
      if (sessionInfo == null)
      {
         return true;
      }
View Full Code Here

            throw new IllegalArgumentException(endpointAddress + " is not a valid URL for the endpoint address.");
         }
         final Cookie[] cookies = CookieUtil.extractCookiesFrom(hostURL, cookieValues);

         CurrentInfo info = getCurrentInfo(true);
         ProducerSessionInformation sessionInfo = info.sessionInfo;

         if (sessionInfo.isPerGroupCookies())
         {
            if (info.groupId == null)
            {
               throw new IllegalStateException("Was expecting a current group Id...");
            }

            sessionInfo.setGroupCookieFor(info.groupId, cookies);
         }
         else
         {
            sessionInfo.setUserCookie(cookies);
         }
      }

      return true;
   }
View Full Code Here

   private static CurrentInfo getCurrentInfo(boolean createIfNeeded)
   {
      CurrentInfo info = local.get();
      if (info == null && createIfNeeded)
      {
         info = new CurrentInfo(null, new ProducerSessionInformation());
         local.set(info);
      }
      return info;
   }
View Full Code Here

TOP

Related Classes of org.gatein.wsrp.consumer.handlers.ProducerSessionInformation

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.