private Map<OperationKey, Executable> executableMap = new HashMap<OperationKey, Executable>();
private BaselineService service;
public BaselineSyncServiceExecutableResolver() {
executableMap.put(BaselineServiceDefinition.echoCougarPropertyValueKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
String result = service.echoCougarPropertyValue((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.mandatoryCollectionElementTestKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.mandatoryCollectionElementTest((RequestContext)ctx, (List<ComplexObject>)args[0], (Map<String,ComplexObject>)args[1], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.interceptorCheckedExceptionOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.interceptorCheckedExceptionOperation((RequestContext)ctx, (PreOrPostInterceptorException)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.listOfComplexOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.listOfComplexOperation((RequestContext)ctx, (List<ComplexObject>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.setOfComplexOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.setOfComplexOperation((RequestContext)ctx, (Set<ComplexObject>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.mapOfComplexOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.mapOfComplexOperation((RequestContext)ctx, (Map<String,ComplexObject>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSimpleDateListGetKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
List<Date> result = service.testSimpleDateListGet((RequestContext)ctx, (List<Date>)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSimpleMapGetKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Map<String,String> result = service.testSimpleMapGet((RequestContext)ctx, (Map<String,String>)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSimpleListGetKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
List<String> result = service.testSimpleListGet((RequestContext)ctx, (List<String>)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSimpleSetGetKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Set<String> result = service.testSimpleSetGet((RequestContext)ctx, (Set<String>)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSimpleGetKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testSimpleGet((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSimpleGetQAKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testSimpleGetQA((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testLargeGetKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
LargeRequest result = service.testLargeGet((RequestContext)ctx, (Integer)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testLargeMapGetKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
MapDataType result = service.testLargeMapGet((RequestContext)ctx, (Integer)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testMapsNameClashKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponseMap result = service.testMapsNameClash((RequestContext)ctx, (SimpleMap)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSleepKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.testSleep((RequestContext)ctx, (Long)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.cancelSleepsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Integer result = service.cancelSleeps((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testParameterStylesKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
List<String> result = service.testParameterStyles((RequestContext)ctx, (TestParameterStylesHeaderParamEnum)args[0], (String)args[1], (String)args[2], (Date)args[3], (Float)args[4], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testParameterStylesQAKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testParameterStylesQA((RequestContext)ctx, (TestParameterStylesQAHeaderParamEnum)args[0], (String)args[1], (Date)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testDateRetrievalKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
DateContainer result = service.testDateRetrieval((RequestContext)ctx, (DateContainer)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testDoubleHandlingKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
DoubleResponse result = service.testDoubleHandling((RequestContext)ctx, (DoubleContainer)args[0], (Double)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testListRetrievalKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
PrimitiveLists result = service.testListRetrieval((RequestContext)ctx, (Integer)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testComplexMutatorKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testComplexMutator((RequestContext)ctx, (ComplexObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testLargePostKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testLargePost((RequestContext)ctx, (LargeRequest)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testLargePostQAKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testLargePostQA((RequestContext)ctx, (LargeRequest)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testExceptionKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testException((RequestContext)ctx, (String)args[0], (String)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
} catch (WotsitException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testExceptionQAKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testExceptionQA((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
} catch (WotsitException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testNamedCougarExceptionKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testNamedCougarException((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSecureServiceKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testSecureService((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testNoParamsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
NoParamsResponse result = service.testNoParams((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testIdentityChainKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
IdentChain result = service.testIdentityChain((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testSimpleTypeReplacementKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleContainer result = service.testSimpleTypeReplacement((RequestContext)ctx, (Integer)args[0], (Double)args[1], (String)args[2], (SimpleValidValue)args[3], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testStringableListsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleListContainer result = service.testStringableLists((RequestContext)ctx, (Set<Integer>)args[0], (List<String>)args[1], (List<SimpleValidValue>)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testBodyParamsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.testBodyParams((RequestContext)ctx, (String)args[0], (Integer)args[1], (ComplexObject)args[2], (SimpleValidValue)args[3], (ComplexObject)args[4], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testDirectMapReturnKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Map<String,SimpleResponse> result = service.testDirectMapReturn((RequestContext)ctx, (Integer)args[0], (AsyncBehaviour)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.testDirectListReturnKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
List<SimpleResponse> result = service.testDirectListReturn((RequestContext)ctx, (Integer)args[0], (AsyncBehaviour)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.kpiTestingKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.kpiTesting((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.waitSecondsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.waitSeconds((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.logMessageKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.logMessage((RequestContext)ctx, (String)args[0], (String)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.bulkCallerKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Long result = service.bulkCaller((RequestContext)ctx, (Integer)args[0], (String)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.changeLogLevelKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.changeLogLevel((RequestContext)ctx, (String)args[0], (String)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.enumOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
EnumOperationResponseObject result = service.enumOperation((RequestContext)ctx, (EnumOperationHeaderParamEnum)args[0], (EnumOperationQueryParamEnum)args[1], (BodyParamEnumObject)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.enumHandlingKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
EnumHandling result = service.enumHandling((RequestContext)ctx, (EnumHandling)args[0], (Boolean)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.enumHandling2Key,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
ClientServerEnum result = service.enumHandling2((RequestContext)ctx, (ClientServerEnum)args[0], (Boolean)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.enumHandling3Key,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
EnumHandling3WrappedValueEnum result = service.enumHandling3((RequestContext)ctx, (EnumHandling3BodyParameterEnum)args[0], (Boolean)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.i32OperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
I32OperationResponseObject result = service.i32Operation((RequestContext)ctx, (Integer)args[0], (Integer)args[1], (BodyParamI32Object)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.i64OperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
I64OperationResponseObject result = service.i64Operation((RequestContext)ctx, (Long)args[0], (Long)args[1], (BodyParamI64Object)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.byteOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
ByteOperationResponseObject result = service.byteOperation((RequestContext)ctx, (Byte)args[0], (Byte)args[1], (BodyParamByteObject)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.floatOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
FloatOperationResponseObject result = service.floatOperation((RequestContext)ctx, (Float)args[0], (Float)args[1], (BodyParamFloatObject)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.doubleOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
DoubleOperationResponseObject result = service.doubleOperation((RequestContext)ctx, (Double)args[0], (Double)args[1], (BodyParamDoubleObject)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.boolOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
BoolOperationResponseObject result = service.boolOperation((RequestContext)ctx, (Boolean)args[0], (Boolean)args[1], (BodyParamBoolObject)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.nonMandatoryParamsOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
NonMandatoryParamsOperationResponseObject result = service.nonMandatoryParamsOperation((RequestContext)ctx, (String)args[0], (String)args[1], (NonMandatoryParamsRequest)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.mandatoryParamsOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
MandatoryParamsOperationResponseObject result = service.mandatoryParamsOperation((RequestContext)ctx, (String)args[0], (String)args[1], (MandatoryParamsRequest)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.setHealthStatusInfoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleResponse result = service.setHealthStatusInfo((RequestContext)ctx, (HealthStatusInfoRequest)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.dateTimeOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
DateTimeOperationResponseObject result = service.dateTimeOperation((RequestContext)ctx, (BodyParamDateTimeObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.simpleMapOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleMapOperationResponseObject result = service.simpleMapOperation((RequestContext)ctx, (BodyParamSimpleMapObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.complexMapOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
ComplexMapOperationResponseObject result = service.complexMapOperation((RequestContext)ctx, (BodyParamComplexMapObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.simpleSetOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleSetOperationResponseObject result = service.simpleSetOperation((RequestContext)ctx, (BodyParamSimpleSetObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.complexSetOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
ComplexSetOperationResponseObject result = service.complexSetOperation((RequestContext)ctx, (BodyParamComplexSetObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.dateTimeSetOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
DateTimeSetOperationResponseObject result = service.dateTimeSetOperation((RequestContext)ctx, (BodyParamDateTimeSetObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.dateTimeListOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
DateTimeListOperationResponseObject result = service.dateTimeListOperation((RequestContext)ctx, (BodyParamDateTimeListObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.dateTimeMapOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
DateTimeMapOperationResponseObject result = service.dateTimeMapOperation((RequestContext)ctx, (BodyParamDateTimeMapObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.mapDateTimeKeyOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
MapDateTimeKeyOperationResponseObject result = service.mapDateTimeKeyOperation((RequestContext)ctx, (BodyParamMapDateTimeKeyObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.i32SimpleTypeOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
I32SimpleOperationResponseObject result = service.i32SimpleTypeOperation((RequestContext)ctx, (Integer)args[0], (Integer)args[1], (I32SimpleTypeRequestObject)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.enumSimpleOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
EnumSimpleResponseObject result = service.enumSimpleOperation((RequestContext)ctx, (SimpleEnum)args[0], (SimpleEnum)args[1], (EnumSimpleRequestObject)args[2], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.stringListOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
NonMandatoryParamsOperationResponseObject result = service.stringListOperation((RequestContext)ctx, (List<String>)args[0], (List<String>)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.stringSetOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
NonMandatoryParamsOperationResponseObject result = service.stringSetOperation((RequestContext)ctx, (Set<String>)args[0], (Set<String>)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.simpleEnumListOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
NonMandatoryParamsOperationResponseObject result = service.simpleEnumListOperation((RequestContext)ctx, (List<SimpleEnum>)args[0], (List<SimpleEnum>)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.callWithEnumResponseKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
SimpleValidValue result = service.callWithEnumResponse((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.simpleEnumSetOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
NonMandatoryParamsOperationResponseObject result = service.simpleEnumSetOperation((RequestContext)ctx, (Set<SimpleEnum>)args[0], (Set<SimpleEnum>)args[1], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.voidResponseOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.voidResponseOperation((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.simpleEventPublicationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Boolean result = service.simpleEventPublication((RequestContext)ctx, (TimeContainer)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.emitMatchedBetKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.emitMatchedBet((RequestContext)ctx, (MatchedBetStruct)args[0], (MarketStruct)args[1], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.emitLogMessageKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.emitLogMessage((RequestContext)ctx, (String)args[0], (String)args[1], (Long)args[2], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.emitListEventKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.emitListEvent((RequestContext)ctx, (List<String>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.emitSetEventKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.emitSetEvent((RequestContext)ctx, (Set<String>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.emitMapEventKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.emitMapEvent((RequestContext)ctx, (Map<String,String>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.boolSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Boolean result = service.boolSimpleTypeEcho((RequestContext)ctx, (Boolean)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.byteSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Byte result = service.byteSimpleTypeEcho((RequestContext)ctx, (Byte)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.i32SimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Integer result = service.i32SimpleTypeEcho((RequestContext)ctx, (Integer)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.i64SimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Long result = service.i64SimpleTypeEcho((RequestContext)ctx, (Long)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.floatSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Float result = service.floatSimpleTypeEcho((RequestContext)ctx, (Float)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.doubleSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Double result = service.doubleSimpleTypeEcho((RequestContext)ctx, (Double)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.stringSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
String result = service.stringSimpleTypeEcho((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.dateTimeSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Date result = service.dateTimeSimpleTypeEcho((RequestContext)ctx, (Date)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.i32ListSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
List<Integer> result = service.i32ListSimpleTypeEcho((RequestContext)ctx, (List<Integer>)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.i32SetSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Set<Integer> result = service.i32SetSimpleTypeEcho((RequestContext)ctx, (Set<Integer>)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.i32MapSimpleTypeEchoKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Map<Integer,Integer> result = service.i32MapSimpleTypeEcho((RequestContext)ctx, (Map<Integer,Integer>)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.getInferredCountryCodeKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
String result = service.getInferredCountryCode((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.emitLongEventKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.emitLongEvent((RequestContext)ctx, (String)args[0], (Long)args[1], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.subscribeToOwnEventsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.subscribeToOwnEvents((RequestContext)ctx, (List<String>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.unsubscribeFromOwnEventsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.unsubscribeFromOwnEvents((RequestContext)ctx, (List<String>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.getReceivedEventsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
List<ReceivedEvent> result = service.getReceivedEvents((RequestContext)ctx, (GetReceivedEventsEventEnum)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
} catch (SimpleException ex) {
observer.onResult(new ExecutionResult((CougarApplicationException)ex));
};
}
});
executableMap.put(BaselineServiceDefinition.updateSimpleConnectedObjectKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.updateSimpleConnectedObject((RequestContext)ctx, (SimpleConnectedObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.simpleConnectedObjectKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
ConnectedResponse result = service.simpleConnectedObject((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.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) {
try {
service.appendSimpleConnectedObject((RequestContext)ctx, (SimpleConnectedObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.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) {
try {
service.updateSimpleConnectedList((RequestContext)ctx, (List<SimpleConnectedObject>)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.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) {
try {
ConnectedResponse result = service.simpleConnectedList((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.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) {
try {
service.updateComplexConnectedObject((RequestContext)ctx, (VeryComplexObject)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.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) {
try {
ConnectedResponse result = service.complexConnectedObject((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.closeAllSubscriptionsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
service.closeAllSubscriptions((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult());
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.getNumSubscriptionsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
Integer result = service.getNumSubscriptions((RequestContext)ctx, (String)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.testConnectedObjectsKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
TestResults result = service.testConnectedObjects((RequestContext)ctx, (TestConnectedObjectsProtocolEnum)args[0], timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.checkSecurityKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
try {
CallSecurity result = service.checkSecurity((RequestContext)ctx, timeConstraints);
observer.onResult(new ExecutionResult(result));
} catch (CougarException ce) {
observer.onResult(new ExecutionResult(ce));
};
}
});
executableMap.put(BaselineServiceDefinition.subscribeToTimeTickOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
service.subscribeToTimeTick(ctx, args, observer);
}
});
executableMap.put(BaselineServiceDefinition.subscribeToMatchedBetOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
service.subscribeToMatchedBet(ctx, args, observer);
}
});
executableMap.put(BaselineServiceDefinition.subscribeToLogMessageOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
service.subscribeToLogMessage(ctx, args, observer);
}
});
executableMap.put(BaselineServiceDefinition.subscribeToListEventOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
service.subscribeToListEvent(ctx, args, observer);
}
});
executableMap.put(BaselineServiceDefinition.subscribeToSetEventOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
service.subscribeToSetEvent(ctx, args, observer);
}
});
executableMap.put(BaselineServiceDefinition.subscribeToMapEventOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
service.subscribeToMapEvent(ctx, args, observer);
}
});
executableMap.put(BaselineServiceDefinition.subscribeToLongEventOperationKey,
new Executable() {
@Override
public void execute(ExecutionContext ctx, OperationKey key,
Object[] args, ExecutionObserver observer,
ExecutionVenue executionVenue, TimeConstraints timeConstraints) {
service.subscribeToLongEvent(ctx, args, observer);