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 java.lang.Object implements GrpcCleanupRule.Resource
-
-
Field Summary
Fields Modifier and Type Field Description (package private) io.grpc.Server
server
-
Constructor Summary
Constructors Constructor Description ServerResource(io.grpc.Server server)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitReleased(long duration, java.util.concurrent.TimeUnit timeUnit)
Returns true if the resource is released in time.void
cleanUp()
void
forceCleanUp()
Error already happened, try the best to clean up.java.lang.String
toString()
-
-
-
Method Detail
-
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
public boolean awaitReleased(long duration, java.util.concurrent.TimeUnit timeUnit) throws java.lang.InterruptedException
Description copied from interface:GrpcCleanupRule.Resource
Returns true if the resource is released in time.- Specified by:
awaitReleased
in interfaceGrpcCleanupRule.Resource
- Throws:
java.lang.InterruptedException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-