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 TypeMethodDescriptionboolean
awaitReleased
(long duration, TimeUnit timeUnit) Returns true if the resource is released in time.void
cleanUp()
void
Error 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:
cleanUp
in interfaceGrpcCleanupRule.Resource
-
forceCleanUp
public void forceCleanUp()Description copied from interface:GrpcCleanupRule.Resource
Error already happened, try the best to clean up. Never throws.- Specified by:
forceCleanUp
in interfaceGrpcCleanupRule.Resource
-
awaitReleased
Description copied from interface:GrpcCleanupRule.Resource
Returns true if the resource is released in time.- Specified by:
awaitReleased
in interfaceGrpcCleanupRule.Resource
- Throws:
InterruptedException
-
toString
-