
com.joe.easysocket.server.common.protocol.ProtocolFuture Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of socket-common Show documentation
Show all versions of socket-common Show documentation
socket框架,方便快速开发socket服务端和客户端
The newest version!
package com.joe.easysocket.server.common.protocol;
/**
* 协议栈异步结果
*
* @author joe
*/
public interface ProtocolFuture {
//失败future
ProtocolFuture ERRORFUTURE = new ProtocolFuture() {
@Override
public boolean isDone() {
return true;
}
@Override
public boolean isSuccess() {
return false;
}
};
//成功future
ProtocolFuture SUCCESS = new ProtocolFuture() {
@Override
public boolean isDone() {
return true;
}
@Override
public boolean isSuccess() {
return true;
}
};
/**
* 是否完成(立即返回)
*
* @return 如果完成则返回true
*/
boolean isDone();
/**
* 是否成功(立即返回)
*
* @return 如果成功则返回true
*/
boolean isSuccess();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy