Package org.red5.server.messaging
Class PipeConnectionEvent
java.lang.Object
java.util.EventObject
org.red5.server.messaging.PipeConnectionEvent
- All Implemented Interfaces:
Serializable
Event object corresponds to the connect/disconnect events among providers/consumers on pipes.
This object is immutable except for the parameter map and tasks.
- Author:
- The Red5 Project, Steven Gong (steven.gong@gmail.com), Paul Gregoire (mondain@gmail.com)
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Pipe connection event type -
Field Summary
Modifier and TypeFieldDescriptionprivate final IConsumer
Consumerprivate final ConcurrentMap<String,
Object> Parameters mapprivate final IProvider
Providerprivate static final long
private final LinkedList<Runnable>
List of tasks to be executed for the eventprivate final PipeConnectionEvent.EventType
Event typeFields inherited from class java.util.EventObject
source
-
Constructor Summary
ModifierConstructorDescriptionprivate
PipeConnectionEvent
(AbstractPipe source, PipeConnectionEvent.EventType type, IConsumer consumer, Map<String, Object> paramMap) Construct an object with the specific pipe as the sourceprivate
PipeConnectionEvent
(AbstractPipe source, PipeConnectionEvent.EventType type, IProvider provider, Map<String, Object> paramMap) Construct an object with the specific pipe as the source -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add task to liststatic final PipeConnectionEvent
build
(AbstractPipe source, PipeConnectionEvent.EventType type, IConsumer consumer, Map<String, Object> paramMap) Builds a PipeConnectionEvent with a source pipe and consumer.static final PipeConnectionEvent
build
(AbstractPipe source, PipeConnectionEvent.EventType type, IProvider provider, Map<String, Object> paramMap) Builds a PipeConnectionEvent with a source pipe and provider.Return pipe connection consumerReturn event parameters as MapReturn pipe connection providerReturn list of tasksgetType()
Return event typevoid
setParamMap
(Map<String, Object> paramMap) Setter for event parameters mapMethods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
provider
Provider -
consumer
Consumer -
type
Event type -
paramMap
Parameters map -
taskList
List of tasks to be executed for the event
-
-
Constructor Details
-
PipeConnectionEvent
private PipeConnectionEvent(AbstractPipe source, PipeConnectionEvent.EventType type, IConsumer consumer, Map<String, Object> paramMap) Construct an object with the specific pipe as the source- Parameters:
source
- pipe that triggers this eventtype
- event typeconsumer
- the consumerparamMap
- parameters map
-
PipeConnectionEvent
private PipeConnectionEvent(AbstractPipe source, PipeConnectionEvent.EventType type, IProvider provider, Map<String, Object> paramMap) Construct an object with the specific pipe as the source- Parameters:
source
- pipe that triggers this eventtype
- event typeprovider
- the providerparamMap
- parameters map
-
-
Method Details
-
getProvider
Return pipe connection provider- Returns:
- Provider
-
getConsumer
Return pipe connection consumer- Returns:
- Consumer
-
getType
Return event type- Returns:
- Event type
-
getParamMap
Return event parameters as Map- Returns:
- Event parameters as Map
-
setParamMap
Setter for event parameters map- Parameters:
paramMap
- Event parameters as Map
-
addTask
Add task to list- Parameters:
task
- Task to add
-
getTaskList
Return list of tasks- Returns:
- List of tasks
-
build
public static final PipeConnectionEvent build(AbstractPipe source, PipeConnectionEvent.EventType type, IConsumer consumer, Map<String, Object> paramMap) Builds a PipeConnectionEvent with a source pipe and consumer.- Parameters:
source
- pipe that triggers this eventtype
- event typeconsumer
- the consumerparamMap
- parameters map- Returns:
- event
-
build
public static final PipeConnectionEvent build(AbstractPipe source, PipeConnectionEvent.EventType type, IProvider provider, Map<String, Object> paramMap) Builds a PipeConnectionEvent with a source pipe and provider.- Parameters:
source
- pipe that triggers this eventtype
- event typeprovider
- the providerparamMap
- parameters map- Returns:
- event
-