com.sun.jini.norm
Class NormServerBaseImpl.ReadyState

java.lang.Object
  extended by com.sun.jini.norm.NormServerBaseImpl.ReadyState
Enclosing class:
NormServerBaseImpl

private static final class NormServerBaseImpl.ReadyState
extends Object

Prevents access to the service before it is ready or after it starts to shutdown. Each public entrypoint to the service should call check or shutdown, and initialization should call ready when the service is ready to use.


Field Summary
private static int INITIALIZE
           
private static int READY
           
private static int SHUTDOWN
           
private  int state
           
 
Constructor Summary
private NormServerBaseImpl.ReadyState()
           
 
Method Summary
(package private)  void check()
          Checks if the service is ready to use, waiting if it is initializing, and throwing IllegalStateException if it is shutting down.
(package private)  void ready()
          Marks the service ready for use, throwing IllegalStateException if it is shutting down.
(package private)  void shutdown()
          Marks the service as shutting down, waiting if it is initializing, and throwing IllegalStateException if it is already shutting down.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIALIZE

private static final int INITIALIZE
See Also:
Constant Field Values

READY

private static final int READY
See Also:
Constant Field Values

SHUTDOWN

private static final int SHUTDOWN
See Also:
Constant Field Values

state

private int state
Constructor Detail

NormServerBaseImpl.ReadyState

private NormServerBaseImpl.ReadyState()
Method Detail

check

void check()
Checks if the service is ready to use, waiting if it is initializing, and throwing IllegalStateException if it is shutting down.


ready

void ready()
Marks the service ready for use, throwing IllegalStateException if it is shutting down.


shutdown

void shutdown()
Marks the service as shutting down, waiting if it is initializing, and throwing IllegalStateException if it is already shutting down.



Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.