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