public class EventContextAdapter extends ContextAdapter implements Mutable, StateEventSource
Constructor and Description |
---|
EventContextAdapter(javax.naming.Binding binding) |
EventContextAdapter(java.lang.String name,
javax.naming.event.EventContext context)
Constructs an Adapter that bridges
NamingEvent s emitted by
EventContext to StructureChangeEvent s. |
Modifier and Type | Method and Description |
---|---|
void |
addStateChangeListener(StateListener listener) |
void |
addStructureChangeListener(StructureListener listener) |
void |
disableEvents() |
void |
enableEvents() |
void |
fireStateChanged(StateChangeEvent event) |
void |
fireStructureChanged(StructureChangeEvent event) |
javax.naming.event.EventContext |
getContext() |
java.lang.String |
getName() |
void |
removeStateChangeListener(StateListener listener) |
void |
removeStructureChangeListener(StructureListener listener) |
create, getManageables
public EventContextAdapter(java.lang.String name, javax.naming.event.EventContext context) throws javax.naming.NamingException
NamingEvent
s emitted by
EventContext to StructureChangeEvent
s.name
- context
- javax.naming.NamingException
- if a NamingListener could not attached to the context.public EventContextAdapter(javax.naming.Binding binding) throws javax.naming.NamingException
javax.naming.NamingException
public javax.naming.event.EventContext getContext()
getContext
in class ContextAdapter
public java.lang.String getName()
public void addStructureChangeListener(StructureListener listener)
addStructureChangeListener
in interface Mutable
public void removeStructureChangeListener(StructureListener listener)
removeStructureChangeListener
in interface Mutable
public void fireStructureChanged(StructureChangeEvent event)
fireStructureChanged
in interface Mutable
public void addStateChangeListener(StateListener listener)
addStateChangeListener
in interface StateEventSource
public void removeStateChangeListener(StateListener listener)
removeStateChangeListener
in interface StateEventSource
public void fireStateChanged(StateChangeEvent event)
fireStateChanged
in interface StateEventSource
public void disableEvents() throws javax.naming.NamingException
javax.naming.NamingException
public void enableEvents() throws javax.naming.NamingException
javax.naming.NamingException