summaryrefslogtreecommitdiff
path: root/java/demo/Ice/interrupt/TaskManagerI.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
committerMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
commit9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch)
tree5016567c58c81f5654e9d01935e199c6bf4761d2 /java/demo/Ice/interrupt/TaskManagerI.java
parentVS add-in & build updates: (diff)
downloadice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'java/demo/Ice/interrupt/TaskManagerI.java')
-rw-r--r--java/demo/Ice/interrupt/TaskManagerI.java56
1 files changed, 0 insertions, 56 deletions
diff --git a/java/demo/Ice/interrupt/TaskManagerI.java b/java/demo/Ice/interrupt/TaskManagerI.java
deleted file mode 100644
index ab642aeb63d..00000000000
--- a/java/demo/Ice/interrupt/TaskManagerI.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-import java.util.concurrent.ExecutorService;
-
-import Demo.*;
-
-public class TaskManagerI extends _TaskManagerDisp
-{
- public TaskManagerI(ExecutorService executor)
- {
- _executor = executor;
- }
-
- @Override
- public void
- run(int id, Ice.Current current)
- {
- System.out.println("starting task " + id);
- // Sleep for 10 seconds.
- try
- {
- Thread.sleep(10000);
- System.out.println("stopping task " + id);
- }
- catch(InterruptedException ex)
- {
- //
- // We are done, the server is shutting down.
- //
- System.out.println("interrupted task " + id);
- }
- }
-
- @Override
- public void
- shutdown(Ice.Current current)
- {
- System.out.println("Shutting down...");
- //
- // Call shutdownNow on the executor. This interrupts all
- // executor threads causing any running upcalls to terminate
- // quickly.
- //
- _executor.shutdownNow();
- current.adapter.getCommunicator().shutdown();
- }
-
- private ExecutorService _executor;
-}