Package org.apache.ftpserver.message

Examples of org.apache.ftpserver.message.MessageResourceImpl


     * Parse the "messages" element
     */
    private MessageResource parseMessageResource(final Element childElm, final ParserContext parserContext,
            final BeanDefinitionBuilder builder) {
       
        MessageResourceImpl mr = new MessageResourceImpl();
       
        if(StringUtils.hasText(childElm.getAttribute("languages"))) {
            String langString = childElm.getAttribute("languages");
           
            String[] languages = langString.split("[\\s,]+");
           
            mr.setLanguages(languages);
        }
       
        if(StringUtils.hasText(childElm.getAttribute("directory"))) {
            mr.setCustomMessageDirectory(new File(childElm.getAttribute("directory")));
           
        }

        return mr;
    }
View Full Code Here


    protected FtpServer createServer() throws Exception {
      FtpServer server = super.createServer();
       
      DefaultFtpServerContext context = (DefaultFtpServerContext) server.getServerContext();

      MessageResourceImpl resource = (MessageResourceImpl) context.getMessageResource();
      resource.setLanguages(new String[] {"en", "zh-tw"});
        return server;
    }
View Full Code Here

    try {
      createListeners();

      // create all the components
      messageResource = new MessageResourceImpl();
      ((MessageResourceImpl) messageResource)
          .configure();

      userManager = new PropertiesUserManager();
      ((PropertiesUserManager) userManager).configure();
View Full Code Here

        FtpServer server = super.createServer();

        DefaultFtpServerContext context = (DefaultFtpServerContext) server
                .getServerContext();

        MessageResourceImpl resource = (MessageResourceImpl) context
                .getMessageResource();
        resource.setLanguages(new String[] { "en", "zh-tw" });
        return server;
    }
View Full Code Here

     */
    private MessageResource parseMessageResource(final Element childElm,
            final ParserContext parserContext,
            final BeanDefinitionBuilder builder) {

        MessageResourceImpl mr = new MessageResourceImpl();

        if (StringUtils.hasText(childElm.getAttribute("languages"))) {
            String langString = childElm.getAttribute("languages");

            String[] languages = langString.split("[\\s,]+");

            mr.setLanguages(languages);
        }

        if (StringUtils.hasText(childElm.getAttribute("directory"))) {
            mr.setCustomMessageDirectory(new File(childElm
                    .getAttribute("directory")));

        }

        return mr;
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.message.MessageResourceImpl

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.