/** * Processes the AMF body. Note that this method won't work if batching of * AMF messages is supported at some point but for now we are guaranteed to * have a single message. */ protected Object processAmfBody(ArrayList<MessageBody> messages) throws ServerStatusException { for (MessageBody message : messages) { String targetURI = message.getTargetURI(); if (targetURI.endsWith(MessageIOConstants.RESULT_METHOD)) { return message.getData(); } else if (targetURI.endsWith(MessageIOConstants.STATUS_METHOD)) { String exMessage = "Server error"; HttpResponseInfo responseInfo = generateHttpResponseInfo(); ServerStatusException exception = new ServerStatusException(exMessage, message.getData(), responseInfo); throw exception; } } return null; // Should not happen. }
/** * Processes the AMF body. Note that this method won't work if batching of * AMF messages is supported at some point but for now we are guaranteed to * have a single message. */ protected Object processAmfBody(ArrayList<MessageBody> messages) throws ServerStatusException { for (MessageBody message : messages) { String targetURI = message.getTargetURI(); if (targetURI.endsWith(MessageIOConstants.RESULT_METHOD)) { return message.getData(); } else if (targetURI.endsWith(MessageIOConstants.STATUS_METHOD)) { String exMessage = "Server error"; HttpResponseInfo responseInfo = generateHttpResponseInfo(); ServerStatusException exception = new ServerStatusException(exMessage, message.getData(), responseInfo); throw exception; } } return null; // Should not happen. }
/** * Processes the AMF body. Note that this method won't work if batching of * AMF messages is supported at some point but for now we are guaranteed to * have a single message. */ protected Object processAmfBody(ArrayList<MessageBody> messages) throws ServerStatusException { for (MessageBody message : messages) { String targetURI = message.getTargetURI(); if (targetURI.endsWith(MessageIOConstants.RESULT_METHOD)) { return message.getData(); } else if (targetURI.endsWith(MessageIOConstants.STATUS_METHOD)) { String exMessage = "Server error"; HttpResponseInfo responseInfo = generateHttpResponseInfo(); ServerStatusException exception = new ServerStatusException(exMessage, message.getData(), responseInfo); throw exception; } } return null; // Should not happen. }