com.brightcove.mediaapi.exceptions
Class MediaApiException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.brightcove.mediaapi.exceptions.BrightcoveException
              extended by com.brightcove.mediaapi.exceptions.MediaApiException
All Implemented Interfaces:
java.io.Serializable

public class MediaApiException
extends BrightcoveException

This is an exception thrown by the Media API (not the Java wrapper)

Author:
three4clavin
See Also:
Serialized Form

Field Summary
static java.lang.Integer MEDIA_API_ERROR_UNPARSABLE
           
 
Fields inherited from class com.brightcove.mediaapi.exceptions.BrightcoveException
type
 
Constructor Summary
MediaApiException(org.json.JSONObject jsonObject)
           Creates a new Media API Exception using JSON returned by the Media API server to populate any details.
 
Method Summary
 org.json.JSONObject getJsonObject()
           Returns the JSON reported by the Media API server
 java.lang.Integer getResponseCode()
           Returns the numeric error code reported by the Media API server
 java.lang.String getResponseMessage()
           Returns the textual description of the error as reported by the Media API server
 void setJsonObject(org.json.JSONObject jsonObject)
           Sets the JSON reported by the Media API server
 void setResponseCode(java.lang.Integer responseCode)
           Sets the numeric error code reported by the Media API server
 void setResponseMessage(java.lang.String responseMessage)
           Sets the textual description of the error as reported by the Media API server
 java.lang.String toString()
           
 
Methods inherited from class com.brightcove.mediaapi.exceptions.BrightcoveException
getType
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MEDIA_API_ERROR_UNPARSABLE

public static final java.lang.Integer MEDIA_API_ERROR_UNPARSABLE
Constructor Detail

MediaApiException

public MediaApiException(org.json.JSONObject jsonObject)
                  throws WrapperException

Creates a new Media API Exception using JSON returned by the Media API server to populate any details.

Parameters:
jsonObject - Details of exception as reported by the server
Throws:
WrapperException - If JSON can't be parsed for some reason
Method Detail

getJsonObject

public org.json.JSONObject getJsonObject()

Returns the JSON reported by the Media API server

Returns:
JSON returned by the server

setJsonObject

public void setJsonObject(org.json.JSONObject jsonObject)

Sets the JSON reported by the Media API server

Parameters:
jsonObject - JSON returned by the server

getResponseCode

public java.lang.Integer getResponseCode()

Returns the numeric error code reported by the Media API server

Returns:
Numeric error code reported by the server

setResponseCode

public void setResponseCode(java.lang.Integer responseCode)

Sets the numeric error code reported by the Media API server

Parameters:
responseCode - Numeric error code reported by the server

getResponseMessage

public java.lang.String getResponseMessage()

Returns the textual description of the error as reported by the Media API server

Returns:
Description of error as reported by the server

setResponseMessage

public void setResponseMessage(java.lang.String responseMessage)

Sets the textual description of the error as reported by the Media API server

Parameters:
responseMessage - Description of error as reported by the server

toString

public java.lang.String toString()
Overrides:
toString in class BrightcoveException


http://opensource.brightcove.com/.