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 ([email protected]), Paul Gregoire ([email protected])
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPipe connection event type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IConsumerConsumerprivate final ConcurrentMap<String,Object> Parameters mapprivate final IProviderProviderprivate static final longprivate final LinkedList<Runnable>List of tasks to be executed for the eventprivate final PipeConnectionEvent.EventTypeEvent typeFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePipeConnectionEvent(AbstractPipe source, PipeConnectionEvent.EventType type, IConsumer consumer, Map<String, Object> paramMap) Construct an object with the specific pipe as the sourceprivatePipeConnectionEvent(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 TypeMethodDescriptionvoidAdd task to liststatic final PipeConnectionEventbuild(AbstractPipe source, PipeConnectionEvent.EventType type, IConsumer consumer, Map<String, Object> paramMap) Builds a PipeConnectionEvent with a source pipe and consumer.static final PipeConnectionEventbuild(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 typevoidsetParamMap(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
-