Class StandardJavaGrpcStubFactory
java.lang.Object
net.devh.boot.grpc.client.stubfactory.StandardJavaGrpcStubFactory
- All Implemented Interfaces:
StubFactory
- Direct Known Subclasses:
AsyncStubFactory
,BlockingStubFactory
,FutureStubFactory
A factory for creating stubs provided by standard grpc Java library. This is an abstract super-type that can be
extended to support the different provided types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAbstractStub<?>
createStub
(Class<? extends AbstractStub<?>> stubType, Channel channel) Creates a stub of the given type.protected abstract String
Derives the name of the factory method from the given stub type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.devh.boot.grpc.client.stubfactory.StubFactory
isApplicable
-
Constructor Details
-
StandardJavaGrpcStubFactory
public StandardJavaGrpcStubFactory()
-
-
Method Details
-
createStub
Description copied from interface:StubFactory
Creates a stub of the given type.- Specified by:
createStub
in interfaceStubFactory
- Parameters:
stubType
- The type of the stub to create.channel
- The channel used to create the stub.- Returns:
- The newly created stub.
-
getFactoryMethodName
Derives the name of the factory method from the given stub type.- Returns:
- The name of the factory method.
-