@ApplicationScoped public class SectionsManagerImpl extends Object implements SectionsManager
Constructor and Description |
---|
SectionsManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(EventListener listener)
Adds a listener for all queues
|
void |
addListener(EventListener listener,
String eventId)
Adds a listener to the queue for events with given id
|
void |
delete(Section section)
Removes a workspace section from the system
|
List<EventListener> |
getListeners(String eventId)
Return listeners that should be notified of given event ID.
|
Section |
getSectionByDbId(Long dbid)
Retrieves a section by identifier.
|
Set<EventListener> |
getUniqueListeners(String eventId)
Return listeners that should be notified of given event ID.
|
void |
removeListener(EventListener listener)
Removes Listener from all queues
|
void |
removeListener(EventListener listener,
String eventId)
Removes a Listener from given queue
|
void |
store(Section section)
Stores workspace section state in database
|
public Section getSectionByDbId(Long dbid) throws Exception
SectionsManager
getSectionByDbId
in interface SectionsManager
Exception
public void delete(Section section) throws Exception
delete
in interface SectionsManager
Exception
public void store(Section section) throws Exception
store
in interface SectionsManager
Exception
public void addListener(EventListener listener)
addListener
in interface ListenerQueue
listener
- EventListener to addpublic void addListener(EventListener listener, String eventId)
addListener
in interface ListenerQueue
listener
- EventListener to addeventId
- Event id the listener is interested in.public void removeListener(EventListener listener)
removeListener
in interface ListenerQueue
listener
- listener EventListener to removepublic void removeListener(EventListener listener, String eventId)
removeListener
in interface ListenerQueue
listener
- listener EventListener to removeeventId
- Event id queue to remove listener from.public List<EventListener> getListeners(String eventId)
getListeners
in interface ListenerQueue
eventId
- public Set<EventListener> getUniqueListeners(String eventId)
getUniqueListeners
in interface ListenerQueue
eventId
- Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.