Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) OSGi Alliance (2009, 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
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.osgi.service.remoteserviceadmin;
 
Provides the event information for a Remote Service Admin event.

Author(s):
$Id: 1162a4c558a7b4424ae05864767cf7877789d2da $
Immutable:
 
 public class RemoteServiceAdminEvent {
Add an import registration. The Remote Service Admin will call this method when it imports a service. When this service is registered, the Remote Service Admin must notify the listener of all existing Import Registrations.
 
 	public static final int			IMPORT_REGISTRATION		= 1;

Add an export registration. The Remote Service Admin will call this method when it exports a service. When this service is registered, the Remote Service Admin must notify the listener of all existing Export Registrations.
 
 	public static final int			EXPORT_REGISTRATION		= 2;

Remove an export registration. The Remote Service Admin will call this method when it removes the export of a service.
 
 	public static final int			EXPORT_UNREGISTRATION	= 3;

Remove an import registration. The Remote Service Admin will call this method when it removes the import of a service.
 
 	public static final int			IMPORT_UNREGISTRATION	= 4;

A fatal importing error occurred. The Import Registration has been closed.
 
 	public static final int			IMPORT_ERROR			= 5;

A fatal exporting error occurred. The Export Registration has been closed.
 
 	public static final int			EXPORT_ERROR			= 6;

A problematic situation occurred, the export is still active.
 
 	public static final int			EXPORT_WARNING			= 7;
A problematic situation occurred, the import is still active.
 
 	public static final int			IMPORT_WARNING			= 8;
 
 	private final Throwable			exception;
 	private final int				type;
 	private final Bundle			source;

Private constructor.

Parameters:
type The event type
source The source bundle, must not be null.
importReference The importReference, can be null.
exportReference The exportReference, can be null.
exception Any exceptions encountered, can be null
 
 	private RemoteServiceAdminEvent(int typeBundle sourceImportReference importReferenceExportReference exportReferenceThrowable exception) {
 		if (source == null) {
 			throw new NullPointerException("source must not be null");
 		}
 		this. = type;
		this. = source;
		this. = importReference;
		this. = exportReference;
		this. = exception;
	}

Create a Remote Service Admin Event for an export notification.

Parameters:
type The event type.
source The source bundle, must not be null.
exportReference The exportReference, can not be null.
exception Any exceptions encountered, can be null.
	public RemoteServiceAdminEvent(int typeBundle sourceExportReference exportReferenceThrowable exception) {
		this(typesourcenullexportReferenceexception);
	}

Create a Remote Service Admin Event for an import notification.

Parameters:
type The event type.
source The source bundle, must not be null.
importReference The importReference, can not be null.
exception Any exceptions encountered, can be null.
	public RemoteServiceAdminEvent(int typeBundle sourceImportReference importReferenceThrowable exception) {
		this(typesourceimportReferencenullexception);
	}

Return the Import Reference for this event.

Returns:
The Import Reference or null.
	}

Return the Export Reference for this event.

Returns:
The Export Reference or null.
	}

Return the exception for this event.

Returns:
The exception or null.
	public Throwable getException() {
		return ;
	}

Return the type of this event.

Returns:
The type of this event.
	public int getType() {
		return ;
	}

Return the bundle source of this event.

Returns:
The bundle source of this event.
	public Bundle getSource() {
		return ;
	}
New to GrepCode? Check out our FAQ X