1 23 24 package com.sun.enterprise.iiop.security; 25 26 import java.io.*; 27 import java.net.Socket ; 28 29 import com.sun.corba.ee.spi.ior.IOR; 30 import com.sun.corba.ee.spi.transport.SocketInfo; 31 import com.sun.corba.ee.org.omg.CSI.*; 32 import com.sun.corba.ee.org.omg.CSIIOP.*; 33 34 35 38 39 public final class ConnectionContext implements Serializable { 40 private CompoundSecMech mechanism = null; 41 private boolean sslClientAuth = false; 42 private boolean ssl = false; 43 private IOR ior = null; 44 private Socket socket = null; 45 private SocketInfo endpoint = null; 46 47 50 public ConnectionContext() { 51 } 52 53 56 public ConnectionContext(CompoundSecMech mech, IOR ior) { 57 this.ior = ior; 58 mechanism = mech; 59 } 60 61 64 public IOR getIOR() { 65 return ior; 66 } 67 68 71 public void setIOR(IOR ior) { 72 this.ior = ior; 73 } 74 75 78 public CompoundSecMech getMechanism() { 79 return mechanism; 80 } 81 82 85 public void setMechanism(CompoundSecMech mech) { 86 mechanism = mech; 87 } 88 89 92 public boolean getSSLClientAuthenticationOccurred() { 93 return sslClientAuth; 94 } 95 96 99 public void setSSLClientAuthenticationOccurred(boolean val) { 100 sslClientAuth = val; 101 } 102 103 106 public boolean getSSLUsed() { 107 return ssl; 108 } 109 110 113 public void setSSLUsed(boolean val) { 114 ssl = val; 115 } 116 117 public void setEndPointInfo(SocketInfo info) { 118 endpoint = info; 119 } 120 121 public SocketInfo getEndPointInfo() { 122 return endpoint; 123 } 124 125 128 public Socket getSocket() { 129 return socket; 130 } 131 132 135 public void setSocket(Socket s) { 136 socket = s; 137 } 138 139 public String toString() { 140 String s = "sslClientAuth=" + sslClientAuth; 141 s = s + " SSL=" + ssl; 142 s = s + " ENDPOINT=" + endpoint; 143 s = s + " mechanism=" + mechanism; 144 s = s + " IOR=" + ior; 145 s = s + " Socket=" + socket; 146 return s; 147 } 148 } 149 150 151 | Popular Tags |