FileMessage (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.catalina.ha.deploy, class: FileMessage

# Class FileMessage

java.lang.Object
org.apache.catalina.ha.ClusterMessageBase
org.apache.catalina.ha.deploy.FileMessage

All Implemented Interfaces:
  `Serializable, ClusterMessage`

public class FileMessage extends ClusterMessageBase
Contains the data for a file being transferred over TCP, this is essentially a fragment of a file, read and written by the FileMessageFactory.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class ClusterMessageBase

  `address`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileMessage(Member source, String fileName, String contextName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getContextName()`
  `byte[]`
  `getData()`
  `int`
  `getDataLength()`
  `String`
  `getFileName()`
  `int`
  `getMessageNumber()`
  `long`
  `getTotalNrOfMsgs()`
  `String`
  `getUniqueId()`
  `void`
  `setData(byte[] data, int length)`
  `void`
  `setMessageNumber(int messageNumber)`
  `void`
  `setTotalNrOfMsgs(long totalNrOfMsgs)`

  ### Methods inherited from class ClusterMessageBase

  `getAddress, getTimestamp, setAddress, setTimestamp`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FileMessage

    public FileMessage(Member source, String fileName, String contextName)

- ## Method Details

  - ### getMessageNumber

    public int getMessageNumber()

  - ### setMessageNumber

    public void setMessageNumber(int messageNumber)

  - ### getTotalNrOfMsgs

    public long getTotalNrOfMsgs()

  - ### setTotalNrOfMsgs

    public void setTotalNrOfMsgs(long totalNrOfMsgs)

  - ### getData

    public byte[] getData()

  - ### setData

    public void setData(byte[] data, int length)

  - ### getDataLength

    public int getDataLength()

  - ### getUniqueId

    public String getUniqueId()
    Returns:
      the unique id of the message

  - ### getFileName

    public String getFileName()

  - ### getContextName

    public String getContextName()