Package aQute.bnd.build
Class WorkspaceNotifier
- java.lang.Object
-
- aQute.bnd.build.WorkspaceNotifier
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class WorkspaceNotifier extends java.lang.Object implements java.io.Closeable
Implements the event bus for the workspace, projects and repositories. It can createOnWorkspace
objects that client can use to get events. Clients can close and this will clean up. The class is private to the workspace.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
WorkspaceNotifier.ET
(package private) class
WorkspaceNotifier.Receipt
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
closed
(package private) java.util.List<java.lang.Runnable>
events
(package private) java.util.Map<WorkspaceNotifier.ET,java.lang.Object>
last
(package private) java.lang.Object
lock
(package private) boolean
mute
(package private) MultiMap<WorkspaceNotifier.ET,WorkspaceNotifier.Receipt>
ons
(package private) int
revision
(package private) SerialExecutor
serial
(package private) Workspace
workspace
-
Constructor Summary
Constructors Constructor Description WorkspaceNotifier(Workspace workspace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private <T> void
broadcast(WorkspaceNotifier.ET type, T arg)
(package private) void
build(BuildInfo buildInfo)
void
changedProject(Project project)
void
close()
(package private) void
closing(Workspace workspace)
(package private) <T> void
ifSameRevision(int revision, WorkspaceNotifier.ET type, T arg)
(package private) int
initialized()
(package private) void
message(Workspace workspace)
(package private) OnWorkspace
on(java.lang.String name)
void
projects(java.util.Collection<Project> projects)
(package private) void
repos(java.util.List<RepositoryPlugin> repos)
-
-
-
Field Detail
-
ons
final MultiMap<WorkspaceNotifier.ET,WorkspaceNotifier.Receipt> ons
-
last
final java.util.Map<WorkspaceNotifier.ET,java.lang.Object> last
-
lock
final java.lang.Object lock
-
workspace
final Workspace workspace
-
events
final java.util.List<java.lang.Runnable> events
-
serial
final SerialExecutor serial
-
revision
int revision
-
closed
boolean closed
-
mute
volatile boolean mute
-
-
Constructor Detail
-
WorkspaceNotifier
WorkspaceNotifier(Workspace workspace)
-
-
Method Detail
-
initialized
int initialized()
-
message
void message(Workspace workspace)
-
closing
void closing(Workspace workspace)
-
repos
void repos(java.util.List<RepositoryPlugin> repos)
-
build
void build(BuildInfo buildInfo)
-
projects
public void projects(java.util.Collection<Project> projects)
-
changedProject
public void changedProject(Project project)
-
broadcast
private <T> void broadcast(WorkspaceNotifier.ET type, T arg)
-
on
OnWorkspace on(java.lang.String name)
-
ifSameRevision
<T> void ifSameRevision(int revision, WorkspaceNotifier.ET type, T arg)
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-