TSSConfig config = server.getTssConfig();
// if the TSSConfig includes principal information, we need to add argument values
// for this information.
DefaultPrincipal principal = config.getDefaultPrincipal();
if (principal != null) {
if (principal instanceof DefaultRealmPrincipal) {
DefaultRealmPrincipal realmPrincipal = (DefaultRealmPrincipal) principal;
list.add("default-realm-principal::" + realmPrincipal.getRealm() + ":" + realmPrincipal.getDomain() + ":"
+ realmPrincipal.getPrincipal().getClassName() + ":" + realmPrincipal.getPrincipal().getPrincipalName());
} else if (principal instanceof DefaultDomainPrincipal) {
DefaultDomainPrincipal domainPrincipal = (DefaultDomainPrincipal) principal;
list.add("default-domain-principal::" + domainPrincipal.getDomain() + ":"
+ domainPrincipal.getPrincipal().getClassName() + ":" + domainPrincipal.getPrincipal().getPrincipalName());
} else {
list.add("default-principal::" + principal.getPrincipal().getClassName() + ":" + principal.getPrincipal().getPrincipalName());
}
}
// enable the connection plugin
enableSocketFactory(server.getURI(), list);