
org.ow2.cmi.lb.loader.ArchiveWrapper Maven / Gradle / Ivy
/**
* CMI : Cluster Method Invocation
* Copyright (C) 2007 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: ArchiveWrapper.java 2122 2008-09-27 09:41:35Z loris $
* --------------------------------------------------------------------------
*/
/**
*
*/
package org.ow2.cmi.lb.loader;
import org.ow2.cmi.loader.IArchiveWrapper;
/**
* Wrapper for archive that contains load balancing policies/strategies.
* @author The new CMI team
*
*/
public class ArchiveWrapper implements IArchiveWrapper {
/**
* Serial UID.
*/
private static final long serialVersionUID = 1L;
/**
* Id of the archive.
*/
private Object archiveId = null;
/**
* Class content.
*/
private byte[] data;
/**
* True
if the archive must be installed.
*/
private boolean toBeInstalled;
/**
* Default constructor.
*/
public ArchiveWrapper() {
}
/**
* Constructor using fields.
* @param data Array data of the archive.
* @param archiveId Id of the archive.
*/
public ArchiveWrapper(final byte[] data, final Object archiveId) {
super();
this.data = data;
this.archiveId = archiveId;
this.toBeInstalled = false;
}
/**
* @return the data
*/
public byte[] getData() {
return data;
}
/**
* @param data Array data to set
*/
public void setData(final byte[] data) {
this.data = data;
}
/**
* @param archiveId The archiveId to set
*/
public void setArchiveId(final Object archiveId) {
this.archiveId = archiveId;
}
/**
* @return the archiveId
*/
public Object getArchiveId() {
return archiveId.toString();
}
/**
* Check if the archive must be installed.
* @return true
if then, false
otherwise.
*/
public boolean toBeInstalled() {
return toBeInstalled;
}
/**
* @param toBeInstalled the toBeInstalled to set
*/
public void setToBeInstalled(final boolean toBeInstalled) {
this.toBeInstalled = toBeInstalled;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy