
org.ow2.cmi.lb.loader.ArchiveId Maven / Gradle / Ivy
/**
* CMI : Cluster Method Invocation
* Copyright (C) 2008 Bull S.A.S.
* Contact: [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
* --------------------------------------------------------------------------
* $Id: ArchiveId.java 2122 2008-09-27 09:41:35Z loris $
* --------------------------------------------------------------------------
*/
/**
*
*/
package org.ow2.cmi.lb.loader;
import java.io.Serializable;
/**
* @author The new CMI team
*
*/
public class ArchiveId implements Serializable {
/**
* Serial Id.
*/
private static final long serialVersionUID = 1L;
/**
* Default archive name.
*/
public static final String DEFAULT_NAME = "NONAME";
/**
* Separator used in the toString method.
*/
public static String SEPARATOR = "+";
/**
* Host of the archive.
*/
private String host;
/**
* Name of the archive
*/
private String name;
/**
* Archive location.
*/
private String location;
/**init and archive id with given paramaters. Applying toString
method to the result returns inetAddress + location
.
* @param inetAddress
* @param location
*/
public ArchiveId(final String inetAddress, final String location) {
this.host = inetAddress;
this.location = location;
}
/**
* Default constructor.
*/
public ArchiveId() {
}
/**
* @return the host
*/
public String getHost() {
return host;
}
/**
* @param host the host to set
*/
public void setHost(final String host) {
this.host = host;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(final String name) {
this.name = name;
}
@Override
public String toString(){
return host + SEPARATOR + location;
}
/**
* @return archive location.
*/
public String getLocation() {
return location;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy