public PacketExtension parseExtension(XmlPullParser parser) throws Exception { ChatState state; try { state = ChatState.valueOf(parser.getName()); } catch (Exception ex) { state = ChatState.active; } return new ChatStateExtension(state); }
public String getElementName() { return state.name(); }