public void NavigateObjectMedia(UUID primID, int face, String newURL, Simulator sim) throws Exception
{
URI url;
if (sim.Caps != null && null != (url = sim.Caps.CapabilityURI("ObjectMediaNavigate")))
{
ObjectMediaNavigateMessage req = new ObjectMediaNavigateMessage();
req.PrimID = primID;
req.URL = newURL;
req.Face = face;
CapsHttpClient request = new CapsHttpClient(url);
request.addRequestCompleteObserver(new EventObserver<CapsHttpRequestCompletedArg>()
{
public void handleEvent(Observable arg0, CapsHttpRequestCompletedArg arg1) {
// System.out.println("RequestCompletedObserver called ...");
CapsHttpRequestCompletedArg rcha = (CapsHttpRequestCompletedArg) arg1;
if (rcha.getError() != null)
{
JLogger.error("ObjectMediaNavigate: " + Utils.getExceptionStackTraceAsString(rcha.getError()));
}
}
});
request.BeginGetResponse(req.Serialize(), OSDFormat.Xml, Client.settings.CAPS_TIMEOUT);
}
else
{
JLogger.error("ObjectMediaNavigate capability not available");
}