APIdia Launch Partner
Top Description Fields Constructors Methods
javax.naming.event

public Class NamingExceptionEvent

extends EventObject
Class Inheritance
Imports
javax.naming.NamingException

This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException. This can happen, for example, if the server which the listener is using aborts subsequent to the addNamingListener() call.
Authors
Rosanna Lee, Scott Seligman
Since
1.3
See Also
NamingListener#namingExceptionThrown, EventContext

Field Summary

Modifier and TypeField and Description
private NamingException
exception

Contains the exception that was thrown

private static final long
Inherited from java.util.EventObject:
source

Constructor Summary

AccessConstructor and Description
public
NamingExceptionEvent(EventContext
The non-null context in which the exception was thrown.
source
,
NamingException
The non-null NamingException that was thrown.
exc
)

Constructs an instance of NamingExceptionEvent using the context in which the NamingException was thrown and the exception that was thrown.

Method Summary

Modifier and TypeMethod and Description
public void
dispatch(NamingListener
The non-null naming listener on which to invoke the method.
listener
)

Invokes the namingExceptionThrown() method on a listener using this event.

public EventContext

Returns:

The non-null EventContext that fired this event.
getEventContext
()

Retrieves the EventContext that fired this event.

public NamingException

Returns:

The exception that was thrown.
getException
()

Retrieves the exception that was thrown.

Inherited from java.util.EventObject:
getSourcetoString

Field Detail

exceptionback to summary
private NamingException exception

Contains the exception that was thrown

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.EventObject.serialVersionUID.

Constructor Detail

NamingExceptionEventback to summary
public NamingExceptionEvent(EventContext source, NamingException exc)

Constructs an instance of NamingExceptionEvent using the context in which the NamingException was thrown and the exception that was thrown.

Parameters
source:EventContext

The non-null context in which the exception was thrown.

exc:NamingException

The non-null NamingException that was thrown.

Method Detail

dispatchback to summary
public void dispatch(NamingListener listener)

Invokes the namingExceptionThrown() method on a listener using this event.

Parameters
listener:NamingListener

The non-null naming listener on which to invoke the method.

getEventContextback to summary
public EventContext getEventContext()

Retrieves the EventContext that fired this event. This returns the same object as EventObject.getSource().

Returns:EventContext

The non-null EventContext that fired this event.

getExceptionback to summary
public NamingException getException()

Retrieves the exception that was thrown.

Returns:NamingException

The exception that was thrown.