Package org.dellroad.msrp.msg
Class Status
- java.lang.Object
-
- org.dellroad.msrp.msg.Status
-
public class Status extends Object
MSRPStatusheader.Instances are immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static StatusfromString(String string)Create an instance by parsing aString.intgetCode()Get the status code.StringgetComment()Get the comment.intgetNamespace()Get the status code namespace.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
Status
public Status(int code, String comment)Constructor.- Parameters:
code- status codecomment- comment, or null
-
Status
public Status(int namespace, int code)Constructor.- Parameters:
namespace- status code namespacecode- status code
-
Status
public Status(int namespace, int code, String comment)Constructor.- Parameters:
namespace- status code namespacecode- status codecomment- comment, or null
-
-
Method Detail
-
getNamespace
public int getNamespace()
Get the status code namespace.- Returns:
- namespace ID
-
getCode
public int getCode()
Get the status code.- Returns:
- status code
-
getComment
public String getComment()
Get the comment.- Returns:
- comment, or null if there is no comment
-
fromString
public static Status fromString(String string)
Create an instance by parsing aString.- Parameters:
string- static expressed as a string- Returns:
- parsed
Status - Throws:
IllegalArgumentException- ifstringis null or invalid
-
-