Package org.gatein.wsrp.consumer

Examples of org.gatein.wsrp.consumer.ProducerSessionInformation$SessionInfo


      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


         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

   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

TOP

Related Classes of org.gatein.wsrp.consumer.ProducerSessionInformation$SessionInfo

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.