FileMessage (Tomcat API Documentation)
Keywords: org.apache.catalina.cluster.deploy.FileMessage class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.cluster.deploy
Class FileMessage

    java.lang.Object
      org.apache.catalina.cluster.deploy.FileMessage

All Implemented Interfaces:
  ClusterMessage, java.io.Serializable

public class FileMessage
extends java.lang.Object
implements ClusterMessage, java.io.Serializable

Contains the data for a file being transferred over TCP, this is essentially a fragment of a file, read and written by the FileMessageFactory

Version:
  1.0
Author:
  Filip Hanik
See Also:
  Serialized Form

Field Summary

Fields inherited from interface org.apache.catalina.cluster.ClusterMessage
`FLAG_ALLOWED, FLAG_DEFAULT, FLAG_FORBIDDEN`

Constructor Summary
`FileMessage(Member source, java.lang.String fileName, java.lang.String contextPath)`

Method Summary
`Member` | `getAddress()` Get the address that this message originated from.
`int` | `getCompress()` Each message can made the desicion that compress is allowed or not or handle by default.
`java.lang.String` | `getContextPath()`
`byte[]` | `getData()`
`int` | `getDataLength()`
`java.lang.String` | `getFileName()`
`int` | `getMessageNumber()`
`int` | `getResend()` Each message can made the desicion that resend is allowed or not or handle by default.
`long` | `getTimestamp()` Timestamp message.
`long` | `getTotalLength()`
`long` | `getTotalNrOfMsgs()`
`java.lang.String` | `getUniqueId()` Each message must have a unique ID, in case of using async replication, and a smart queue, this id is used to replace messages not yet sent.
`void` | `setAddress(Member address)` Called by the cluster before sending it to the other nodes.
`void` | `setCompress(int compress)` set desicion that compress is allowed or not or handle by default.
`void` | `setData(byte[] data, int length)`
`void` | `setDataLength(int dataLength)`
`void` | `setFileName(java.lang.String fileName)`
`void` | `setMessageNumber(int messageNumber)`
`void` | `setResend(int resend)` set desicion that resend is allowed or not or handle by default.
`void` | `setTimestamp(long timestamp)` Called by the cluster before sending out the message.
`void` | `setTotalLength(long totalLength)`
`void` | `setTotalNrOfMsgs(long totalNrOfMsgs)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileMessage

    public FileMessage(Member source,
                       java.lang.String fileName,
                       java.lang.String contextPath)

Method Detail

### 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()

### setDataLength

    public void setDataLength(int dataLength)

### getTotalLength

    public long getTotalLength()

### setTotalLength

    public void setTotalLength(long totalLength)

### getAddress

    public Member getAddress()

  Description copied from interface: `ClusterMessage`
  Get the address that this message originated from. This would be set if the message was being relayed from a host other than the one that originally sent it.

  Specified by:
    `getAddress` in interface `ClusterMessage`

### setAddress

    public void setAddress(Member address)

  Description copied from interface: `ClusterMessage`
  Called by the cluster before sending it to the other nodes.

  Specified by:
    `setAddress` in interface `ClusterMessage`
  Parameters:
    `address` - Member

### getUniqueId

    public java.lang.String getUniqueId()

  Description copied from interface: `ClusterMessage`
  Each message must have a unique ID, in case of using async replication, and a smart queue, this id is used to replace messages not yet sent.

  Specified by:
    `getUniqueId` in interface `ClusterMessage`
  Returns:
    String

### getTimestamp

    public long getTimestamp()

  Description copied from interface: `ClusterMessage`
  Timestamp message.

  Specified by:
    `getTimestamp` in interface `ClusterMessage`
  Returns:
    long

### setTimestamp

    public void setTimestamp(long timestamp)

  Description copied from interface: `ClusterMessage`
  Called by the cluster before sending out the message.

  Specified by:
    `setTimestamp` in interface `ClusterMessage`
  Parameters:
    `timestamp` - The timestamp

### getFileName

    public java.lang.String getFileName()

### setFileName

    public void setFileName(java.lang.String fileName)

### getContextPath

    public java.lang.String getContextPath()

### getCompress

    public int getCompress()

  Description copied from interface: `ClusterMessage`
  Each message can made the desicion that compress is allowed or not or handle by default.

  Specified by:
    `getCompress` in interface `ClusterMessage`
  Returns:
    Returns the compress.
  Since:
    5.5.10

### setCompress

    public void setCompress(int compress)

  Description copied from interface: `ClusterMessage`
  set desicion that compress is allowed or not or handle by default.

  Specified by:
    `setCompress` in interface `ClusterMessage`
  Parameters:
    `compress` - The compress to set.
  Since:
    5.5.10

### getResend

    public int getResend()

  Description copied from interface: `ClusterMessage`
  Each message can made the desicion that resend is allowed or not or handle by default.

  Specified by:
    `getResend` in interface `ClusterMessage`
  Returns:
    Returns the resend.
  Since:
    5.5.10

### setResend

    public void setResend(int resend)

  Description copied from interface: `ClusterMessage`
  set desicion that resend is allowed or not or handle by default.

  Specified by:
    `setResend` in interface `ClusterMessage`
  Parameters:
    `resend` - The resend to set.
  Since:
    5.5.10

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.