pf5ub3a78 1 month ago
parent 3dd78b125b
commit a0446637ef

@ -0,0 +1,34 @@
package com.soa.microservice.core;
/**
*
*
*/
public interface ServiceClient {
/**
*
* @param serviceName
* @param method
* @param params
* @return
* @throws Exception
*/
Object invoke(String serviceName, String method, Object... params) throws Exception;
/**
*
* @param serviceName
* @param method
* @param callback
* @param params
*/
void invokeAsync(String serviceName, String method, ServiceCallback callback, Object... params);
/**
*
*/
interface ServiceCallback {
void onSuccess(Object result);
void onFailure(Exception e);
}
}
Loading…
Cancel
Save