[
https://issues.jboss.org/browse/SHRINKWRAP-85?page=com.atlassian.jira.plu...
]
Davide D'Alto commented on SHRINKWRAP-85:
-----------------------------------------
What about something like this:
Archive:
{code}
T addListener(Listener listener);
{code}
MemoryMapArchiveBase:
{code}
private Asset invokeListeners(ArchivePath path, Asset asset)
{
foreach (Listener listener : listeners) {
{
listener.added(path, asset);
}
return asset;
}
{code}
In this case the decision to intercept the add operation is left to the listener.
WDT?
Support Event/Listener style callbacks
--------------------------------------
Key: SHRINKWRAP-85
URL:
https://issues.jboss.org/browse/SHRINKWRAP-85
Project: ShrinkWrap
Issue Type: Feature Request
Reporter: Aslak Knutsen
A interesting feature would be to be able to add listeners for events on ContainerTypes
or paths.
/META-INF/* or all events generated via ClassContainer
usecase 1, if/when we add something like a ManifestDescriptor, instead of having it like
the WebArchiveDescriptor.addServlet, adding a addMenifestLibrary that delegates down to
addLibrary and update the 'classpath: ' manifest entry.. we could register a
listener on the LibraryContainer and get callbacks when a 'normal' addLibrary
happens
usecase 2, could deploy a 'live' archive to embedded.. one could register a
listener on all changes in the archive and auto redeploy it on events..
deploy it once, redeploy on change
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira