|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.prosyst.util.event.BasicEvent
public class BasicEvent
Used to represent FrameworkEvents, ServiceEvents, BundleEvents and custom events at the client side.
| Field Summary | |
|---|---|
static int |
B_INSTALLED
A bundle has been installed. |
static int |
B_STARTED
A bundle has been started. |
static int |
B_STOPPED
A bundle has been stopped. |
static int |
B_UNINSTALLED
A bundle has been uninstalled. |
static int |
B_UPDATED
A bundle has been updated. |
byte |
evType
Specifies the event's type. |
static int |
F_DISCONNECTED
The server has disconnected the client. |
static int |
F_ERROR
An error has occurred. |
static int |
F_STARTED
The framework has been started. |
BasicEvent |
next
Should not be used by clients. |
static int |
PACKAGES_REFRESHED
A PackageAdmin.refreshPackage operation has completed. |
static int |
S_MODIFIED
The properties of a registered service have been modified. |
static int |
S_REGISTERED
A service has been registered. |
static int |
S_UNREGISTERING
A service is in the process of being unregistered. |
static int |
STARTLEVEL_CHANGED
A StartLevel.setStartLevel operation has completed. |
| Constructor Summary | |
|---|---|
BasicEvent()
Constructs a BasicEvent that represents a framework event. |
|
BasicEvent(int type)
Constructs a BasicEvent that represents a framework event. |
|
BasicEvent(int type,
long bid)
Constructs a BasicEvent that represents a bundle event. |
|
BasicEvent(int type,
java.lang.String[] objectClass,
long bid)
Constructs a BasicEvent that represents a service event. |
|
BasicEvent(long bid,
java.lang.String errMsg)
Constructs a BasicEvent that represents a framework event with a related bundle and exception. |
|
BasicEvent(java.lang.String errMsg)
Constructs a BasicEvent that represents a framework event with a related error message. |
|
| Method Summary | |
|---|---|
BasicEvent |
cloneEvent()
Clones the event. |
long |
getBundleId()
Returns the id of the bundle associated with this event. |
java.lang.String[] |
getClasses()
Returns the object class of the service associated with this event. |
java.lang.String |
getErrMsg()
Returns the error message associated with this event. |
int |
getType()
Retrieves the type of this event. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int B_INSTALLED
The value of B_INSTALLED is 0x00000001.
BundleContext.installBundle(java.lang.String),
Constant Field Valuespublic static final int B_STARTED
The value of B_STARTED is 0x00000002.
Bundle.start(int),
Constant Field Valuespublic static final int B_STOPPED
The value of B_STOPPED is 0x00000004.
Bundle.stop(int),
Constant Field Valuespublic static final int B_UPDATED
The value of B_UPDATED is 0x00000008.
Bundle.update(),
Constant Field Valuespublic static final int B_UNINSTALLED
The value of B_UNINSTALLED is 0x00000010.
Bundle.uninstall(),
Constant Field Valuespublic static final int F_STARTED
The value of F_STARTED is 0x00000001.
public static final int F_ERROR
The value of F_ERROR is 0x00000002.
public static final int F_DISCONNECTED
The value of F_DISCONNECTED is 0x00000010.
public static final int PACKAGES_REFRESHED
This event is broadcast when the Framework has completed the refresh packages operation initiated by a call to the PackageAdmin.refreshPackages method.
The value of PACKAGES_REFRESHED is 0x00000004.
PackageAdmin.refreshPackages(org.osgi.framework.Bundle[]),
Constant Field Valuespublic static final int STARTLEVEL_CHANGED
This event is broadcast when the Framework has completed changing the active start level initiated by a call to the StartLevel.setStartLevel method.
The value of STARTLEVEL_CHANGED is 0x00000008.
StartLevel,
Constant Field Valuespublic static final int S_REGISTERED
The value of S_REGISTERED is 0x00000001.
BundleContext.registerService(java.lang.String[], java.lang.Object, java.util.Dictionary),
Constant Field Valuespublic static final int S_MODIFIED
The value of S_MODIFIED is 0x00000002.
ServiceRegistration.setProperties(java.util.Dictionary),
Constant Field Valuespublic static final int S_UNREGISTERING
If a bundle is using a service that is UNREGISTERING, this bundle should release its use of the service when it receives this event. If the bundle does not release its use of the service when it receives this event, the framework will automatically release the bundle's use of the service while completing unregistering the service.
The value of S_UNREGISTERING is 0x00000004.
ServiceRegistration.unregister(),
BundleContext.ungetService(org.osgi.framework.ServiceReference),
Constant Field Valuespublic byte evType
public BasicEvent next
| Constructor Detail |
|---|
public BasicEvent(int type,
long bid)
BasicEvent that represents a bundle event.
type - the event typebid - the id of the bundle with a change
in it's lifecycle
public BasicEvent(long bid,
java.lang.String errMsg)
F_ERROR.
bid - the id of the related bundleerrMsg - the message of the related exceptionpublic BasicEvent(java.lang.String errMsg)
F_DISCONNECTED.
errMsg - the message of the related exceptionpublic BasicEvent()
F_STARTED.
public BasicEvent(int type)
public BasicEvent(int type,
java.lang.String[] objectClass,
long bid)
type - the event typeobjectClass - the names of the interfaces under which the service
that generated the event has been registered.| Method Detail |
|---|
public int getType()
B_INSTALLED, B_STARTED, B_STOPPED,
B_UPDATED, B_UNINSTALLED, F_STARTED,
F_ERROR, S_REGISTERED, S_MODIFIED,
S_UNREGISTERING.
public long getBundleId()
type = B_INSTALLED, B_STARTED,
B_STOPPED, B_UPDATED, B_UNINSTALLED.
public java.lang.String getErrMsg()
type = F_ERROR, F_DISCONNECTED.
public java.lang.String[] getClasses()
type = S_REGISTERED, S_MODIFIED, S_UNREGISTERING.
public java.lang.String toString()
toString in class java.lang.Objectpublic BasicEvent cloneEvent()
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||