View Javadoc

1   /*
2   Copyright (C) 2000 - 2007 Grid Systems, S.A.
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License, version 2, as
6   published by the Free Software Foundation.
7   
8   This program is distributed in the hope that it will be useful,
9   but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12  
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  */
17  
18  /*
19   * Project: KernelCommon
20   * Created on 15-abr-2004
21   * <p>
22   * Copyright (c)2004 Grid Systems
23   */
24  package com.gridsystems.innergrid.api;
25  
26  import javax.xml.rpc.Stub;
27  
28  
29  /**
30   * Manages the data credentials from client requests.
31   * <p>
32   * Implementations of this interface know how to set authentication information
33   * on a client stub, in order to authenticate the request according to a specific
34   * WSS authentication mechanism.
35   *
36   * @author Rodrigo Ruiz
37   * @version 1.0
38   *
39   * @see com.gridsystems.innergrid.api.DirectConnection DirectConnection
40   */
41  public interface Credentials {
42  
43    /**
44     * Gets the user name.
45     *
46     * @return a string with the user name
47     */
48    String getUserName();
49  
50    /**
51     * Configures the specified remote stub to use these credentials.
52     *
53     * @param stub the stub to configure
54     */
55    void setup(Stub stub);
56  }