|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.epfl.lsr.apex.APEXReply
The APEXReply
sends a reply containing a three-digit
reply code and a reason statement on error replies according a
specified message.
Some reply samples:
<ok>
<error code='550' />
<reply code='550'>unknown endpoint identity</reply>
Constructor Summary | |
APEXReply(APEXMessage message,
int code)
Instantiates a common reply ( error or ok
element) to a specified message with a three-digit code. |
|
APEXReply(APEXMessage message,
int code,
boolean replyElement)
Instantiates a explicitly a reply element on boolean to a
specified message with a three-digit code. |
|
APEXReply(APEXMessage message,
int code,
String reason)
Instantiates a reply ( error or ok
element) to a specified message with a three-digit code and a special
textual (XML) content. |
|
APEXReply(APEXMessage message,
int code,
String reason,
boolean replyElement)
Instantiates a explicitly a reply element on boolean to a
specified message with a three-digit code and a special textual (XML)
content. |
Method Summary | |
int |
getCode()
Returns the code of this option. |
String |
getReason()
Returns the reason of this option. |
static String |
getReason(int code)
Returns a textual (standard) reason for a given three-digit code. |
String |
getXMLMessage()
Returns an XML String of this reply. |
static String |
getXMLMessage(int code)
Returns an ok or error element according the
code. |
static String |
getXMLMessage(int code,
String reason)
Returns an ok or error element according the
code (adds the specified reason in erro elements). |
String |
getXMLReply()
Returns an explicitly a reply element of this reply (used
in services, so no ok or error element is
generated). |
static APEXReply |
parseReply(InputStream is)
Parses and builds an APEX reply from an input stream. |
void |
sendReply()
Sends the reply to the associated message originator. |
static void |
sendReply(APEXMessage message,
int code)
Sends a reply with the specified code to the specified message originator. |
static void |
sendReply(APEXMessage message,
int code,
String reason)
Sends a reply with the specified code and reaseon to the specified message originator. |
static void |
sendReply(MessageMSG message,
int code)
Sends a reply with the specified code to the specified org.beepcore.beep.core.MessageMSG
originator. |
static void |
sendReply(MessageMSG message,
int code,
String reason)
Sends a reply with the specified code to the specified org.beepcore.beep.core.MessageMSG
originator. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public APEXReply(APEXMessage message, int code)
error
or ok
element) to a specified message with a three-digit code.
message
- The messagecode
- The three-digit codepublic APEXReply(APEXMessage message, int code, String reason)
error
or ok
element) to a specified message with a three-digit code and a special
textual (XML) content.
message
- The messagecode
- The three-digit codereason
- The reasonpublic APEXReply(APEXMessage message, int code, boolean replyElement)
reply
element on boolean to a
specified message with a three-digit code.
message
- The messagecode
- The three-digit codereplyElement
- If an explicit reply
element is needed (for
services)public APEXReply(APEXMessage message, int code, String reason, boolean replyElement)
reply
element on boolean to a
specified message with a three-digit code and a special textual (XML)
content.
message
- The messagecode
- The three-digit codereason
- The reasonreplyElement
- If an explicit reply
element is needed (for
services)Method Detail |
public static String getReason(int code)
code
- The code
public int getCode()
public String getReason()
public static String getXMLMessage(int code, String reason)
ok
or error
element according the
code (adds the specified reason in erro
elements).
code
- The codereason
- The reason
ok
element.public static String getXMLMessage(int code)
ok
or error
element according the
code.
code
- The code
ok
element.public String getXMLMessage()
public String getXMLReply()
reply
element of this reply (used
in services, so no ok
or error
element is
generated).
reply
element.public void sendReply()
public static void sendReply(APEXMessage message, int code)
message
- The messagecode
- The three-digit codepublic static void sendReply(APEXMessage message, int code, String reason)
message
- The messagecode
- The three-digit codereason
- The reasonpublic static void sendReply(MessageMSG message, int code)
org.beepcore.beep.core.MessageMSG
originator.
message
- The messageMSGcode
- The three-digit codepublic static void sendReply(MessageMSG message, int code, String reason)
org.beepcore.beep.core.MessageMSG
originator.
message
- The messageMSGcode
- The three-digit codereason
- The reasonpublic static APEXReply parseReply(InputStream is) throws APEXParsingException
is
- The input stream
APEXParsingException
- Thrown on non-validity of the reply elementpublic String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |