You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by we...@apache.org on 2004/11/01 11:40:21 UTC

cvs commit: ws-fx/wss4j/src/org/apache/ws/security WSSecurityEngine.java

werner      2004/11/01 02:40:21

  Modified:    wss4j/src/org/apache/ws/security WSSecurityEngine.java
  Log:
  Small cleanup only.
  
  Revision  Changes    Path
  1.40      +16 -1     ws-fx/wss4j/src/org/apache/ws/security/WSSecurityEngine.java
  
  Index: WSSecurityEngine.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/wss4j/src/org/apache/ws/security/WSSecurityEngine.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- WSSecurityEngine.java	31 Oct 2004 08:12:52 -0000	1.39
  +++ WSSecurityEngine.java	1 Nov 2004 10:40:21 -0000	1.40
  @@ -158,7 +158,7 @@
       }
   
       /**
  -     * Singleton instance of security engine.
  +     * Get a singleton instance of security engine.
        * <p/>
        *
        * @return ws-security engine.
  @@ -166,6 +166,21 @@
       public synchronized static WSSecurityEngine getInstance() {
           if (engine == null) {
               engine = new WSSecurityEngine();
  +        }
  +        return engine;
  +    }
  +
  +    /**
  +	 * Get a singleton instance of security engine with specified configuration
  +	 * settings. <p/>
  +	 * 
  +	 * @param wssConfig
  +	 *            the configuration parameters to use.
  +	 * @return ws-security engine.
  +	 */
  +    public synchronized static WSSecurityEngine getInstance(WSSConfig wssConfig) {
  +        if (engine == null) {
  +            engine = new WSSecurityEngine(wssConfig);
           }
           return engine;
       }