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

## network
Class ProtocolBackup

    java.lang.Object
      network.ProtocolBackup

    public class ProtocolBackup

extends java.lang.Object

Library for backup protocol. Methods required to parse and build backup requests and responses are provided. All messages are expected to be in XML format.

Constructor Summary
`ProtocolBackup()`

Method Summary
`static byte[]` | `createRequest(BackupMetaContainer meta)` Given metadata of file to be backed up, this method creates request which can be send to other networked peers.
`static BackupMetaContainer` | `parseRequest(org.dom4j.Document msg)` Parses request received over network.

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

Constructor Detail

### ProtocolBackup

    public ProtocolBackup()

Method Detail

### parseRequest

    public static BackupMetaContainer parseRequest(org.dom4j.Document msg)
                                            throws java.lang.IllegalArgumentException

  Parses request received over network. This method returns metadata of file, which is requested to be backed up.

  Parameters:
    `msg` - Document of message received.
  Returns:
    BackupMetaContainer of file to be backed up
  Throws:
    `java.lang.IllegalArgumentException` - if request is in invalid format

### createRequest

    public static byte[] createRequest(BackupMetaContainer meta)

  Given metadata of file to be backed up, this method creates request which can be send to other networked peers.

  Parameters:
    `meta` - data of file going to be backed up
  Returns:
    byte array to be placed directly into UDP packet

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