## org.red5.server.messaging
Interface IMessageInput

All Known Subinterfaces:
  IBroadcastScope, IPipe

All Known Implementing Classes:
  AbstractPipe, BroadcastScope, InMemoryPullPullPipe, InMemoryPushPushPipe

    public interface IMessageInput

Input Endpoint for a consumer to connect.

Author:
  The Red5 Project (red5@osflash.org), Steven Gong (steven.gong@gmail.com)

Method Summary
`List<IConsumer>` `getConsumers()` Getter for consumers list.
`IMessage` `pullMessage()` Pull message from this input endpoint.
`IMessage` `pullMessage(long wait)` Pull message from this input endpoint.
`void` `sendOOBControlMessage(IConsumer consumer, OOBControlMessage oobCtrlMsg)` Send OOB Control Message to all providers on the other side of pipe.
`boolean` `subscribe(IConsumer consumer, Map<String,Object> paramMap)` Connect to a consumer.
`boolean` `unsubscribe(IConsumer consumer)` Disconnect from a consumer.

Method Detail

### pullMessage

    IMessage pullMessage()
                         throws IOException

  Pull message from this input endpoint. Return w/o waiting.

  Returns:
    The pulled message or `null` if message is not available.
  Throws:
    `IOException` - on error

### pullMessage

    IMessage pullMessage(long wait)

  Pull message from this input endpoint. Wait `wait` milliseconds if message is not available.

  Parameters:
    `wait` - milliseconds to wait when message is not available.
  Returns:
    The pulled message or `null` if message is not available.

### subscribe

    boolean subscribe(IConsumer consumer,
                      Map<String,Object> paramMap)

  Connect to a consumer.

  Parameters:
    `consumer` - Consumer
    `paramMap` - Parameters map
  Returns:
    `true` when successfully subscribed, `false` otherwise.

### unsubscribe

    boolean unsubscribe(IConsumer consumer)

  Disconnect from a consumer.

  Parameters:
    `consumer` - Consumer to disconnect
  Returns:
    `true` when successfully unsubscribed, `false` otherwise.

### getConsumers

    List<IConsumer> getConsumers()

  Getter for consumers list.

  Returns:
    Consumers.

### sendOOBControlMessage

    void sendOOBControlMessage(IConsumer consumer,
                               OOBControlMessage oobCtrlMsg)

  Send OOB Control Message to all providers on the other side of pipe.

  Parameters:
    `consumer` - The consumer that sends the message
    `oobCtrlMsg` - Out-of-band control message

Copyright © 2006-2010 The Red5 Project