Search in sources :

Example 1 with ServiceWrapper

use of com.adaptris.core.ServiceWrapper in project interlok by adaptris.

the class ServiceUtil method rewriteConnectionsForTesting.

public static Service rewriteConnectionsForTesting(Service service) throws CoreException {
    Service rewritten = service;
    if (rewritten instanceof ConnectedService) {
        ConnectedService connectedService = (ConnectedService) rewritten;
        connectedService.setConnection(cloneForTesting(connectedService.getConnection()));
    }
    if (rewritten instanceof ServiceCollection) {
        rewriteConnectionsForTesting((ServiceCollection) rewritten);
    }
    if (rewritten instanceof ServiceWrapper) {
        rewriteConnectionsForTesting((ServiceWrapper) rewritten);
    }
    return rewritten;
}
Also used : ServiceCollection(com.adaptris.core.ServiceCollection) ServiceWrapper(com.adaptris.core.ServiceWrapper) ConnectedService(com.adaptris.core.ConnectedService) Service(com.adaptris.core.Service) ConnectedService(com.adaptris.core.ConnectedService)

Aggregations

ConnectedService (com.adaptris.core.ConnectedService)1 Service (com.adaptris.core.Service)1 ServiceCollection (com.adaptris.core.ServiceCollection)1 ServiceWrapper (com.adaptris.core.ServiceWrapper)1