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

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


        List<ProtocolHandlerResultHandler> resultHandlers = chain.getHandlers(ProtocolHandlerResultHandler.class);
        ProtocolSession session = (ProtocolSession) ctx.getAttachment();
        session.getLogger().info("Connection established from " + session.getRemoteHost() + " (" + session.getRemoteIPAddress()+ ")");
        if (connectHandlers != null) {
            for (int i = 0; i < connectHandlers.size(); i++) {
                ConnectHandler cHandler = connectHandlers.get(i);
               
                long start = System.currentTimeMillis();
                Response response = connectHandlers.get(i).onConnect(session);
                long executionTime = System.currentTimeMillis() - start;
               
View Full Code Here


        List<ProtocolHandlerResultHandler> resultHandlers = chain.getHandlers(ProtocolHandlerResultHandler.class);
        ProtocolSession session = (ProtocolSession) ctx.getAttachment();
        session.getLogger().info("Connection established from " + session.getRemoteAddress().getAddress().getHostAddress());
        if (connectHandlers != null) {
            for (int i = 0; i < connectHandlers.size(); i++) {
                ConnectHandler cHandler = connectHandlers.get(i);
               
                long start = System.currentTimeMillis();
                Response response = connectHandlers.get(i).onConnect(session);
                long executionTime = System.currentTimeMillis() - start;
               
View Full Code Here

        List<ProtocolHandlerResultHandler> resultHandlers = chain.getHandlers(ProtocolHandlerResultHandler.class);
        ProtocolSession session = (ProtocolSession) ctx.getAttachment();
        session.getLogger().info("Connection established from " + session.getRemoteAddress().getAddress().getHostAddress());
        if (connectHandlers != null) {
            for (int i = 0; i < connectHandlers.size(); i++) {
                ConnectHandler cHandler = connectHandlers.get(i);
               
                long start = System.currentTimeMillis();
                Response response = connectHandlers.get(i).onConnect(session);
                long executionTime = System.currentTimeMillis() - start;
               
View Full Code Here

    @SuppressWarnings({ "unchecked", "rawtypes" })
    public void wireExtensions(Class<?> interfaceName, List<?> extension) throws WiringException {
        if (interfaceName.equals(ConnectHandler.class)) {
            // add stats for all hooks
            for (Object anExtension : extension) {
                ConnectHandler c = (ConnectHandler) anExtension;
                if (!equals(c)) {
                    String cName = c.getClass().getName();
                    try {
                        cStats.put(cName, new ConnectHandlerStats(jmxName, cName));
                    } catch (Exception e) {
                        throw new WiringException("Unable to wire Hooks", e);
                    }
View Full Code Here

TOP

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

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.