Method from org.apache.geronimo.corba.security.config.tss.TSSCompoundSecMechConfig Detail: |
public Subject check(EstablishContext msg) throws SASException {
Subject asSubject = as_mech.check(msg);
Subject sasSubject = sas_mech.check(msg);
if (sasSubject != null) return sasSubject;
return asSubject;
}
|
public static TSSCompoundSecMechConfig decodeIOR(Codec codec,
CompoundSecMech compoundSecMech) throws Exception {
TSSCompoundSecMechConfig result = new TSSCompoundSecMechConfig();
result.setTransport_mech(TSSTransportMechConfig.decodeIOR(codec, compoundSecMech.transport_mech));
result.setAs_mech(TSSASMechConfig.decodeIOR(compoundSecMech.as_context_mech));
result.setSas_mech(new TSSSASMechConfig(compoundSecMech.sas_context_mech));
return result;
}
|
public CompoundSecMech encodeIOR(ORB orb,
Codec codec) throws Exception {
CompoundSecMech result = new CompoundSecMech();
result.target_requires = 0;
// transport mechanism
result.transport_mech = transport_mech.encodeIOR(orb, codec);
result.target_requires |= transport_mech.getRequires();
if (log.isDebugEnabled()) {
log.debug("transport adds supported: " + ConfigUtil.flags(transport_mech.getSupports()));
log.debug("transport adds required: " + ConfigUtil.flags(transport_mech.getRequires()));
}
// AS_ContextSec
result.as_context_mech = as_mech.encodeIOR(orb, codec);
result.target_requires |= as_mech.getRequires();
if (log.isDebugEnabled()) {
log.debug("AS adds supported: " + ConfigUtil.flags(as_mech.getSupports()));
log.debug("AS adds required: " + ConfigUtil.flags(as_mech.getRequires()));
}
// SAS_ContextSec
result.sas_context_mech = sas_mech.encodeIOR(orb, codec);
result.target_requires |= sas_mech.getRequires();
if (log.isDebugEnabled()) {
log.debug("SAS adds supported: " + ConfigUtil.flags(sas_mech.getSupports()));
log.debug("SAS adds required: " + ConfigUtil.flags(sas_mech.getRequires()));
log.debug("REQUIRES: " + ConfigUtil.flags(result.target_requires));
}
return result;
}
|
public TSSASMechConfig getAs_mech() {
return as_mech;
}
|
public short getRequires() {
short result = 0;
if (transport_mech != null) result |= transport_mech.getRequires();
if (as_mech != null) result |= as_mech.getRequires();
if (sas_mech != null) result |= sas_mech.getRequires();
return result;
}
|
public TSSSASMechConfig getSas_mech() {
return sas_mech;
}
|
public short getSupports() {
short result = 0;
if (transport_mech != null) result |= transport_mech.getSupports();
if (as_mech != null) result |= as_mech.getSupports();
if (sas_mech != null) result |= sas_mech.getSupports();
return result;
}
|
public TSSTransportMechConfig getTransport_mech() {
return transport_mech;
}
|
public void setAs_mech(TSSASMechConfig as_mech) {
this.as_mech = as_mech;
}
|
public void setSas_mech(TSSSASMechConfig sas_mech) {
this.sas_mech = sas_mech;
}
|
public void setTransport_mech(TSSTransportMechConfig transport_mech) {
this.transport_mech = transport_mech;
}
|
public String toString() {
StringBuffer buf = new StringBuffer();
toString("", buf);
return buf.toString();
}
|
void toString(String spaces,
StringBuffer buf) {
String moreSpaces = spaces + " ";
buf.append(spaces).append("TSSCompoundSecMechConfig: [\n");
buf.append(moreSpaces).append("SUPPORTS (aggregate): ").append(ConfigUtil.flags(getSupports())).append("\n");
buf.append(moreSpaces).append("REQUIRES (aggregate): ").append(ConfigUtil.flags(getRequires())).append("\n");
if (transport_mech != null) {
transport_mech.toString(moreSpaces, buf);
}
if (as_mech != null) {
as_mech.toString(moreSpaces, buf);
}
if (sas_mech != null) {
sas_mech.toString(moreSpaces, buf);
}
buf.append(spaces).append("]\n");
}
|