01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * 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 javax.management.ObjectName;
34:
35: import org.omg.CORBA.LocalObject;
36: import org.omg.CORBA.NO_IMPLEMENT;
37: import org.omg.CSI.IdentityToken;
38:
39: /**
40: * This class implements <code>SASCurrent</code>.
41: *
42: * @author <a href="mailto:reverbel@ime.usp.br">Francisco Reverbel</a>
43: * @version $Revision: 57194 $
44: */
45:
46: public class SASCurrentImpl extends LocalObject implements SASCurrent {
47: /** @since 4.0.1 */
48: static final long serialVersionUID = 108332919461569666L;
49:
50: // Fields --------------------------------------------------------
51:
52: private SASTargetInterceptor serverInterceptor;
53:
54: // Initializer ---------------------------------------------------
55:
56: public void init(SASTargetInterceptor serverInterceptor) {
57: this .serverInterceptor = serverInterceptor;
58: }
59:
60: // SASCurrent operations -----------------------------------------
61:
62: public boolean context_received() {
63: return serverInterceptor.sasContextReceived();
64: }
65:
66: public boolean client_authentication_info_received() {
67: return serverInterceptor.authenticationTokenReceived();
68: }
69:
70: public byte[] get_incoming_username() {
71: return serverInterceptor.getIncomingUsername();
72: }
73:
74: public byte[] get_incoming_password() {
75: return serverInterceptor.getIncomingPassword();
76: }
77:
78: public byte[] get_incoming_target_name() {
79: return serverInterceptor.getIncomingTargetName();
80: }
81:
82: public IdentityToken get_incoming_identity() {
83: return serverInterceptor.getIncomingIdentity();
84: }
85:
86: public int get_incoming_identity_token_type() {
87: return serverInterceptor.getIncomingIdentity().discriminator();
88: }
89:
90: public byte[] get_incoming_principal_name() {
91: return serverInterceptor.getIncomingPrincipalName();
92: }
93:
94: public void reject_incoming_context() {
95: serverInterceptor.rejectIncomingContext();
96: }
97:
98: }
|