FileDocCategorySizeDatePackage
FileMessage.javaAPI DocApache Tomcat 6.0.143482Fri Jul 20 04:20:34 BST 2007org.apache.catalina.ha.deploy

FileMessage

public class FileMessage extends org.apache.catalina.ha.ClusterMessageBase implements Serializable, org.apache.catalina.ha.ClusterMessage
Contains the data for a file being transferred over TCP, this is essentially a fragment of a file, read and written by the FileMessageFactory
author
Filip Hanik
version
1.0

Fields Summary
private int
messageNumber
private byte[]
data
private int
dataLength
private long
totalLength
private long
totalNrOfMsgs
private String
fileName
private String
contextPath
Constructors Summary
public FileMessage(org.apache.catalina.tribes.Member source, String fileName, String contextPath)

        this.address=source;
        this.fileName=fileName;
        this.contextPath=contextPath;
    
Methods Summary
public java.lang.StringgetContextPath()

        return contextPath;
    
public byte[]getData()

        return data;
    
public intgetDataLength()

        return dataLength;
    
public java.lang.StringgetFileName()

        return fileName;
    
public intgetMessageNumber()

        return messageNumber;
    
public longgetTotalLength()

        return totalLength;
    
public longgetTotalNrOfMsgs()

        return totalNrOfMsgs;
    
public java.lang.StringgetUniqueId()

        StringBuffer result = new StringBuffer(getFileName());
        result.append("#-#");
        result.append(getMessageNumber());
        result.append("#-#");
        result.append(System.currentTimeMillis());
        return result.toString();
    
public voidsetData(byte[] data, int length)

        this.data = data;
        this.dataLength = length;
    
public voidsetDataLength(int dataLength)

        this.dataLength = dataLength;
    
public voidsetFileName(java.lang.String fileName)

        this.fileName = fileName;
    
public voidsetMessageNumber(int messageNumber)

        this.messageNumber = messageNumber;
    
public voidsetTotalLength(long totalLength)

        this.totalLength = totalLength;
    
public voidsetTotalNrOfMsgs(long totalNrOfMsgs)

        this.totalNrOfMsgs = totalNrOfMsgs;