use of org.wso2.carbon.identity.core.handler.HandlerComparator in project carbon-identity-framework by wso2.
the class FrameworkServiceComponent method addHttpIdentityResponseFactory.
@Reference(name = "identity.response.factory", service = HttpIdentityResponseFactory.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeHttpIdentityResponseFactory")
protected void addHttpIdentityResponseFactory(HttpIdentityResponseFactory factory) {
FrameworkServiceDataHolder.getInstance().getHttpIdentityResponseFactories().add(factory);
Collections.sort(FrameworkServiceDataHolder.getInstance().getHttpIdentityResponseFactories(), new HandlerComparator());
Collections.reverse(FrameworkServiceDataHolder.getInstance().getHttpIdentityResponseFactories());
if (log.isDebugEnabled()) {
log.debug("Added HttpIdentityResponseFactory : " + factory.getName());
}
}
use of org.wso2.carbon.identity.core.handler.HandlerComparator in project identity-inbound-auth-oauth by wso2-extensions.
the class OAuth2ServiceComponentHolder method addAuthenticationHandler.
public static void addAuthenticationHandler(OAuthClientAuthenticator clientAuthenticator) {
authenticationHandlers.add(clientAuthenticator);
authenticationHandlers.sort(new HandlerComparator());
}
use of org.wso2.carbon.identity.core.handler.HandlerComparator in project carbon-identity-framework by wso2.
the class FrameworkServiceComponent method addIdentityProcessor.
@Reference(name = "identity.processor", service = IdentityProcessor.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeIdentityProcessor")
protected void addIdentityProcessor(IdentityProcessor requestProcessor) {
FrameworkServiceDataHolder.getInstance().getIdentityProcessors().add(requestProcessor);
Collections.sort(FrameworkServiceDataHolder.getInstance().getIdentityProcessors(), new HandlerComparator());
Collections.reverse(FrameworkServiceDataHolder.getInstance().getIdentityProcessors());
if (log.isDebugEnabled()) {
log.debug("Added IdentityProcessor : " + requestProcessor.getName());
}
}
use of org.wso2.carbon.identity.core.handler.HandlerComparator in project carbon-identity-framework by wso2.
the class FrameworkServiceComponent method addHttpIdentityRequestFactory.
@Reference(name = "identity.request.factory", service = HttpIdentityRequestFactory.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeHttpIdentityRequestFactory")
protected void addHttpIdentityRequestFactory(HttpIdentityRequestFactory factory) {
FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories().add(factory);
Collections.sort(FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories(), new HandlerComparator());
Collections.reverse(FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories());
if (log.isDebugEnabled()) {
log.debug("Added HttpIdentityRequestFactory : " + factory.getName());
}
}
use of org.wso2.carbon.identity.core.handler.HandlerComparator in project carbon-identity-framework by wso2.
the class FrameworkServiceDataHolder method addPostAuthenticationHandler.
/**
* Adds a post authentication handler.
*
* @param postAuthenticationHandler Post authentication handler implementation.
*/
public void addPostAuthenticationHandler(PostAuthenticationHandler postAuthenticationHandler) {
synchronized (postAuthenticationHandlers) {
this.postAuthenticationHandlers.add(postAuthenticationHandler);
postAuthenticationHandlers.sort(new HandlerComparator());
}
}
Aggregations