/* Ċ Ġ* ĠJ aval in Ġ- Ġhttps :// jav al in . io Ċ Ġ* ĠCopyright Ġ 2 0 1 7 ĠDavid ĠÃ ħ se Ċ Ġ* ĠLicensed Ġunder ĠApache Ġ 2 . 0 : Ġhttps :// github . com / tip sy / jav al in / blob / master / LICENSE Ċ Ġ*/ Ċ Ċ package Ġio . jav al in . core Ċ Ċ import Ġio . jav al in . J aval in Ċ import Ġio . jav al in . security . Role Ċ import Ġjava . util .* Ċ import Ġjava . util . function . Consumer Ċ Ċ class ĠEvent Manager ( val Ġparent J aval in : ĠJ aval in ) Ġ{ ĊĠĠĠ Ġval Ġevent Att acher Ġ= ĠEvent Att acher ( this ) ĊĠĠĠ Ġval Ġcallback Map Ġ= ĠJ aval in Event . values (). associate Ġ{ Ġit Ġto ĠHashSet < Runnable >() Ġ} ĊĠĠĠ Ġfun Ġfire Event ( jav al in Event : ĠJ aval in Event ) Ġ= Ġcallback Map [ jav al in Event ] !!. forEach Ġ{ Ġcallback Ġ-> Ġcallback . run () Ġ} ĊĠĠĠ Ġvar Ġhandler Added Callbacks Ġ= Ġmutable Set Of < Consumer < Handler Meta Info >>() ĊĠĠĠ Ġfun Ġfire Handler Added Event ( handler Meta Info : ĠHandler Meta Info ) Ġ= Ġhandler Added Callbacks . apply Ġ{ Ġthis . forEach Ġ{ Ġit . accept ( handler Meta Info ) Ġ} Ġ} Ċ } Ċ Ċ enum Ġclass ĠJ aval in Event Ġ{ ĠSERVER _ START ING , ĠSERVER _ STARTED , ĠSERVER _ START _ FAILED , ĠSERVER _ STOP PING , ĠSERVER _ STOP PED Ġ} Ċ data Ġclass ĠHandler Meta Info ( val Ġhttp Method : ĠHandler Type , Ġval Ġpath : ĠString , Ġval Ġhandler : ĠAny , Ġval Ġroles : ĠSet < Role >) Ċ