KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > iiop > csiv2 > SASCurrentImpl


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.iiop.csiv2;
23
24 /***************************************
25  * *
26  * JBoss: The OpenSource J2EE WebOS *
27  * *
28  * Distributable under LGPL license. *
29  * See terms of license at gnu.org. *
30  * *
31  ***************************************/

32
33 import org.omg.CORBA.LocalObject JavaDoc;
34 import org.omg.CSI.IdentityToken;
35
36 /**
37  * This class implements <code>SASCurrent</code>.
38  *
39  * @author <a HREF="mailto:reverbel@ime.usp.br">Francisco Reverbel</a>
40  * @version $Revision: 37459 $
41  */

42
43 public class SASCurrentImpl
44    extends LocalObject JavaDoc
45    implements SASCurrent
46 {
47    // Fields --------------------------------------------------------
48

49    private SASTargetInterceptor serverInterceptor;
50  
51    // Initializer ---------------------------------------------------
52

53    public void init(SASTargetInterceptor serverInterceptor)
54    {
55       this.serverInterceptor = serverInterceptor;
56    }
57
58    // SASCurrent operations -----------------------------------------
59

60    public boolean context_received()
61    {
62       return serverInterceptor.sasContextReceived();
63    }
64
65    public boolean client_authentication_info_received()
66    {
67       return serverInterceptor.authenticationTokenReceived();
68    }
69
70    public byte[] get_incoming_username()
71    {
72       return serverInterceptor.getIncomingUsername();
73    }
74
75    public byte[] get_incoming_password()
76    {
77       return serverInterceptor.getIncomingPassword();
78    }
79
80    public byte[] get_incoming_target_name()
81    {
82       return serverInterceptor.getIncomingTargetName();
83    }
84
85    public IdentityToken get_incoming_identity()
86    {
87       return serverInterceptor.getIncomingIdentity();
88    }
89
90
91    public int get_incoming_identity_token_type()
92    {
93       return serverInterceptor.getIncomingIdentity().discriminator();
94    }
95
96    public byte[] get_incoming_principal_name()
97    {
98       return serverInterceptor.getIncomingPrincipalName();
99    }
100
101    public void reject_incoming_context()
102    {
103       serverInterceptor.rejectIncomingContext();
104    }
105
106 }
107
Popular Tags