
org.zbus.net.MsgInvoker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zbus Show documentation
Show all versions of zbus Show documentation
lightweight message queue, service bus
package org.zbus.net;
import java.io.IOException;
import org.zbus.net.Sync.Id;
import org.zbus.net.Sync.ResultCallback;
public interface MsgInvoker {
/**
* 同步消息模式
*
@param req
* @param timeout
* @return
* @throws IOException
* @throws InterruptedException
*/
RES invokeSync(REQ req, int timeout) throws IOException, InterruptedException;
/**
* 异步消息模式
*
* @param msg
* @param callback
* @throws IOException
*/
void invokeAsync(REQ req, ResultCallback callback) throws IOException;
}