Package com.sos.VirtualFileSystem.Interfaces

Examples of com.sos.VirtualFileSystem.Interfaces.ISOSVFSHandler


    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::run";
    boolean flgNewConnectionUsed = false;
    try {
      logger.debug("thread is starting...");
      ISOSVFSHandler objVFS4Source = null;
      ISOSVFSHandler objVFS4Target = null;
      if (objDataSourceClient == null) {
        flgNewConnectionUsed = true;
        objVFS4Source = VFSFactory.getHandler(objOptions.getDataSourceType());
        objVFS4Source.setSource();
        objVFS4Source.Connect(objOptions.getConnectionOptions().Source());
        objVFS4Source.Authenticate(objOptions);
        objDataSourceClient = (ISOSVfsFileTransfer) objVFS4Source;
        objVFS4Source.setSource();
        objVFS4Source.Options(objOptions);
      }
      if (objDataTargetClient == null) {
        flgNewConnectionUsed = true;
        objVFS4Target = VFSFactory.getHandler(objOptions.getDataTargetType());
        objVFS4Target.setTarget();
        objVFS4Target.Connect(objOptions.getConnectionOptions().Target());
        objVFS4Target.Authenticate(objOptions);
        objDataTargetClient = (ISOSVfsFileTransfer) objVFS4Target;
        objVFS4Target.setTarget();
        objVFS4Target.Options(objOptions);
      }

      ISOSVirtualFile objSourceFile = objDataSourceClient.getFileHandle(strSourceFileName);
      if (objSourceFile.notExists() == true) {
        throw new JobSchedulerException(".. file '" + strSourceFileName + "' does not exist ");
View Full Code Here


    // TODO eigener Datentyp SOSVirtualFileHandlerSystemType

    final String conMethodName = conClassName + "::getHandler";

    ISOSVFSHandler objC = null;
    URL objURL = null;
    // TODO Type of filesystem as an enumeration

    String strWhatSystem = pstrWhatURL;

    // Possible Elements of an URL are:
    //
    // http://hans:geheim@www.example.org:80/demo/example.cgi?land=de&stadt=aa#geschichte
    // | | | | | | | |
    // | | | host | url-path searchpart fragment
    // | | password port
    // | user
    // protocol

    int i = pstrWhatURL.indexOf("//");
    if (i > 0) {
      objURL = new URL(pstrWhatURL);
      strWhatSystem = pstrWhatURL.substring(0, i);
      if (strWhatSystem.equalsIgnoreCase(objURL.getProtocol())) {
        // nothing to do
      }
      strWhatSystem = objURL.getProtocol();
    }
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

    if (strWhatSystem.equalsIgnoreCase(enuTransferTypes.ssh2.Text())) {
      // TODO �ber late binding laden, damit es auch als Option verwendet werden kann
      // com.sos.VirtualFileSystem.SSH.SOSSSH2TriLeadImpl
      // objC = new SOSSSH2TriLeadImpl();
      // logger.debug(conMethodName + " returns instance of " + SOSSSH2TriLeadImpl.class.toString());
      // com.sos.VirtualFileSystem.SSH.SOSSSH2GanymedImpl
      // objC = new SOSSSH2GanymedImpl();
      // logger.debug(conMethodName + " returns instance of " + SOSSSH2GanymedImpl.class.toString());

//       Class objA = classLoader.loadClass("com.sos.VirtualFileSystem.SSH.SOSSSH2GanymedImpl");
      Class objA = classLoader.loadClass("com.sos.VirtualFileSystem.SSH.SOSSSH2TriLeadImpl");
      ISOSVFSHandler objD = (ISOSVFSHandler) objA.newInstance();
      logger.debug(String.format(objMsg.getMsg(SOSVfs_D_0201), conMethodName, objD.toString()));

      if (objD instanceof ISOSVFSHandler) {
        logger.debug("ISOSVFSHandler is part of class   ...  " + objA.toString());
        objC = (ISOSVFSHandler) objD;
      }
View Full Code Here

TOP

Related Classes of com.sos.VirtualFileSystem.Interfaces.ISOSVFSHandler

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.