return; // we have received an event with an invalid topic
}
String operation = topicParts[1];
if(operation.equals(EventType.UPDATE.toString())) {
State newState = (State) event.getProperty("state");
if(newState!=null) receiveUpdate(itemName, newState);
}
if(operation.equals(EventType.COMMAND.toString())) {
Command command = (Command) event.getProperty("command");
if(command!=null) receiveCommand(itemName, command);