request.addRequestCompleteObserver(new EventObserver<CapsHttpRequestCompletedArg>()
{
public void handleEvent(Observable arg0, CapsHttpRequestCompletedArg arg1) {
// System.out.println("RequestCompletedObserver called ...");
CapsHttpRequestCompletedArg rcha = (CapsHttpRequestCompletedArg) arg1;
if (rcha.getResult() == null)
{
JLogger.error("Failed retrieving ObjectMedia data");
try { callback.execute( new ObjectMediaCallbackArgs(false, "", null)); }
catch (Exception ex) { JLogger.error(Utils.getExceptionStackTraceAsString(ex)); }
return;
}
LindenMessages.ObjectMediaMessage msg = new LindenMessages.ObjectMediaMessage();
msg.Deserialize((OSDMap)rcha.getResult());
if (msg.Request instanceof LindenMessages.ObjectMediaResponse)
{
LindenMessages.ObjectMediaResponse response = (LindenMessages.ObjectMediaResponse)msg.Request;