} catch (IOException ex) {
//ignore, we're shutting down and nothing we can do
}
}
public void registerBuilders() {
AssertionBuilderRegistry reg = bus.getExtension(AssertionBuilderRegistry.class);
if (reg == null) {
return;
}
PolicyBuilder pbuild = bus.getExtension(PolicyBuilder.class);
reg.registerBuilder(new AlgorithmSuiteBuilder(bus));
reg.registerBuilder(new AsymmetricBindingBuilder(pbuild));
reg.registerBuilder(new ContentEncryptedElementsBuilder());
reg.registerBuilder(new EncryptedElementsBuilder());
reg.registerBuilder(new EncryptedPartsBuilder());
reg.registerBuilder(new HttpsTokenBuilder(pbuild));
reg.registerBuilder(new InitiatorTokenBuilder(pbuild));
reg.registerBuilder(new InitiatorSignatureTokenBuilder(pbuild));
reg.registerBuilder(new InitiatorEncryptionTokenBuilder(pbuild));
reg.registerBuilder(new IssuedTokenBuilder(pbuild));
reg.registerBuilder(new LayoutBuilder());
reg.registerBuilder(new ProtectionTokenBuilder(pbuild));
reg.registerBuilder(new RecipientTokenBuilder(pbuild));
reg.registerBuilder(new RecipientSignatureTokenBuilder(pbuild));
reg.registerBuilder(new RecipientEncryptionTokenBuilder(pbuild));
reg.registerBuilder(new RequiredElementsBuilder());
reg.registerBuilder(new RequiredPartsBuilder());
reg.registerBuilder(new SamlTokenBuilder(pbuild));
reg.registerBuilder(new KerberosTokenBuilder(pbuild));
reg.registerBuilder(new SecureConversationTokenBuilder(pbuild));
reg.registerBuilder(new SecurityContextTokenBuilder());
reg.registerBuilder(new SignedElementsBuilder());
reg.registerBuilder(new SignedPartsBuilder());
reg.registerBuilder(new SpnegoContextTokenBuilder(pbuild));
reg.registerBuilder(new SupportingTokens12Builder(pbuild));
reg.registerBuilder(new SupportingTokensBuilder(pbuild));
reg.registerBuilder(new SymmetricBindingBuilder(pbuild));
reg.registerBuilder(new TransportBindingBuilder(pbuild, bus));
reg.registerBuilder(new TransportTokenBuilder(pbuild));
reg.registerBuilder(new Trust10Builder());
reg.registerBuilder(new Trust13Builder());
reg.registerBuilder(new UsernameTokenBuilder(pbuild));
reg.registerBuilder(new KeyValueTokenBuilder());
reg.registerBuilder(new WSS10Builder());
reg.registerBuilder(new WSS11Builder());
reg.registerBuilder(new X509TokenBuilder(pbuild));
//add generic assertions for these known things to prevent warnings
List<QName> others = Arrays.asList(new QName[] {
SP12Constants.INCLUDE_TIMESTAMP, SP11Constants.INCLUDE_TIMESTAMP,
SP12Constants.ENCRYPT_SIGNATURE, SP11Constants.ENCRYPT_SIGNATURE,
SP12Constants.ONLY_SIGN_ENTIRE_HEADERS_AND_BODY,
SP11Constants.ONLY_SIGN_ENTIRE_HEADERS_AND_BODY,
SP12Constants.WSS_X509_V1_TOKEN_10,
SP12Constants.WSS_X509_V1_TOKEN_11,
SP12Constants.WSS_X509_V3_TOKEN_10,
SP12Constants.WSS_X509_V3_TOKEN_11,
SP11Constants.WSS_X509_V1_TOKEN_10,
SP11Constants.WSS_X509_V1_TOKEN_11,
SP11Constants.WSS_X509_V3_TOKEN_10,
SP11Constants.WSS_X509_V3_TOKEN_11,
SP12Constants.WSS_X509_PKCS7_TOKEN_11,
SP12Constants.WSS_X509_PKI_PATH_V1_TOKEN_11,
SP11Constants.WSS_X509_PKCS7_TOKEN_11,
SP11Constants.WSS_X509_PKI_PATH_V1_TOKEN_11,
SP12Constants.REQUIRE_THUMBPRINT_REFERENCE,
SP11Constants.REQUIRE_THUMBPRINT_REFERENCE,
SP12Constants.REQUIRE_DERIVED_KEYS,
SP11Constants.REQUIRE_DERIVED_KEYS,
SP12Constants.REQUIRE_INTERNAL_REFERENCE,
SP11Constants.REQUIRE_INTERNAL_REFERENCE,
SP12Constants.REQUIRE_ISSUER_SERIAL_REFERENCE,
SP11Constants.REQUIRE_ISSUER_SERIAL_REFERENCE,
new QName(SP12Constants.SP_NS, SP12Constants.ENCRYPT_BEFORE_SIGNING),
new QName(SP11Constants.SP_NS, SP11Constants.ENCRYPT_BEFORE_SIGNING),
new QName(SP12Constants.SP_NS, SP12Constants.SIGN_BEFORE_ENCRYPTING),
new QName(SP11Constants.SP_NS, SP11Constants.SIGN_BEFORE_ENCRYPTING),
SP12Constants.REQUIRE_KEY_IDENTIFIER_REFERENCE,
SP11Constants.REQUIRE_KEY_IDENTIFIER_REFERENCE,
});
reg.registerBuilder(new PrimitiveAssertionBuilder(others));
}