|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoctoshape.osa2.Problem
public final class Problem
This represents a problem.
Constructor Summary | |
---|---|
Problem(octoshape.client.problem.Problem p)
|
Method Summary | |
---|---|
int |
getErrorCode()
This is the Octoshape error code for this problem. |
java.lang.String |
getMessage()
This returns a recommended English message to show to the user in case isNormal returns false. |
boolean |
hasProblemId(java.lang.String id)
This can be used to probe about the nature of the problem. |
boolean |
isNormal()
If this returns true, there is not anything wrong and no error should be reported to the user. |
java.lang.String |
toString()
Converts a problem to a String. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Problem(octoshape.client.problem.Problem p)
Method Detail |
---|
public boolean hasProblemId(java.lang.String id)
StreamPlayer.requestPlayLiveWithLatency(long)
or StreamPlayer.requestPlayLiveTimePosition(long)
was used to play at an unavailable location
id
-
public boolean isNormal()
StreamPlayer
class
public java.lang.String toString()
getMessage()
use for that purpose. However, this information maybe requested by Octoshape Support
for detailed problem analysis.
toString
in class java.lang.Object
public int getErrorCode()
public java.lang.String getMessage()
if(this.isNormal()) {
return null;
} else if(this.hasProblemId("admin")) {
if(this.hasProblemId("geofilter")) {
return "This stream is not allowed to be viewed in your area ("+this.getErrorCode()+")";
} else {
return "You do not have permission to view this stream ("+this.getErrorCode()+")";
}
} else {
return "This stream is currently unavailable ("+this.getErrorCode()+")";
}
If you need to display messages to the user in a different language than
English, please make your own similar implementation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |