/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

  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. package org.jboss.as.jacorb.csiv2;
  23. import org.jboss.as.jacorb.csiv2.idl.SASCurrent;
  24. import org.omg.CORBA.LocalObject;
  25. import org.omg.CSI.IdentityToken;
  26. /**
  27. * <p>
  28. * This class implements {@code SASCurrent}.
  29. * </p>
  30. *
  31. * @author <a href="mailto:reverbel@ime.usp.br">Francisco Reverbel</a>
  32. * @author <a href="mailto:sguilhen@redhat.com">Stefan Guilhen</a>
  33. */
  34. public class SASCurrentImpl extends LocalObject implements SASCurrent {
  35. private SASTargetInterceptor serverInterceptor;
  36. /**
  37. * <p>
  38. * Initialize the {@code SASCurrent} instance.
  39. * </p>
  40. *
  41. * @param serverInterceptor a reference to the {@code SASTargetInterceptor} that acts as a delegate for this
  42. * implementation.
  43. */
  44. public void init(SASTargetInterceptor serverInterceptor) {
  45. this.serverInterceptor = serverInterceptor;
  46. }
  47. @Override
  48. public boolean context_received() {
  49. return this.serverInterceptor.sasContextReceived();
  50. }
  51. @Override
  52. public boolean client_authentication_info_received() {
  53. return this.serverInterceptor.authenticationTokenReceived();
  54. }
  55. @Override
  56. public byte[] get_incoming_username() {
  57. return this.serverInterceptor.getIncomingUsername();
  58. }
  59. @Override
  60. public byte[] get_incoming_password() {
  61. return this.serverInterceptor.getIncomingPassword();
  62. }
  63. @Override
  64. public byte[] get_incoming_target_name() {
  65. return this.serverInterceptor.getIncomingTargetName();
  66. }
  67. @Override
  68. public IdentityToken get_incoming_identity() {
  69. return this.serverInterceptor.getIncomingIdentity();
  70. }
  71. @Override
  72. public int get_incoming_identity_token_type() {
  73. return this.serverInterceptor.getIncomingIdentity().discriminator();
  74. }
  75. @Override
  76. public byte[] get_incoming_principal_name() {
  77. return this.serverInterceptor.getIncomingPrincipalName();
  78. }
  79. @Override
  80. public void reject_incoming_context() {
  81. this.serverInterceptor.rejectIncomingContext();
  82. }
  83. }