org.piax.common.PeerIdWithLocator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of piax-compat Show documentation
Show all versions of piax-compat Show documentation
A backward compatibility package for PIAX
The newest version!
/*
* PeerIdWithLocator.java - A pair of Peer Identifier and Locator.
*
* Copyright (c) 2012-2015 National Institute of Information and
* Communications Technology
*
* You can redistribute it and/or modify it under either the terms of
* the AGPLv3 or PIAX binary code license. See the file COPYING
* included in the PIAX package for more in detail.
*
* $Id: PeerIdWithLocator.java 718 2013-07-07 23:49:08Z yos $
*/
package org.piax.common;
import org.piax.gtrans.PeerLocator;
/**
* A class to hold a pair of Peer Identifier and Locator.
*/
public class PeerIdWithLocator extends PeerId {
private static final long serialVersionUID = 1L;
protected final PeerLocator locator;
public PeerIdWithLocator(PeerId peerId, PeerLocator locator) {
super(peerId._getBytes());
this.locator = locator;
}
public PeerId getPeerId() {
return new PeerId(bytes);
}
public PeerLocator getLocator() {
return locator;
}
}