Package org.apache.james.protocols.api.handler

Examples of org.apache.james.protocols.api.handler.ProtocolHandler


    protected Protocol createProtocol(ProtocolHandler... handlers) throws WiringException {
        LMTPProtocolHandlerChain chain = new LMTPProtocolHandlerChain();
        List<ProtocolHandler> hList = new ArrayList<ProtocolHandler>();
       
        for (int i = 0; i < handlers.length; i++) {
            ProtocolHandler handler = handlers[i];
            if (handler instanceof MessageHook) {
                handler = new MessageHookAdapter((MessageHook) handler);
            }
            hList.add(handler);
        }
View Full Code Here


    public ProtocolHandler load(String name, Configuration config) throws LoadingException {
       
        try {
            // Use the classloader which is used for bean instance stuff
            Class<ProtocolHandler> c = (Class<ProtocolHandler>) getBeanFactory().getBeanClassLoader().loadClass(name);
            ProtocolHandler handler =  (ProtocolHandler) getBeanFactory().createBean(c, AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT, true);
            if (handler instanceof LifecycleAwareProtocolHandler) {
                ((InitializingLifecycleAwareProtocolHandler) handler).init(config);
            }
            return handler;
        } catch (ClassNotFoundException e) {
View Full Code Here

    protected Protocol createProtocol(ProtocolHandler... handlers) throws WiringException {
        LMTPProtocolHandlerChain chain = new LMTPProtocolHandlerChain();
        List<ProtocolHandler> hList = new ArrayList<ProtocolHandler>();
       
        for (int i = 0; i < handlers.length; i++) {
            ProtocolHandler handler = handlers[i];
            if (handler instanceof MessageHook) {
                handler = new MessageHookAdapter((MessageHook) handler);
            }
            hList.add(handler);
        }
View Full Code Here

public class MockProtocolHandlerLoader implements ProtocolHandlerLoader{

    @Override
    public ProtocolHandler load(String name, Configuration config) throws LoadingException {
        try {
            ProtocolHandler obj = create(name);
            injectResources(obj);
            postConstruct(obj);
            synchronized (this) {
                loaderRegistry.add(obj);
            }
View Full Code Here

TOP

Related Classes of org.apache.james.protocols.api.handler.ProtocolHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.