ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
ServiceExceptionHandlingObserver exceptionHandlingObserver = new ServiceExceptionHandlingObserver(observer);
try {
ConnectedResponse result = service.simpleConnectedObject((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
exceptionHandlingObserver.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.appendSimpleConnectedObjectKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
ServiceExceptionHandlingObserver exceptionHandlingObserver = new ServiceExceptionHandlingObserver(observer);
try {
service.appendSimpleConnectedObject((RequestContext)ctx, (SimpleConnectedObject)args[0], timeConstraints);
exceptionHandlingObserver.onResult(new ExecutionResult());
} catch (CougarException ce) {
exceptionHandlingObserver.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.updateSimpleConnectedListKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
ServiceExceptionHandlingObserver exceptionHandlingObserver = new ServiceExceptionHandlingObserver(observer);
try {
service.updateSimpleConnectedList((RequestContext)ctx, (List<SimpleConnectedObject>)args[0], timeConstraints);
exceptionHandlingObserver.onResult(new ExecutionResult());
} catch (CougarException ce) {
exceptionHandlingObserver.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.simpleConnectedListKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
ServiceExceptionHandlingObserver exceptionHandlingObserver = new ServiceExceptionHandlingObserver(observer);
try {
ConnectedResponse result = service.simpleConnectedList((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
exceptionHandlingObserver.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.updateComplexConnectedObjectKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
ServiceExceptionHandlingObserver exceptionHandlingObserver = new ServiceExceptionHandlingObserver(observer);
try {
service.updateComplexConnectedObject((RequestContext)ctx, (VeryComplexObject)args[0], timeConstraints);
exceptionHandlingObserver.onResult(new ExecutionResult());
} catch (CougarException ce) {
exceptionHandlingObserver.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.complexConnectedObjectKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
ServiceExceptionHandlingObserver exceptionHandlingObserver = new ServiceExceptionHandlingObserver(observer);
try {
ConnectedResponse result = service.complexConnectedObject((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
exceptionHandlingObserver.onResult(new ExecutionResult(ce));
};
}