Class org.as2lib.env.event.broadcaster.DynamicEventBroadcasterFactory

org.as2lib.core.BasicClass
   +--org.as2lib.env.event.broadcaster.DynamicEventBroadcasterFactory

Implemented Interfaces

EventBroadcasterFactory

Description

DynamicEventBroadcasterFactory creates and returns any kind of event broadcaster. The specific event broadcaster class can be specified on construction or with the setEventBroadcasterClass method.

Method Index

new DynamicEventBroadcasterFactory()

createEventBroadcaster(), setEventBroadcasterClass()

Inherited from BasicClass

toString()

Constructor Detail

DynamicEventBroadcasterFactory

public function DynamicEventBroadcasterFactory(clazz:Function)

Constructs a new DynamicEventBroadcasterFactory instance.

Parameters

clazzthe EventBroadcaster implementation to return instances of

Method Detail

setEventBroadcasterClass

public function setEventBroadcasterClass(clazz:Function)

Sets the EventBroadcaster implementation to return instances of.

Parameters

clazzthe EventBroadcaster implementation to return instances of

Throws

IllegalArgumentExceptionif the passed-in clazz is not an implementation of the EventBroadcaster interface

createEventBroadcaster

public function createEventBroadcaster(Void):EventBroadcaster

Creates and returns a new instance of a the specified class.

Return

a new instance of the specified class

Throws

IllegalStateExceptionif no class to return instances of has been set yet

Specified By

createEventBroadcaster() in org.as2lib.env.event.broadcaster.EventBroadcasterFactory