Package org.exoplatform.services.ftp.data

Examples of org.exoplatform.services.ftp.data.FtpDataTransiver


      commandName = FtpConst.Commands.CMD_PASV;
   }

   public void run(String[] params) throws IOException
   {
      FtpDataTransiver transiver =
         clientSession().getFtpServer().getDataChannelManager().getDataTransiver(clientSession());

      if (transiver == null)
      {
         reply(FtpConst.Replyes.REPLY_421_DATA);
         return;
      }
      clientSession().setDataTransiver(transiver);

      StringBuilder serverLocation = new StringBuilder(clientSession().getServerIp().replace('.', ','));
      int dataPort = transiver.getDataPort();
      int high = dataPort / 256;
      int low = dataPort % 256;

      serverLocation.append(String.format(",%s,%s", high, low));
      reply(String.format(FtpConst.Replyes.REPLY_227, serverLocation.toString()));
View Full Code Here


         return;
      }

      try
      {
         FtpDataTransiver dataTransiver =
            new FtpDataTransiverImpl(host.toString(), port, clientSession().getFtpServer().getConfiguration(),
               clientSession());

         clientSession().setDataTransiver(dataTransiver);
         reply(String.format(FtpConst.Replyes.REPLY_200, "Port command success"));
View Full Code Here

         return;
      }

      try
      {
         FtpDataTransiver dataTransiver =
            new FtpDataTransiverImpl(host.toString(), port, clientSession().getFtpServer().getConfiguration(),
               clientSession());

         clientSession().setDataTransiver(dataTransiver);
         reply(String.format(FtpConst.Replyes.REPLY_200, "Port command success"));
View Full Code Here

      commandName = FtpConst.Commands.CMD_PASV;
   }

   public void run(String[] params) throws IOException
   {
      FtpDataTransiver transiver =
         clientSession().getFtpServer().getDataChannelManager().getDataTransiver(clientSession());

      if (transiver == null)
      {
         reply(FtpConst.Replyes.REPLY_421_DATA);
         return;
      }
      clientSession().setDataTransiver(transiver);

      String serverLocation = clientSession().getServerIp();
      serverLocation = serverLocation.replace('.', ',');

      int dataPort = transiver.getDataPort();
      int high = dataPort / 256;
      int low = dataPort % 256;

      serverLocation += String.format(",%s,%s", high, low);
      reply(String.format(FtpConst.Replyes.REPLY_227, serverLocation));
View Full Code Here

         return;
      }

      try
      {
         FtpDataTransiver dataTransiver =
            new FtpDataTransiverImpl(host, port, clientSession().getFtpServer().getConfiguration(), clientSession());

         clientSession().setDataTransiver(dataTransiver);
         reply(String.format(FtpConst.Replyes.REPLY_200, "Port command success"));
         return;
View Full Code Here

TOP

Related Classes of org.exoplatform.services.ftp.data.FtpDataTransiver

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.