if(!TenantManager.getInstance().isInitialized()) {
return false;
}
// Parse complete message and build event
TenantCreatedEvent event = (TenantCreatedEvent) Util.jsonToObject(message, TenantCreatedEvent.class);
try {
TenantManager.acquireWriteLock();
TenantManager.getInstance().addTenant(event.getTenant());
if(log.isInfoEnabled()) {
log.info(String.format("Tenant created: [tenant-id] %d [tenant-domain] %s", event.getTenant().getTenantId(), event.getTenant().getTenantDomain()));
}
// Notify event listeners
notifyEventListeners(event);
return true;