bambou/pushcenter.go
func (p *PushCenter) RegisterHandlerForIdentity(handler EventHandler, identity Identity) {

	if identity.Name == AllIdentity.Name {
		p.defaultHander = handler
		return
	}

	p.handlers[identity.Name] = handler
}
func (p *PushCenter) RegisterHandlerForIdentity(handler EventHandler, identity Identity) {

	if identity.Name == AllIdentity.Name {
		p.defaultHander = handler
		return
	}

	p.handlers[identity.Name] = handler
}
// RegisterHandlerForIdentity registers the given EventHandler for the given Entity Identity.
// You can pass the bambou.AllIdentity as identity to register the handler
// for all events. If you pass a handler for an Identity that is already registered
// the previous handler will be silently overwriten.