--- old/src/java.naming/share/classes/javax/naming/event/package.html 2015-08-04 13:14:50.820900756 +0300 +++ new/src/java.naming/share/classes/javax/naming/event/package.html 2015-08-04 13:14:50.528900750 +0300 @@ -42,21 +42,21 @@
-This package defines a NamingEvent class to represent an event
+This package defines a NamingEvent
class to represent an event
that is generated by a naming/directory service.
-It also defines subinterfaces of Context and DirContext,
-called EventContext and EventDirContext,
+It also defines subinterfaces of Context
and DirContext
,
+called EventContext
and EventDirContext
,
through which applications can register their interest in events
fired by the context.
-NamingEvent represents an event that occurs in a
+NamingEvent
represents an event that occurs in a
naming or directory service. There are two categories of naming events:
NamespaceChangeListener
, ObjectChangeListener
.
An application, for example, can register its interest in changes to objects in a context as follows: @@ -82,19 +82,19 @@
objectChanged()
) may be executed in a thread other than the
+one in which the call to addNamingListener()
was executed.
The choice of which thread to use is made by the service provider.
When an event is dispatched to multiple listeners, the service provider
may choose (and is generally encouraged) to execute the listener methods
concurrently in separate threads.
-When a listener instance invokes NamingEvent.getEventContext(),
+When a listener instance invokes NamingEvent.getEventContext()
,
it must take into account the possibility that other threads will be
working with that context concurrently. Likewise, when a listener is
-registered via addNamingListener(), the registering thread
+registered via addNamingListener()
, the registering thread
must take into account the likely possibility that the service provider
-will later invoke the listeners in newly-created threads. As Context
+will later invoke the listeners in newly-created threads. As Context
instances are not guaranteed to be thread-safe in general, all context
operations must be synchronized as needed.
@@ -107,9 +107,9 @@
on the server that will eventually be translated into events.
If an exception occurs that prevents information about the events from
being collected, the listener will never be notified of the events.
-When such an exception occurs, a NamingExceptionEvent is
+When such an exception occurs, a NamingExceptionEvent
is
fired to notify the listener. The listener's
-namingExceptionThrown() method is invoked, as shown in the
+namingExceptionThrown()
method is invoked, as shown in the
sample code above,
and the listener is automatically deregistered.