// 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;
}