Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 3ff1d78f7c86b5dbe4f03a60f359ab01e74f8e17 (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
/*******************************************************************************
 * Copyright (c) 2007, 2010 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.tm.internal.tcf.core;

import java.util.Map;

import org.eclipse.tm.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;

    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;
    }
}

Back to the top