Examples of FtpIoSession


Examples of org.apache.ftpserver.impl.FtpIoSession

        FtpIoSession ftpSession = new FtpIoSession(session, context);
        ftpHandler.sessionIdle(ftpSession, status);
    }

    public void sessionOpened(IoSession session) throws Exception {
        FtpIoSession ftpSession = new FtpIoSession(session, context);
        ftpHandler.sessionOpened(ftpSession);
    }
View Full Code Here

Examples of org.apache.ftpserver.impl.FtpIoSession

        sb.append('\n');
        Iterator<IoSession> sessionIterator = sessions.values().iterator();

        while (sessionIterator.hasNext()) {
            FtpIoSession managedSession = new FtpIoSession(sessionIterator
                    .next(), context);

            if (!managedSession.isLoggedIn()) {
                continue;
            }

            User tmpUsr = managedSession.getUser();
            sb.append(StringUtils.pad(tmpUsr.getName(), ' ', true, 16));

            if (managedSession.getRemoteAddress() instanceof InetSocketAddress) {
                sb.append(StringUtils.pad(((InetSocketAddress) managedSession
                        .getRemoteAddress()).getAddress().getHostAddress(),
                        ' ', true, 16));
            }
            sb.append(StringUtils.pad(DateUtils.getISO8601Date(managedSession
                    .getLoginTime().getTime()), ' ', true, 20));
            sb.append(StringUtils.pad(DateUtils.getISO8601Date(managedSession
                    .getLastAccessTime().getTime()), ' ', true, 20));
            sb.append('\n');
        }
        sb.append('\n');
        session.write(new DefaultFtpReply(FtpReply.REPLY_200_COMMAND_OKAY, sb
View Full Code Here

Examples of org.apache.ftpserver.impl.FtpIoSession

        sb.append('\n');
        Iterator<IoSession> sessionIterator = sessions.values().iterator();

        while (sessionIterator.hasNext()) {
            FtpIoSession managedSession = new FtpIoSession(sessionIterator
                    .next(), context);

            if (!managedSession.isLoggedIn()) {
                continue;
            }

            User tmpUsr = managedSession.getUser();
            sb.append(StringUtils.pad(tmpUsr.getName(), ' ', true, 16));

            if (managedSession.getRemoteAddress() instanceof InetSocketAddress) {
                sb.append(StringUtils.pad(((InetSocketAddress) managedSession
                        .getRemoteAddress()).getAddress().getHostAddress(),
                        ' ', true, 16));
            }
            sb.append(StringUtils.pad(DateUtils.getISO8601Date(managedSession
                    .getLoginTime().getTime()), ' ', true, 20));
            sb.append(StringUtils.pad(DateUtils.getISO8601Date(managedSession
                    .getLastAccessTime().getTime()), ' ', true, 20));
            sb.append('\n');
        }
        sb.append('\n');
        session.write(new DefaultFtpReply(FtpReply.REPLY_200_COMMAND_OKAY, sb
View Full Code Here

Examples of org.apache.ftpserver.interfaces.FtpIoSession

    public Set<FtpIoSession> getActiveSessions() {
        Map<Long,IoSession> sessions = acceptor.getManagedSessions();
       
        Set<FtpIoSession> ftpSessions = new HashSet<FtpIoSession>();
        for(IoSession session : sessions.values()) {
            ftpSessions.add(new FtpIoSession(session, context));
        }
        return ftpSessions;
    }
View Full Code Here

Examples of org.apache.ftpserver.interfaces.FtpIoSession

    this.ftpHandler = ftpHandler;
  }

  public void exceptionCaught(IoSession session, Throwable cause)
      throws Exception {
      FtpIoSession ftpSession = new FtpIoSession(session, context);
      ftpHandler.exceptionCaught(ftpSession, cause);
  }
View Full Code Here

Examples of org.apache.ftpserver.interfaces.FtpIoSession

      ftpHandler.exceptionCaught(ftpSession, cause);
  }

  public void messageReceived(IoSession session, Object message)
      throws Exception {
      FtpIoSession ftpSession = new FtpIoSession(session, context);
      FtpRequest request = new FtpRequestImpl(message.toString());
     
      ftpHandler.messageReceived(ftpSession, request);
  }
View Full Code Here

Examples of org.apache.ftpserver.interfaces.FtpIoSession

     
      ftpHandler.messageReceived(ftpSession, request);
  }

  public void messageSent(IoSession session, Object message) throws Exception {
      FtpIoSession ftpSession = new FtpIoSession(session, context);
      ftpHandler.messageSent(ftpSession, (FtpReply)message);
  }
View Full Code Here

Examples of org.apache.ftpserver.interfaces.FtpIoSession

      FtpIoSession ftpSession = new FtpIoSession(session, context);
      ftpHandler.messageSent(ftpSession, (FtpReply)message);
  }

  public void sessionClosed(IoSession session) throws Exception {
      FtpIoSession ftpSession = new FtpIoSession(session, context);
      ftpHandler.sessionClosed(ftpSession);
  }
View Full Code Here

Examples of org.apache.ftpserver.interfaces.FtpIoSession

      FtpIoSession ftpSession = new FtpIoSession(session, context);
      ftpHandler.sessionClosed(ftpSession);
  }

  public void sessionCreated(IoSession session) throws Exception {
      FtpIoSession ftpSession = new FtpIoSession(session, context);
      ftpHandler.sessionCreated(ftpSession);
  }
View Full Code Here

Examples of org.apache.ftpserver.interfaces.FtpIoSession

      ftpHandler.sessionCreated(ftpSession);
  }

  public void sessionIdle(IoSession session, IdleStatus status)
      throws Exception {
      FtpIoSession ftpSession = new FtpIoSession(session, context);
      ftpHandler.sessionIdle(ftpSession, status);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.