summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2014-08-15 16:23:00 -0700
committerMark Spruiell <mes@zeroc.com>2014-08-15 16:23:00 -0700
commit01f1626babbe190f2d317b56a2a69eb164a00710 (patch)
tree02ab5fa55dc9f30984a618a76db64b053f8ce88a /java
parentICE-5592 - IceSSL.FindCert (SChannel Windows C++ impl) (diff)
downloadice-01f1626babbe190f2d317b56a2a69eb164a00710.tar.bz2
ice-01f1626babbe190f2d317b56a2a69eb164a00710.tar.xz
ice-01f1626babbe190f2d317b56a2a69eb164a00710.zip
minor Java edits
Diffstat (limited to 'java')
-rw-r--r--java/demo/Ice/README4
-rw-r--r--java/demo/Ice/interrupt/README43
-rwxr-xr-x[-rw-r--r--]java/demo/Ice/interrupt/expect.py0
-rw-r--r--java/src/Ice/ConnectionI.java2
-rw-r--r--java/src/Ice/ObjectAdapterI.java5
-rw-r--r--java/test/Ice/interrupt/Test.ice8
6 files changed, 32 insertions, 30 deletions
diff --git a/java/demo/Ice/README b/java/demo/Ice/README
index 368c71269fc..eee5574d335 100644
--- a/java/demo/Ice/README
+++ b/java/demo/Ice/README
@@ -99,5 +99,5 @@ Demos in this directory:
- interrupt
- This demo shows to use Thread.interrupt to interrupt blocking client
- side invocations, and forcably shutdown servers.
+ This demo shows how to use Thread.interrupt to interrupt blocking
+ client-side invocations, and forcibly shutdown servers.
diff --git a/java/demo/Ice/interrupt/README b/java/demo/Ice/interrupt/README
index a28ae716ef2..1e9c183090f 100644
--- a/java/demo/Ice/interrupt/README
+++ b/java/demo/Ice/interrupt/README
@@ -1,6 +1,6 @@
-This demo illustrates how to interrupt blocking servant dispatches on the server
-and interrupt blocking proxy invocations on the client by using
-java.lang.Thread.interrupt.
+This demo illustrates how to interrupt blocking servant dispatches on
+the server and interrupt blocking proxy invocations on the client by
+using Thread.interrupt().
To run the demo, first start the server:
@@ -10,27 +10,28 @@ In a separate window, start the client:
$ java Client
-Calling TaskManager::run on the server simulates a long running task by sleeping
-10 seconds. Ordinarily a server will not shutdown until all executing dispatched
-requests are complete. By interrupting dispatch threads using
-java.lang.Thread.interrupt a server shutdown will proceed, as long as the
-servant implementation correctly handles the interrupt.
+Calling TaskManager::run on the server simulates a long running task
+by sleeping 10 seconds. Ordinarily a server will not shutdown until
+all executing dispatched requests are complete. By interrupting
+dispatch threads using Thread.interrupt() a server shutdown will
+proceed, as long as the servant implementation correctly handles the
+interrupt.
-The simplest way to interrupt method dispatch threads is through the use of an
-Ice.Dispatcher and ExecutorService. Calling shutdownNow on the ExecutorService
-interrupts any executing tasks.
+The simplest way to interrupt dispatch threads is by using an
+Ice.Dispatcher and ExecutorService. Calling shutdownNow on the
+ExecutorService interrupts any executing tasks.
-Pressing ^C in the server calls shutdownNow on the executor service, as does
-pressing 's' in the Client which calls TaskManager::shutdown, the implementation
-of which itself calls shutdownNow.
+Pressing ^C in the server calls shutdownNow on the executor service,
+as does pressing 's' in the client which calls TaskManager::shutdown,
+the implementation of which itself calls shutdownNow.
-It is also possible to interrupt blocking invocations on an Ice proxy through
-the use of java.lang.Thread.interrupt.
+It is also possible to interrupt blocking invocations on an Ice proxy
+by calling Thread.interrupt().
-In this demo, to interrupt a blocking proxy invocation on the client press 'b'
-to run the invocation, and 'i' to interrupt the invocation. Only a single
-blocking can be active at once.
+In this demo, to interrupt a blocking proxy invocation on the client
+press 'b' to run the invocation and 'i' to interrupt the invocation.
+Only a single blocking invocation can be active at once.
-Pressing 't' in the client runs the task on the server using a non-blocking AMI
-invocation.
+Pressing 't' in the client runs the task on the server using a
+non-blocking AMI invocation.
diff --git a/java/demo/Ice/interrupt/expect.py b/java/demo/Ice/interrupt/expect.py
index 65797c9a5ba..65797c9a5ba 100644..100755
--- a/java/demo/Ice/interrupt/expect.py
+++ b/java/demo/Ice/interrupt/expect.py
diff --git a/java/src/Ice/ConnectionI.java b/java/src/Ice/ConnectionI.java
index c835e398735..b304efa82b5 100644
--- a/java/src/Ice/ConnectionI.java
+++ b/java/src/Ice/ConnectionI.java
@@ -3076,7 +3076,7 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne
//
// This is similar to a mutex lock in that the flag is
// only true for a short time period. As such we don't permit the
- // wait to be interrupted. Instead the interrupted status is saved\
+ // wait to be interrupted. Instead the interrupted status is saved
// and restored.
//
boolean interrupted = false;
diff --git a/java/src/Ice/ObjectAdapterI.java b/java/src/Ice/ObjectAdapterI.java
index c3ab836967c..82841fdf67c 100644
--- a/java/src/Ice/ObjectAdapterI.java
+++ b/java/src/Ice/ObjectAdapterI.java
@@ -1640,11 +1640,12 @@ public final class ObjectAdapterI implements ObjectAdapter
return noProps;
}
- private enum DeactivatedState {
+ private enum DeactivatedState
+ {
Steady,
Deactivating,
Deactivated
- };
+ }
private DeactivatedState _deactivated;
private IceInternal.Instance _instance;
private Communicator _communicator;
diff --git a/java/test/Ice/interrupt/Test.ice b/java/test/Ice/interrupt/Test.ice
index 1c636847e15..ad98079dcda 100644
--- a/java/test/Ice/interrupt/Test.ice
+++ b/java/test/Ice/interrupt/Test.ice
@@ -24,7 +24,7 @@ interface TestIntf
void op();
void sleep(int to)
throws InterruptedException;
- void opWithPayload(Ice::ByteSeq seq);
+ void opWithPayload(Ice::ByteSeq seq);
void shutdown();
};
@@ -34,10 +34,10 @@ exception CannotInterruptException
interface TestIntfController
{
- void holdAdapter();
+ void holdAdapter();
void resumeAdapter();
- void interrupt()
- throws CannotInterruptException;
+ void interrupt()
+ throws CannotInterruptException;
};
};