blob: 7f78b577dede0d1c691fcf8407a67536d4f4bb43 (
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
|
/*******************************************************************************
* Copyright (c) 2007, 2011 Wind River Systems, 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:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.internal.core;
import java.util.Map;
import org.eclipse.tcf.core.AbstractPeer;
/**
* RemotePeer objects represent TCF agents that Locator service discovered on local network.
* This includes both local host agents and remote host agents.
* Note that "remote peer" means any peer accessible over network,
* it does not imply the agent is running on a "remote host".
* If an agent binds multiple network interfaces or multiple ports, it can be represented by
* multiple RemotePeer objects - one per each network address/port combination.
* RemotePeer objects life cycle is managed by Locator service.
*/
public class RemotePeer extends AbstractPeer {
private long last_update_time;
/**
* Constructs a Remote Peer and initializes it with the given attributes
* @param attrs attributes map used to initialize the Peer Properties
*/
public RemotePeer(Map<String,String> attrs) {
super(attrs);
last_update_time = System.currentTimeMillis();
}
@Override
public void updateAttributes(Map<String,String> attrs) {
super.updateAttributes(attrs);
last_update_time = System.currentTimeMillis();
}
public long getLastUpdateTime() {
return last_update_time;
}
}
|