FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java-code-example/Felix/src/Activator.java at master · cherkavi/java-code-example · GitHub
cherkavi
/
java-code-example
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
0
Code
Issues
0
Pull requests
42
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
java-code-example
/
Felix
/
src
/
Activator.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
41 lines (35 loc) · 1.28 KB
Breadcrumbs
java-code-example
/
Felix
/
src
/
Activator.java
Copy path
File metadata and controls
executable file
·
41 lines (35 loc) · 1.28 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import
org
.
osgi
.
framework
.
BundleActivator
;
import
org
.
osgi
.
framework
.
BundleContext
;
/**
* This class implements a simple bundle that utilizes the OSGi
* framework's event mechanism to listen for service events. Upon
* receiving a service event, it prints out the event's details.
**/
public
class
Activator
implements
BundleActivator
{
private
GuiEnterPoint
gui
;
/**
* Implements BundleActivator.start(). Prints
* a message and adds itself to the bundle context as a service
* listener.
* @param context the framework context for the bundle.
**/
public
void
start
(
BundleContext
context
)
{
System
.
out
.
println
(
"Starting to listen for service events."
);
gui
=
new
GuiEnterPoint
();
}
/**
* Implements BundleActivator.stop(). Prints
* a message and removes itself from the bundle context as a
* service listener.
* @param context the framework context for the bundle.
**/
public
void
stop
(
BundleContext
context
)
{
System
.
out
.
println
(
"Stopped listening for service events."
);
// Note: It is not required that we remove the listener here,
// since the framework will do it automatically anyway.
gui
.
setVisible
(
false
);
gui
.
dispose
();
}
}
Back
|
FazBrowse Home
|
New Git URL