|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.client.MobyRequestEvent
public class MobyRequestEvent
This is the event passed to a MobyRequestEventHandler, representing either data for a request for service, or the data from a service response depending on whether the listener registered itself in a client or server.
Constructor Summary | |
---|---|
MobyRequestEvent(MobyContentInstance mci,
MobyRequest requestSource,
MobyService serv,
MobyContentInstance serviceInput,
Throwable e,
int id)
|
Method Summary | |
---|---|
void |
consume()
Especially useful in that case that there is more than one listener to MobyRequest, denotes that the request has been processed by a listener, and therefore other listeners should probably ignore. |
MobyContentInstance |
getContent()
|
String |
getContentsXML()
|
Throwable |
getException()
If an invocation failed, the exception that caused the failure will be in here. |
int |
getID()
|
MobyService |
getService()
|
MobyRequest |
getSource()
|
MobyContentInstance |
getSourceInput()
This method should be used instead of getSource().getInput() because the MobyRequest object may have multiple concurrent threads using it, meaning that the inputXML is not necessarily what it was when the service was invoked. |
boolean |
isConsumed()
|
void |
setContent(MobyContentInstance mci)
If you are a service provider who got this event through a callback (client connection), this is where you would write the output, which also denotes that you are finished with client communication (anything done after calling this method will be ignore). |
void |
setContentsXML(String xml)
|
void |
setException(Throwable e)
If you are a service provider and cannot execute the service properly, setting an exception here will inform the client of the failure with a proper MOBY message, and terminate the communication. |
void |
setSourceInput(MobyContentInstance inputPayload)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MobyRequestEvent(MobyContentInstance mci, MobyRequest requestSource, MobyService serv, MobyContentInstance serviceInput, Throwable e, int id)
Method Detail |
---|
public MobyService getService()
public MobyContentInstance getSourceInput()
public void setSourceInput(MobyContentInstance inputPayload)
inputPayload
- the Moby message envelope sent to the service this event is refering to.public MobyContentInstance getContent()
public void setContent(MobyContentInstance mci)
public int getID()
public Throwable getException()
public void setException(Throwable e)
public MobyRequest getSource()
public String getContentsXML()
public void setContentsXML(String xml)
public void consume()
public boolean isConsumed()
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |