use of weborb.types.IAdaptingType in project Android-SDK by Backendless.
the class AdaptingResponder method responseHandler.
public final void responseHandler(Object adaptingType) {
IAdaptingType type = (IAdaptingType) adaptingType;
IAdaptingType bodyHolder = ((NamedObject) type).getTypedObject();
if (((IAdaptingType) adaptingType).getDefaultType().equals(ErrMessage.class)) {
if (nextResponder != null) {
nextResponder.errorHandler(adaptFault((AnonymousObject) bodyHolder));
}
} else {
IAdaptingType entity = (IAdaptingType) ((AnonymousObject) bodyHolder).getProperties().get("body");
try {
adaptingPolicy.adapt(clazz, entity, nextResponder);
} catch (AdaptingException e) {
errorHandler(new BackendlessFault(e));
}
}
}
Aggregations