use of com.alibaba.otter.shared.communication.model.canal.FindCanalEvent in project otter by alibaba.
the class CanalConfigClient method findCanal.
/**
* 根据对应的destinantion查询Canal信息
*/
public Canal findCanal(String destination) {
FindCanalEvent event = new FindCanalEvent();
event.setDestination(destination);
try {
Object obj = delegate.callManager(event);
if (obj != null && obj instanceof Canal) {
return (Canal) obj;
} else {
throw new CanalException("No Such Canal by [" + destination + "]");
}
} catch (Exception e) {
throw new CanalException("call_manager_error", e);
}
}
Aggregations