Package org.apache.james.protocols.api

Examples of org.apache.james.protocols.api.ProtocolTransport


    public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
        Channel channel = ctx.getChannel();
        ProtocolSession session = (ProtocolSession) ctx.getAttachment();
        if (e.getCause() instanceof TooLongFrameException) {
            Response r = session.newLineTooLongResponse();
            ProtocolTransport transport = ((AbstractSession)session).getProtocolTransport();
            if (r != null)  {
                transport.writeResponse(r, session);
            }
        } else {
            if (channel.isConnected()) {
                ProtocolTransport transport = ((AbstractSession)session).getProtocolTransport();

                Response r = session.newFatalErrorResponse();
                if (r != null) {
                    transport.writeResponse(r, session);
                }
                transport.writeResponse(Response.DISCONNECT, session);
            }
            if (session != null) {
                session.getLogger().debug("Unable to process request", e.getCause());
            } else {
                logger.debug("Unable to process request", e.getCause());
View Full Code Here


    public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
        Channel channel = ctx.getChannel();
        ProtocolSession session = (ProtocolSession) ctx.getAttachment();
        if (e.getCause() instanceof TooLongFrameException && session != null) {
            Response r = session.newLineTooLongResponse();
            ProtocolTransport transport = ((ProtocolSessionImpl)session).getProtocolTransport();
            if (r != null)  {
                transport.writeResponse(r, session);
            }
        } else {
            if (channel.isConnected() && session != null) {
                ProtocolTransport transport = ((ProtocolSessionImpl)session).getProtocolTransport();

                Response r = session.newFatalErrorResponse();
                if (r != null) {
                    transport.writeResponse(r, session);
                }
                transport.writeResponse(Response.DISCONNECT, session);
            }
            if (session != null) {
                session.getLogger().debug("Unable to process request", e.getCause());
            } else {
                logger.debug("Unable to process request", e.getCause());
View Full Code Here

    public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
        Channel channel = ctx.getChannel();
        ProtocolSession session = (ProtocolSession) ctx.getAttachment();
        if (e.getCause() instanceof TooLongFrameException && session != null) {
            Response r = session.newLineTooLongResponse();
            ProtocolTransport transport = ((ProtocolSessionImpl)session).getProtocolTransport();
            if (r != null)  {
                transport.writeResponse(r, session);
            }
        } else {
            if (channel.isConnected() && session != null) {
                ProtocolTransport transport = ((ProtocolSessionImpl)session).getProtocolTransport();

                Response r = session.newFatalErrorResponse();
                if (r != null) {
                    transport.writeResponse(r, session);
                }
                transport.writeResponse(Response.DISCONNECT, session);
            }
            if (session != null) {
                session.getLogger().debug("Unable to process request", e.getCause());
            }
            cleanup(ctx);           
View Full Code Here

TOP

Related Classes of org.apache.james.protocols.api.ProtocolTransport

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.