blob: 8edea5cd2221bb1946eca5fe8d1554135fdc1dff (
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
46
47
48
49
50
51
52
53
54
55
56
57
|
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. 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: Composent, Inc. - initial API and implementation
******************************************************************************/
package org.eclipse.ecf.discovery;
import org.eclipse.ecf.core.identity.ID;
/**
* Base event implementation of {@link IServiceEvent}. Subclasses may be created
* as appropriate.
*/
public class ServiceContainerEvent implements IServiceEvent {
protected IServiceInfo info;
protected ID containerID;
public ServiceContainerEvent(IServiceInfo info, ID containerID) {
this.info = info;
this.containerID = containerID;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ecf.discovery.IServiceEvent#getServiceInfo()
*/
public IServiceInfo getServiceInfo() {
return info;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ecf.core.events.IContainerEvent#getLocalContainerID()
*/
public ID getLocalContainerID() {
return containerID;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
public String toString() {
final StringBuffer buf = new StringBuffer("ServiceContainerEvent["); //$NON-NLS-1$
buf.append("serviceinfo=").append(info).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
return buf.toString();
}
}
|