Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (c) OSGi Alliance (2005, 2013). All Rights Reserved.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.osgi.application;
An event from the Framework describing a service lifecycle change.

ApplicationServiceEvent objects are delivered to a ApplicationServiceListener objects when a change occurs in this service's lifecycle. The delivery of an ApplicationServiceEvent is always triggered by a org.osgi.framework.ServiceEvent. ApplicationServiceEvent extends the content of ServiceEvent with the service object the event is referring to as applications has no means to find the corresponding service object for a org.osgi.framework.ServiceReference. A type code is used to identify the event type for future extendability. The available type codes are defined in org.osgi.framework.ServiceEvent.

OSGi Alliance reserves the right to extend the set of types.

$Id: feb6a13123707549d3efdb5f06ba69ee82368cb9 $
See also:
public class ApplicationServiceEvent extends ServiceEvent {
	private static final long	serialVersionUID	= -4762149286971897323L;
Creates a new application service event object.

type The event type. Available type codes are defines in org.osgi.framework.ServiceEvent
reference A ServiceReference object to the service that had a lifecycle change. This reference will be used as the source in the java.util.EventObject baseclass, therefore, it must not be null.
serviceObject The service object bound to this application instance. It can be null if this application is not bound to this service yet.
java.lang.IllegalArgumentException if the specified reference is null.
	public ApplicationServiceEvent(int typeServiceReference referenceObject serviceObject) {
		this. = serviceObject;

This method returns the service object of this service bound to the listener application instance. A service object becomes bound to the application when it first obtains a service object reference to that service by calling the ApplicationContext.locateService or locateServices methods. If the application is not bound to the service yet, this method returns null.

the service object bound to the listener application or null if it isn't bound to this service yet.
	public Object getServiceObject() {
		return this.;
New to GrepCode? Check out our FAQ X