public class ReadyState extends Object
check
or shutdown
,
and initialization should call ready
when the service is ready
to use.Modifier and Type | Class and Description |
---|---|
private static class |
ReadyState.RemoteExceptionWrapper
Wrapper used to prevent a
RemoteException from being
wrapped in a ServerException by the RMI implementation. |
Modifier and Type | Field and Description |
---|---|
private static int |
INITIALIZE |
private static int |
READY |
private static int |
SHUTDOWN |
private int |
state |
Constructor and Description |
---|
ReadyState() |
Modifier and Type | Method and Description |
---|---|
void |
check()
Checks if the service is ready to use, waiting if it is
initializing, and throwing
NoSuchObjectException if it is
shutting down. |
void |
ready()
Marks the service ready for use.
|
void |
shutdown()
Marks the service as shutting down, waiting if it is initializing,
and throwing
NoSuchObjectException if it is already
shutting down. |
private static final int INITIALIZE
private static final int READY
private static final int SHUTDOWN
private int state
public void check()
NoSuchObjectException
if it is
shutting down. Note that the NoSuchObjectException
will be
wrapped in a RemoteExceptionWrapper
.public void ready()
public void shutdown()
NoSuchObjectException
if it is already
shutting down. Note that the NoSuchObjectException
will be
wrapped in a RemoteExceptionWrapper
.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.