Class ExtractionContextProxy
- java.lang.Object
-
- org.hansken.plugin.extraction.runtime.grpc.server.proxy.ExtractionContextProxy
-
- All Implemented Interfaces:
AutoCloseable,DataContext
public final class ExtractionContextProxy extends Object implements DataContext, AutoCloseable
Proxy implementation for the server side of theextraction pluginframework. It delegates calls through gRPC (seeGrpcFacade) to the context on the client side.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()RandomAccessDatadata()StringdataType()static ExtractionContextProxyfromRpc(RpcDataContext context, String traceId, GrpcFacade facade)Create a newcontext proxyfor the context described by the givenRpcDataContext, using the givenGrpcFacadeto delegate calls to.
-
-
-
Method Detail
-
fromRpc
public static ExtractionContextProxy fromRpc(RpcDataContext context, String traceId, GrpcFacade facade)
Create a newcontext proxyfor the context described by the givenRpcDataContext, using the givenGrpcFacadeto delegate calls to.- Parameters:
context- the meta information of the context to mirror, such as the data typetraceId- the id of the tracefacade- the facade to delegate calls to- Returns:
- te context proxy
-
dataType
public String dataType()
- Specified by:
dataTypein interfaceDataContext
-
data
public RandomAccessData data()
- Specified by:
datain interfaceDataContext
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-