com.lowagie.text.rtf.parser.destinations

## Class RtfDestinationMgr

- java.lang.Object
- - com.lowagie.text.rtf.parser.destinations.RtfDestinationMgr

    public final class RtfDestinationMgr
    extends java.lang.Object

`RtfDestinationMgr` manages destination objects for the parser

Since:
  2.0.8
Author:
  Howard Shank (hgshank@yahoo.com)

### Field Summary

Fields
`static java.lang.String` `DESTINATION_DOCUMENT` String representation of document destination.
`static java.lang.String` `DESTINATION_NULL` String representation of null destination.
`private static java.util.HashMap` `destinationObjects` Destination objects.
`private static java.util.HashMap` `destinations` CtrlWord <-> Destination map object.
`private static boolean` `ignoreUnknownDestinations`
`private static RtfDestinationMgr` `instance`
`private static java.lang.Object` `lock`
`private static RtfParser` `rtfParser`

### Constructor Summary

Constructors
`private` `RtfDestinationMgr()` Hidden default constructor becuase

### Method Summary

Methods
`static boolean` `addDestination(java.lang.String destination, java.lang.Object[] args)`
`static boolean` `addListener(java.lang.String destination, RtfDestinationListener listener)` Adds a `RtfDestinationListener` to the appropriate `RtfDestination`.
`static RtfDestination` `getDestination(java.lang.String destination)`
`static RtfDestinationMgr` `getInstance()`
`static RtfDestinationMgr` `getInstance(RtfParser parser)`
`static boolean` `removeListener(java.lang.String destination, RtfDestinationListener listener)` Removes a `RtfDestinationListener` from the appropriate `RtfDestination`.
`static void` `setParser(RtfParser parser)`

### Methods inherited from class java.lang.Object

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

### Field Detail

#### instance

    private static RtfDestinationMgr instance

#### lock

    private static java.lang.Object lock

#### destinations

    private static java.util.HashMap destinations

CtrlWord <-> Destination map object. Maps control words to their destinations objects. Null destination is a special destination used for discarding unwanted data. This is primarily used when skipping groups, binary data or unwanted/unknown data.

#### destinationObjects

    private static java.util.HashMap destinationObjects

Destination objects. There is only one of each destination.

#### ignoreUnknownDestinations

    private static boolean ignoreUnknownDestinations

#### rtfParser

    private static RtfParser rtfParser

#### DESTINATION_NULL

    public static final java.lang.String DESTINATION_NULL

String representation of null destination.

See Also:
  Constant Field Values

#### DESTINATION_DOCUMENT

    public static final java.lang.String DESTINATION_DOCUMENT

String representation of document destination.

See Also:
  Constant Field Values

### Constructor Detail

#### RtfDestinationMgr

    private RtfDestinationMgr()

Hidden default constructor becuase

### Method Detail

#### setParser

    public static void setParser(RtfParser parser)

#### getInstance

    public static RtfDestinationMgr getInstance()

#### getInstance

    public static RtfDestinationMgr getInstance(RtfParser parser)

#### getDestination

    public static RtfDestination getDestination(java.lang.String destination)

#### addDestination

    public static boolean addDestination(java.lang.String destination,
                         java.lang.Object[] args)

#### addListener

    public static boolean addListener(java.lang.String destination,
                      RtfDestinationListener listener)

Adds a `RtfDestinationListener` to the appropriate `RtfDestination`.

Parameters:
  `destination` - the destination string for the listener
  `listener` - the new RtfDestinationListener.

#### removeListener

    public static boolean removeListener(java.lang.String destination,
                         RtfDestinationListener listener)

Removes a `RtfDestinationListener` from the appropriate `RtfDestination`.

Parameters:
  `destination` - the destination string for the listener
  `listener` - the RtfCtrlWordListener that has to be removed.