From Web Computing Documentation
Jump to: navigation, search

class Event <T> implements PublicEvent<T>

  • henkolib
    • henkolib.events
      • henkolib.events.Event

Class overview

Represents an Event with customizable arguments. Should be kept private in the class that invokes it. Use the PublicSimpleEvent interface for publishing the event.

Public functions

new ()

subscribe (func : T->Void)

func Callback function.

Subscribes the given callback function to the Event.

unsubscribe (func : T->Void)

func Callback function.

Unsubscribes the given callback function to the Event.

invoke (arg : T)

arg The object to pass to callback functions.

Invokes the Event by calling all subscribed callback functions with the given parameter.

Personal tools