Event handler

def handle(client_message, handle_event_distributed_object=None, to_object=None):
    """ Event handler """
    message_type = client_message.get_message_type()
    if message_type == EVENT_DISTRIBUTEDOBJECT and handle_event_distributed_object is not None:
        name = client_message.read_str()
        service_name = client_message.read_str()
        event_type = client_message.read_str()
        handle_event_distributed_object(name=name, service_name=service_name, event_type=event_type)