export default abstract class Handler { private handler ? : Handler ; constructor ( ) { } public setHandler ( handler ) { this . handler = handler ; } public operation ( req ) { if ( this . handlerRequest ( req ) ) { this . handler ?. operation ( req ) ; } } abstract handlerRequest ( msg ) ; }