Package io.grpc.testing
Class GrpcCleanupRule.ServerResource
java.lang.Object
io.grpc.testing.GrpcCleanupRule.ServerResource
- All Implemented Interfaces:
GrpcCleanupRule.Resource
- Enclosing class:
GrpcCleanupRule
private static final class GrpcCleanupRule.ServerResource
extends Object
implements GrpcCleanupRule.Resource
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitReleased(long duration, TimeUnit timeUnit) Returns true if the resource is released in time.voidcleanUp()voidError already happened, try the best to clean up.toString()
-
Field Details
-
server
final io.grpc.Server server
-
-
Constructor Details
-
ServerResource
ServerResource(io.grpc.Server server)
-
-
Method Details
-
cleanUp
public void cleanUp()- Specified by:
cleanUpin interfaceGrpcCleanupRule.Resource
-
forceCleanUp
public void forceCleanUp()Description copied from interface:GrpcCleanupRule.ResourceError already happened, try the best to clean up. Never throws.- Specified by:
forceCleanUpin interfaceGrpcCleanupRule.Resource
-
awaitReleased
Description copied from interface:GrpcCleanupRule.ResourceReturns true if the resource is released in time.- Specified by:
awaitReleasedin interfaceGrpcCleanupRule.Resource- Throws:
InterruptedException
-
toString
-