View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.cxf.wssec;
8   
9   import org.mule.RequestContext;
10  import org.mule.api.security.SecurityContext;
11  import org.mule.util.concurrent.Latch;
12  
13  import org.apache.hello_world_soap_http.GreeterImpl;
14  
15  public class GreeterWithLatch extends GreeterImpl
16  {
17      private Latch greetLatch = new Latch();
18      private SecurityContext securityContext;
19  
20      @Override
21      public String greetMe(String me)
22      {
23          String result = super.greetMe(me);
24          greetLatch.countDown();
25          securityContext = RequestContext.getEvent().getSession().getSecurityContext();
26          return result;
27      }
28      
29      public Latch getLatch()
30      {
31          return greetLatch;
32      }
33      
34      public SecurityContext getSecurityContext()
35      {
36          return securityContext;
37      }
38  }
39  
40