Search in sources :

Example 1 with FileTransportManager

use of org.jumpmind.symmetric.transport.file.FileTransportManager in project symmetric-ds by JumpMind.

the class TransportManagerFactory method create.

public ITransportManager create(String transport) {
    if (Constants.PROTOCOL_HTTP.equalsIgnoreCase(transport)) {
        String httpSslVerifiedServerNames = symmetricEngine.getParameterService().getString(ServerConstants.HTTPS_VERIFIED_SERVERS);
        // Allow self signed certs based on the parameter value.
        boolean allowSelfSignedCerts = symmetricEngine.getParameterService().is(ServerConstants.HTTPS_ALLOW_SELF_SIGNED_CERTS, false);
        initHttps(httpSslVerifiedServerNames, allowSelfSignedCerts);
        return new HttpTransportManager(symmetricEngine);
    } else if (Constants.PROTOCOL_FILE.equalsIgnoreCase(transport)) {
        return new FileTransportManager(symmetricEngine);
    } else if (Constants.PROTOCOL_INTERNAL.equalsIgnoreCase(transport)) {
        return new InternalTransportManager(symmetricEngine);
    } else {
        throw new IllegalStateException("An invalid transport type of " + transport + " was specified.");
    }
}
Also used : FileTransportManager(org.jumpmind.symmetric.transport.file.FileTransportManager) InternalTransportManager(org.jumpmind.symmetric.transport.internal.InternalTransportManager) HttpTransportManager(org.jumpmind.symmetric.transport.http.HttpTransportManager)

Aggregations

FileTransportManager (org.jumpmind.symmetric.transport.file.FileTransportManager)1 HttpTransportManager (org.jumpmind.symmetric.transport.http.HttpTransportManager)1 InternalTransportManager (org.jumpmind.symmetric.transport.internal.InternalTransportManager)1