observer,
timeConstraints);
if (!observer.await(timeConstraints)) {
// todo: we should really make this a client exception
throw new CougarServiceException(ServerFaultCode.Timeout, "Operation simpleConnectedObject timed out!");
}
final ExecutionResult er = observer.getExecutionResult();
switch (er.getResultType()) {
case Success:
return (ConnectedResponse) er.getResult();
case Fault:
CougarException cex = er.getFault();
if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
String className = cex.getFault().getDetail().getDetailMessage();
throw new CougarServiceException(ServerFaultCode.ServiceCheckedException, "Unknown checked exception received", cex);
} else {
throw cex;
}
default:
throw new IllegalArgumentException("The Server returned an illegal result type [" + er.getResultType() + "]");