Class TraceProxy
java.lang.Object
org.hansken.plugin.extraction.runtime.grpc.server.proxy.ImmutableTraceProxy
org.hansken.plugin.extraction.runtime.grpc.server.proxy.TraceProxy
- All Implemented Interfaces:
AutoCloseable,ImmutableTrace,Trace
Proxy implementation for the server side of the
extraction plugin framework. It
delegates calls through gRPC (see GrpcFacade) to the trace currently being processed on the client side.
Note: this implementation is not thread-safe.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hansken.plugin.extraction.api.Trace
Trace.Tracelet, Trace.TraceletBuilder, Trace.TraceletProperty -
Method Summary
Modifier and TypeMethodDescriptionaddTracelet(Trace.Tracelet tracelet) voidclose()static TraceProxyfromRpc(RpcTrace trace, GrpcFacade facade) Create a newtrace proxyfor thetracecurrently being processed, which is described by givenRpcTrace.<T> TnewChild(String name, ThrowingConsumer<Trace, IOException> enrichChildCallback) setData(String dataType, List<DataTransformation> transformations) setData(String dataType, DataWriter writer) types()Methods inherited from class org.hansken.plugin.extraction.runtime.grpc.server.proxy.ImmutableTraceProxy
traceIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hansken.plugin.extraction.api.ImmutableTrace
traceIdMethods inherited from interface org.hansken.plugin.extraction.api.Trace
addTracelet, addValue, setData, setData
-
Method Details
-
fromRpc
Create a newtrace proxyfor thetracecurrently being processed, which is described by givenRpcTrace. Calls to this proxy are delegated using the givenGrpcFacade.- Parameters:
trace- metadata of the trace currently being processed, such as the types and propertiesfacade- the facade to delegate calls to- Returns:
- the trace proxy
-
types
- Specified by:
typesin interfaceImmutableTrace- Overrides:
typesin classImmutableTraceProxy
-
addType
-
properties
- Specified by:
propertiesin interfaceImmutableTrace- Overrides:
propertiesin classImmutableTraceProxy
-
get
- Specified by:
getin interfaceImmutableTrace- Overrides:
getin classImmutableTraceProxy
-
set
-
addTracelet
- Specified by:
addTraceletin interfaceTrace
-
getNewTracelets
- Specified by:
getNewTraceletsin interfaceTrace
-
setData
- Specified by:
setDatain interfaceTrace- Throws:
IOException
-
setData
-
newChild
public Trace newChild(String name, ThrowingConsumer<Trace, IOException> enrichChildCallback) throws IOException- Specified by:
newChildin interfaceTrace- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-