if (isRemoteCommunicationEnabled()) {
remoteSubscribe(BuiltInServices.ServerEchoService.name());
}
if (!isSubscribed(DefaultErrorCallback.CLIENT_ERROR_SUBJECT)) {
directSubscribe(DefaultErrorCallback.CLIENT_ERROR_SUBJECT, new MessageCallback() {
@Override
public void callback(final Message message) {
final String errorTo = message.get(String.class, MessageParts.ErrorTo);
if (errorTo == null) {
managementConsole.displayError(message.get(String.class, MessageParts.ErrorMessage),
message.get(String.class, MessageParts.AdditionalDetails), null);
}
else {
message.toSubject(errorTo);
message.sendNowWith(ClientMessageBusImpl.this);
}
}
}, false);
}
if (!isSubscribed(BuiltInServices.ClientBus.name())) {
directSubscribe(BuiltInServices.ClientBus.name(), new MessageCallback() {
@Override
@SuppressWarnings({"unchecked"})
public void callback(final Message message) {
BusCommand busCommand;
if (message.getCommandType() == null) {