The NetworkAction.ActionType
Action Types invoke their bound processes on the server. Aedons
offers a wide-array of actions that allow you to handle any type of processing requirement.
public enum ActionType { SEARCH, LOGON, CHANGE_ENCRYPTION, SEND_MESSAGE, SEND_FILE, REQUEST_FILE, MESSAGE_RECEIVED, SERVER_INFO, PING, QUERY; }
The Basics. Several types of example-sample calls to the server.
@Action public void doGetVersionInfoAction() { try { NetworkCommunication incomm = new NetworkCommunication(); NetworkAction action = new NetworkAction(); action.setAction(NetworkAction.ActionType.SERVER_INFO); String uuid = UUID.genUUID(); action.setUuid(uuid); incomm.addMessage(action); NetworkCommunication respc = NetworkManager.send(incomm); if (respc != null) { NetworkResponse resp = (NetworkResponse) respc.getMessageByUuid(uuid); String data = resp.getContent(); Document doc = XMLHelper.parseDocumentFromString(data); Log.logToWindow(getClass(), doc.getRootElement().getText()); } else { Log.logToWindow(getClass(), "Response was null"); } } catch (Exception e) { e.printStackTrace(); } }
}