Examples of ProducerSessionInformation


Examples of org.gatein.wsrp.consumer.ProducerSessionInformation

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

      ProducerSessionInformation sessionInfo = info.sessionInfo;
      if (sessionInfo == null)
      {
         return true;
      }

      SOAPMessage message = msgContext.getMessage();
      MimeHeaders mimeHeaders = message.getMimeHeaders();
      StringBuffer cookie = new StringBuffer(64);
      if (sessionInfo.isPerGroupCookies())
      {
         if (info.groupId == null)
         {
            throw new IllegalStateException("Was expecting a current group Id...");
         }

         String groupCookie = sessionInfo.getGroupCookieFor(info.groupId);
         if (groupCookie != null)
         {
            cookie.append(groupCookie);
         }
      }

      String userCookie = sessionInfo.getUserCookie();
      if (userCookie != null)
      {
         if (cookie.length() != 0)
         {
            cookie.append(','); // multiple cookies are separated by commas: http://www.ietf.org/rfc/rfc2109.txt, 4.2.2
View Full Code Here

Examples of org.gatein.wsrp.consumer.ProducerSessionInformation

         String cookieValue = coalesceCookies(cookieValues);

         Cookie[] cookies = extractCookies((String)msgContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY), cookieValue);

         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

Examples of org.gatein.wsrp.consumer.ProducerSessionInformation

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

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

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

            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

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

   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

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

   {
      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

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

         // 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

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

   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

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
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.