PageRenderTime 49ms CodeModel.GetById 38ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/jboss-as-7.1.1.Final/jacorb/src/main/java/org/jboss/as/jacorb/csiv2/SASCurrentImpl.java

#
Java | 97 lines | 46 code | 14 blank | 37 comment | 0 complexity | d55ef272e0739ce8658db58d75b6fc23 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
 1/*
 2 * JBoss, Home of Professional Open Source.
 3 * Copyright 2011, Red Hat, Inc., and individual contributors
 4 * as indicated by the @author tags. See the copyright.txt file in the
 5 * distribution for a 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
23package org.jboss.as.jacorb.csiv2;
24
25import org.jboss.as.jacorb.csiv2.idl.SASCurrent;
26import org.omg.CORBA.LocalObject;
27import org.omg.CSI.IdentityToken;
28
29/**
30 * <p>
31 * This class implements {@code SASCurrent}.
32 * </p>
33 *
34 * @author <a href="mailto:reverbel@ime.usp.br">Francisco Reverbel</a>
35 * @author <a href="mailto:sguilhen@redhat.com">Stefan Guilhen</a>
36 */
37public class SASCurrentImpl extends LocalObject implements SASCurrent {
38
39    private SASTargetInterceptor serverInterceptor;
40
41    /**
42     * <p>
43     * Initialize the {@code SASCurrent} instance.
44     * </p>
45     *
46     * @param serverInterceptor a reference to the {@code SASTargetInterceptor} that acts as a delegate for this
47     *                          implementation.
48     */
49    public void init(SASTargetInterceptor serverInterceptor) {
50        this.serverInterceptor = serverInterceptor;
51    }
52
53    @Override
54    public boolean context_received() {
55        return this.serverInterceptor.sasContextReceived();
56    }
57
58    @Override
59    public boolean client_authentication_info_received() {
60        return this.serverInterceptor.authenticationTokenReceived();
61    }
62
63    @Override
64    public byte[] get_incoming_username() {
65        return this.serverInterceptor.getIncomingUsername();
66    }
67
68    @Override
69    public byte[] get_incoming_password() {
70        return this.serverInterceptor.getIncomingPassword();
71    }
72
73    @Override
74    public byte[] get_incoming_target_name() {
75        return this.serverInterceptor.getIncomingTargetName();
76    }
77
78    @Override
79    public IdentityToken get_incoming_identity() {
80        return this.serverInterceptor.getIncomingIdentity();
81    }
82
83    @Override
84    public int get_incoming_identity_token_type() {
85        return this.serverInterceptor.getIncomingIdentity().discriminator();
86    }
87
88    @Override
89    public byte[] get_incoming_principal_name() {
90        return this.serverInterceptor.getIncomingPrincipalName();
91    }
92
93    @Override
94    public void reject_incoming_context() {
95        this.serverInterceptor.rejectIncomingContext();
96    }
97}