Subversion Repository Public Repository

litesoft

Diff Revisions 960 vs 961 for /trunk/DeviceDesktopTest/src/org/litesoft/jetty/Shutdown.java

Diff revisions: vs.
  @@ -1,27 +1,21 @@
1 1 package org.litesoft.jetty;
2 2
3 - public interface Shutdown
4 - {
3 + public interface Shutdown {
5 4 void request( int pExitCode );
6 5
7 - static class Instance
8 - {
6 + static class Instance {
9 7 private static Shutdown SHUTDOWN;
10 8
11 - public static synchronized Shutdown get()
12 - {
9 + public static synchronized Shutdown get() {
13 10 Shutdown zInstance = SHUTDOWN;
14 - if ( zInstance != null )
15 - {
11 + if ( zInstance != null ) {
16 12 return zInstance;
17 13 }
18 14 throw new IllegalStateException( "Shutdown.Instance not initialized YET!" );
19 15 }
20 16
21 - public static synchronized void set( Shutdown pShutdown )
22 - {
23 - if ( pShutdown == null )
24 - {
17 + public static synchronized void set( Shutdown pShutdown ) {
18 + if ( pShutdown == null ) {
25 19 throw new IllegalArgumentException( "Shutdown.Instance may NOT be set to null!" );
26 20 }
27 21 SHUTDOWN = pShutdown;