Skip to main content
summaryrefslogtreecommitdiffstats
blob: e7f7e2886b4f7023ae80533e73afef3a710ad3a8 (plain) (blame)
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
42
43
44
45
/*******************************************************************************
 * Copyright (c) 2009 EclipseSource and others. All rights reserved. This
 * program and the accompanying materials are made available under the terms of
 * the Eclipse Public License v1.0 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   EclipseSource - initial API and implementation
 ******************************************************************************/
package org.eclipse.ecf.internal.osgi.services.discovery;

import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.discovery.IServiceInfo;
import org.eclipse.ecf.osgi.services.discovery.ServiceEndpointDescriptionImpl;
import org.osgi.service.discovery.DiscoveredServiceNotification;
import org.osgi.service.discovery.ServiceEndpointDescription;

public class DiscoveredServiceNotificationImpl implements
		DiscoveredServiceNotification {

	private final int type;
	private ServiceEndpointDescription serviceEndpointDescription;

	public DiscoveredServiceNotificationImpl(ID localContainerID,
			ID originalLocalContainerID, int type, IServiceInfo serviceInfo) {
		this.type = type;
		this.serviceEndpointDescription = new ServiceEndpointDescriptionImpl(
				localContainerID, originalLocalContainerID, serviceInfo);
	}

	public ServiceEndpointDescription getServiceEndpointDescription() {
		return serviceEndpointDescription;
	}

	public int getType() {
		return type;
	}

	public String toString() {
		StringBuffer sb = new StringBuffer("DiscoveredServiceNotificationImpl[");
		sb.append("type=").append(getType()).append(";sed=").append(
				getServiceEndpointDescription()).append("]");
		return sb.toString();
	}
}

Back to the top