public class FaceApiThriftClientAsync extends java.lang.Object
FaceApi
接口的异步RPC实现(线程安全)FaceApi
接口方法到delegate()
指定的实例RuntimeException
异常被封装到ServiceRuntimeException
中抛出FaceApiThriftClientAsync thriftInstance = ClientFactory .builder() .setHostAndPort("127.0.0.1",26413) .build(FaceApi.class, FaceApiThriftClientAsync.class);计算机生成代码(generated by automated tools ThriftServiceDecoratorGenerator @author guyadong)
Modifier and Type | Class and Description |
---|---|
static class |
FaceApiThriftClientAsync.DefaultCallback<V>
默认的
FutureCallback 实现 |
Constructor and Description |
---|
FaceApiThriftClientAsync(net.gdface.thrift.ClientFactory factory) |
FaceApiThriftClientAsync(com.google.common.net.HostAndPort hostAndPort) |
FaceApiThriftClientAsync(java.lang.String host,
int port) |
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<java.lang.Double> |
compare2Face(byte[] imgData1,
CodeInfo facePos1,
byte[] imgData2,
CodeInfo facePos2)
|
void |
compare2Face(byte[] imgData1,
CodeInfo facePos1,
byte[] imgData2,
CodeInfo facePos2,
com.google.common.util.concurrent.FutureCallback<java.lang.Double> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Double> |
compareCode(byte[] code1,
byte[] code2)
see also
FaceApi.compareCode(byte[],byte[]) |
void |
compareCode(byte[] code1,
byte[] code2,
com.google.common.util.concurrent.FutureCallback<java.lang.Double> callback) |
com.google.common.util.concurrent.ListenableFuture<double[]> |
compareCodes(byte[] code1,
CodeInfo[] codes)
|
void |
compareCodes(byte[] code1,
CodeInfo[] codes,
com.google.common.util.concurrent.FutureCallback<double[]> callback) |
com.google.common.util.concurrent.ListenableFuture<CompareResult> |
compareFaces(byte[] code,
byte[] imgData,
int faceNum)
|
void |
compareFaces(byte[] code,
byte[] imgData,
int faceNum,
com.google.common.util.concurrent.FutureCallback<CompareResult> callback) |
com.google.common.util.concurrent.ListenableFuture<java.util.List<java.lang.Double>> |
compareFeatures(byte[] code1,
java.util.List<byte[]> codes)
|
void |
compareFeatures(byte[] code1,
java.util.List<byte[]> codes,
com.google.common.util.concurrent.FutureCallback<java.util.List<java.lang.Double>> callback) |
protected FaceApi.Async |
delegate() |
com.google.common.util.concurrent.ListenableFuture<java.lang.Double> |
detectAndCompare2Face(byte[] imgData1,
FRect detectRect1,
byte[] imgData2,
FRect detectRect2)
|
void |
detectAndCompare2Face(byte[] imgData1,
FRect detectRect1,
byte[] imgData2,
FRect detectRect2,
com.google.common.util.concurrent.FutureCallback<java.lang.Double> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> |
detectAndGetCodeInfo(byte[] imgData,
int faceNum)
|
void |
detectAndGetCodeInfo(byte[] imgData,
int faceNum,
com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo> |
detectCenterFace(byte[] imgData)
see also
FaceApi.detectCenterFace(byte[]) |
void |
detectCenterFace(byte[] imgData,
com.google.common.util.concurrent.FutureCallback<CodeInfo> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> |
detectFace(byte[] imgData)
see also
FaceApi.detectFace(byte[]) |
void |
detectFace(byte[] imgData,
com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo> |
detectMaxFace(byte[] imgData)
see also
FaceApi.detectMaxFace(byte[]) |
void |
detectMaxFace(byte[] imgData,
com.google.common.util.concurrent.FutureCallback<CodeInfo> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo> |
getCodeInfo(byte[] imgData,
CodeInfo facePos)
|
void |
getCodeInfo(byte[] imgData,
CodeInfo facePos,
com.google.common.util.concurrent.FutureCallback<CodeInfo> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> |
getCodeInfo(byte[] imgData,
int faceNum,
CodeInfo[] facePos)
|
void |
getCodeInfo(byte[] imgData,
int faceNum,
CodeInfo[] facePos,
com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback) |
net.gdface.thrift.ClientFactory |
getFactory() |
com.google.common.util.concurrent.ListenableFuture<byte[]> |
getFeature(java.util.Map<java.nio.ByteBuffer,CodeInfo> faces)
see also
FaceApi.getFeature(java.util.Map) |
void |
getFeature(java.util.Map<java.nio.ByteBuffer,CodeInfo> faces,
com.google.common.util.concurrent.FutureCallback<byte[]> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
hasFace(byte[] imgData)
see also
FaceApi.hasFace(byte[]) |
void |
hasFace(byte[] imgData,
com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback) |
boolean |
isLocal()
see also
FaceApi.isLocal() |
com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> |
matDetectAndGetCodeInfo(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
int faceNum)
|
void |
matDetectAndGetCodeInfo(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
int faceNum,
com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> |
matDetectFace(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height)
|
void |
matDetectFace(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo> |
matDetectMaxFace(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height)
|
void |
matDetectMaxFace(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
com.google.common.util.concurrent.FutureCallback<CodeInfo> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo> |
matGetCodeInfo(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
CodeInfo facePos)
|
void |
matGetCodeInfo(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
CodeInfo facePos,
com.google.common.util.concurrent.FutureCallback<CodeInfo> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> |
matGetCodeInfo(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
int facenum,
CodeInfo[] facePos)
|
void |
matGetCodeInfo(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
int facenum,
CodeInfo[] facePos,
com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
matHasFace(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height)
|
void |
matHasFace(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback) |
com.google.common.util.concurrent.ListenableFuture<FseResult[]> |
matSearchFaces(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
CodeInfo facePos,
double similarty,
int rows)
|
void |
matSearchFaces(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
CodeInfo facePos,
double similarty,
int rows,
com.google.common.util.concurrent.FutureCallback<FseResult[]> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
matWearMask(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
CodeInfo faceInfo)
|
void |
matWearMask(net.gdface.image.MatType matType,
byte[] matData,
int width,
int height,
CodeInfo faceInfo,
com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback) |
com.google.common.util.concurrent.ListenableFuture<java.util.Map<java.lang.String,java.lang.String>> |
sdkCapacity()
see also
FaceApi.sdkCapacity() |
void |
sdkCapacity(com.google.common.util.concurrent.FutureCallback<java.util.Map<java.lang.String,java.lang.String>> callback) |
com.google.common.util.concurrent.ListenableFuture<FseResult[]> |
searchFaces(byte[] imgData,
CodeInfo facePos,
double similarty,
int rows)
|
void |
searchFaces(byte[] imgData,
CodeInfo facePos,
double similarty,
int rows,
com.google.common.util.concurrent.FutureCallback<FseResult[]> callback) |
com.google.common.util.concurrent.ListenableFuture<FseResult[]> |
searchFeatures(byte[] feature,
double similarty,
int rows)
|
void |
searchFeatures(byte[] feature,
double similarty,
int rows,
com.google.common.util.concurrent.FutureCallback<FseResult[]> callback) |
boolean |
testConnect()
test if connectable for RPC service
|
java.lang.String |
toString() |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
wearMask(byte[] imgData,
CodeInfo faceInfo)
|
void |
wearMask(byte[] imgData,
CodeInfo faceInfo,
com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback) |
public FaceApiThriftClientAsync(net.gdface.thrift.ClientFactory factory)
public FaceApiThriftClientAsync(java.lang.String host, int port)
host
- RPC service hostport
- RPC service portpublic FaceApiThriftClientAsync(com.google.common.net.HostAndPort hostAndPort)
hostAndPort
- RPC service host and portpublic net.gdface.thrift.ClientFactory getFactory()
public boolean testConnect()
true
if connectable ,otherwise false
protected FaceApi.Async delegate()
FaceApi.Async
实例public java.lang.String toString()
toString
in class java.lang.Object
public com.google.common.util.concurrent.ListenableFuture<java.lang.Double> compare2Face(byte[] imgData1, CodeInfo facePos1, byte[] imgData2, CodeInfo facePos2)
public void compare2Face(byte[] imgData1, CodeInfo facePos1, byte[] imgData2, CodeInfo facePos2, com.google.common.util.concurrent.FutureCallback<java.lang.Double> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Double> compareCode(byte[] code1, byte[] code2)
FaceApi.compareCode(byte[],byte[])
public void compareCode(byte[] code1, byte[] code2, com.google.common.util.concurrent.FutureCallback<java.lang.Double> callback)
public com.google.common.util.concurrent.ListenableFuture<double[]> compareCodes(byte[] code1, CodeInfo[] codes)
public void compareCodes(byte[] code1, CodeInfo[] codes, com.google.common.util.concurrent.FutureCallback<double[]> callback)
public com.google.common.util.concurrent.ListenableFuture<CompareResult> compareFaces(byte[] code, byte[] imgData, int faceNum)
public void compareFaces(byte[] code, byte[] imgData, int faceNum, com.google.common.util.concurrent.FutureCallback<CompareResult> callback)
public com.google.common.util.concurrent.ListenableFuture<java.util.List<java.lang.Double>> compareFeatures(byte[] code1, java.util.List<byte[]> codes)
public void compareFeatures(byte[] code1, java.util.List<byte[]> codes, com.google.common.util.concurrent.FutureCallback<java.util.List<java.lang.Double>> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Double> detectAndCompare2Face(byte[] imgData1, FRect detectRect1, byte[] imgData2, FRect detectRect2)
public void detectAndCompare2Face(byte[] imgData1, FRect detectRect1, byte[] imgData2, FRect detectRect2, com.google.common.util.concurrent.FutureCallback<java.lang.Double> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> detectAndGetCodeInfo(byte[] imgData, int faceNum)
public void detectAndGetCodeInfo(byte[] imgData, int faceNum, com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo> detectCenterFace(byte[] imgData)
FaceApi.detectCenterFace(byte[])
public void detectCenterFace(byte[] imgData, com.google.common.util.concurrent.FutureCallback<CodeInfo> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> detectFace(byte[] imgData)
FaceApi.detectFace(byte[])
public void detectFace(byte[] imgData, com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo> detectMaxFace(byte[] imgData)
FaceApi.detectMaxFace(byte[])
public void detectMaxFace(byte[] imgData, com.google.common.util.concurrent.FutureCallback<CodeInfo> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> getCodeInfo(byte[] imgData, int faceNum, CodeInfo[] facePos)
public void getCodeInfo(byte[] imgData, int faceNum, CodeInfo[] facePos, com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo> getCodeInfo(byte[] imgData, CodeInfo facePos)
public void getCodeInfo(byte[] imgData, CodeInfo facePos, com.google.common.util.concurrent.FutureCallback<CodeInfo> callback)
public com.google.common.util.concurrent.ListenableFuture<byte[]> getFeature(java.util.Map<java.nio.ByteBuffer,CodeInfo> faces)
FaceApi.getFeature(java.util.Map)
public void getFeature(java.util.Map<java.nio.ByteBuffer,CodeInfo> faces, com.google.common.util.concurrent.FutureCallback<byte[]> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> hasFace(byte[] imgData)
FaceApi.hasFace(byte[])
public void hasFace(byte[] imgData, com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback)
public boolean isLocal()
FaceApi.isLocal()
public com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> matDetectAndGetCodeInfo(net.gdface.image.MatType matType, byte[] matData, int width, int height, int faceNum)
public void matDetectAndGetCodeInfo(net.gdface.image.MatType matType, byte[] matData, int width, int height, int faceNum, com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> matDetectFace(net.gdface.image.MatType matType, byte[] matData, int width, int height)
public void matDetectFace(net.gdface.image.MatType matType, byte[] matData, int width, int height, com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo> matDetectMaxFace(net.gdface.image.MatType matType, byte[] matData, int width, int height)
public void matDetectMaxFace(net.gdface.image.MatType matType, byte[] matData, int width, int height, com.google.common.util.concurrent.FutureCallback<CodeInfo> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo[]> matGetCodeInfo(net.gdface.image.MatType matType, byte[] matData, int width, int height, int facenum, CodeInfo[] facePos)
public void matGetCodeInfo(net.gdface.image.MatType matType, byte[] matData, int width, int height, int facenum, CodeInfo[] facePos, com.google.common.util.concurrent.FutureCallback<CodeInfo[]> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeInfo> matGetCodeInfo(net.gdface.image.MatType matType, byte[] matData, int width, int height, CodeInfo facePos)
public void matGetCodeInfo(net.gdface.image.MatType matType, byte[] matData, int width, int height, CodeInfo facePos, com.google.common.util.concurrent.FutureCallback<CodeInfo> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> matHasFace(net.gdface.image.MatType matType, byte[] matData, int width, int height)
public void matHasFace(net.gdface.image.MatType matType, byte[] matData, int width, int height, com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback)
public com.google.common.util.concurrent.ListenableFuture<FseResult[]> matSearchFaces(net.gdface.image.MatType matType, byte[] matData, int width, int height, CodeInfo facePos, double similarty, int rows)
public void matSearchFaces(net.gdface.image.MatType matType, byte[] matData, int width, int height, CodeInfo facePos, double similarty, int rows, com.google.common.util.concurrent.FutureCallback<FseResult[]> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> matWearMask(net.gdface.image.MatType matType, byte[] matData, int width, int height, CodeInfo faceInfo)
public void matWearMask(net.gdface.image.MatType matType, byte[] matData, int width, int height, CodeInfo faceInfo, com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback)
public com.google.common.util.concurrent.ListenableFuture<java.util.Map<java.lang.String,java.lang.String>> sdkCapacity()
FaceApi.sdkCapacity()
public void sdkCapacity(com.google.common.util.concurrent.FutureCallback<java.util.Map<java.lang.String,java.lang.String>> callback)
public com.google.common.util.concurrent.ListenableFuture<FseResult[]> searchFaces(byte[] imgData, CodeInfo facePos, double similarty, int rows)
public void searchFaces(byte[] imgData, CodeInfo facePos, double similarty, int rows, com.google.common.util.concurrent.FutureCallback<FseResult[]> callback)
public com.google.common.util.concurrent.ListenableFuture<FseResult[]> searchFeatures(byte[] feature, double similarty, int rows)
public void searchFeatures(byte[] feature, double similarty, int rows, com.google.common.util.concurrent.FutureCallback<FseResult[]> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> wearMask(byte[] imgData, CodeInfo faceInfo)
Copyright © 2020. All rights reserved.