com.tibco.ftl

## Interface Inbox

-     public interface Inbox

  Inbox objects address inbox subscribers.

  Programs can insert inbox objects into message fields.

  This interface defines inbox objects, with methods to copy and destroy them.

  The call that creates an inbox is `Realm.createInboxSubscriber`.

  For calls that use inbox objects, see the classes `Subscriber` and `Message`.

  Customers do not implement this interface.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Inbox` | `copy()` Copy an inbox object.
    `void` | `destroy()` Destroy an inbox object.

- - ### Method Detail

    - #### copy

          Inbox copy()
              throws FTLException

      Copy an inbox object.

      When a `SubscriberListener` callback method gets an inbox from a field of an inbound message, the message owns that inbox object. FTL implicitly destroys that embedded inbox object when the callback returns. Programs can use this call to copy the inbox object.

      Similarly, when a program gets an inbox from a subscriber object, the subscriber owns that inbox. FTL implicitly destroys that embedded inbox object when the program closes the subscriber. Programs can use this call to copy the inbox object.

      Programs must explicitly destroy copies (with `destroy`).

      Returns:
        a copy of the source inbox
      Throws:
        `FTLException`
      See Also:
        `Message.getInbox`, `Subscriber.getInbox`

    - #### destroy

          void destroy()
                throws FTLException

      Destroy an inbox object.

      A program that copies an inbox object must explicitly destroy it to reclaim its resources.

      Note: `Message.setInbox` copies its inbox argument into a message field. After the call returns, a program may destroy the source inbox without affecting the message.

      Throws:
        `FTLException`