Package 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, Steven Gong (steven.gong@gmail.com)
-
Method Summary
Modifier and TypeMethodDescriptionGetter for consumers list.Pull message from this input endpoint.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
Connect to a consumer.boolean
unsubscribe
(IConsumer consumer) Disconnect from a consumer.
-
Method Details
-
pullMessage
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
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
Connect to a consumer.- Parameters:
consumer
- ConsumerparamMap
- Parameters map- Returns:
- true when successfully subscribed, false otherwise.
-
unsubscribe
Disconnect from a consumer.- Parameters:
consumer
- Consumer to disconnect- Returns:
- true when successfully unsubscribed, false otherwise.
-
getConsumers
Getter for consumers list.- Returns:
- Consumers.
-
sendOOBControlMessage
Send OOB Control Message to all providers on the other side of pipe.- Parameters:
consumer
- The consumer that sends the messageoobCtrlMsg
- Out-of-band control message
-