|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Consumer
Instance of Consumer used to consume Service.
Instance of this class will be injected into JBI Provider field when annotaed with ConsumerEndpoint. Instance can also be obtained from the Context object. Note this class instance is not thread safe and should not be used concurrently.
Context
,
ConsumerEndpoint
Nested Class Summary | |
---|---|
static class |
Consumer.MessageObjectType
|
Method Summary | |
---|---|
javax.jbi.messaging.MessageExchange |
createInOnlyMessageExchange()
Creates and returns InOnly MessageExchange. |
javax.jbi.messaging.MessageExchange |
createInOutMessageExchange()
Creates and returns InOut MessageExchange. |
javax.xml.namespace.QName |
getInterface()
Get the default interface QName associated with this consumer. |
javax.xml.namespace.QName |
getService()
Return QName of the Service associated with this consumer. |
javax.jbi.servicedesc.ServiceEndpoint |
getServiceEndpoint()
Returns ServiceEndpoint instance associated with this Consumer. |
void |
send(javax.jbi.messaging.MessageExchange me)
Sends the ME is asynch mode. |
void |
sendInOnly(java.lang.Object msg)
Sends the ME is asynch mode. |
void |
sendInOut(java.lang.Object msg)
Sends the ME is asynch mode. |
boolean |
sendSynch(javax.jbi.messaging.MessageExchange me)
Sends the MessageExchange in synch mode. |
void |
sendSynchInOnly(java.lang.Object msg)
Sends the message to given ServiceEndpoint. |
java.lang.Object |
sendSynchInOut(java.lang.Object inMsg,
Consumer.MessageObjectType outputType)
Sends the message to given ServiceEndpoint. |
void |
setDefaultInputMessageType(javax.xml.namespace.QName inpt)
Input message type to be used inside WSDL 1.1 wrapper JBI message. |
void |
setDefaultOperationName(javax.xml.namespace.QName opr)
Operation name to be set on MessageExchange created implicitly by Consumer. |
void |
setInterface(javax.xml.namespace.QName intf)
Sets the default interface QName. |
void |
setService(javax.xml.namespace.QName svc)
Sets the service QName instance. |
void |
setServiceEndpoint(javax.jbi.servicedesc.ServiceEndpoint se)
Sets ServiceEndpoint. |
Method Detail |
---|
void setServiceEndpoint(javax.jbi.servicedesc.ServiceEndpoint se)
se
- ServiceEndpointjavax.jbi.servicedesc.ServiceEndpoint getServiceEndpoint()
void setService(javax.xml.namespace.QName svc)
svc
- Service QName.javax.xml.namespace.QName getService()
void setInterface(javax.xml.namespace.QName intf)
intf
- Interface QNamejavax.xml.namespace.QName getInterface()
void setDefaultInputMessageType(javax.xml.namespace.QName inpt)
inpt
- QName of input message type.void setDefaultOperationName(javax.xml.namespace.QName opr)
opr
- QName of operation.javax.jbi.messaging.MessageExchange createInOnlyMessageExchange() throws javax.jbi.messaging.MessagingException
InOnly
- MessagingException
javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessageExchange createInOutMessageExchange() throws javax.jbi.messaging.MessagingException
InOut
- MessagingException
javax.jbi.messaging.MessagingException
boolean sendSynch(javax.jbi.messaging.MessageExchange me) throws MessageException
Any MessagingException from delivery channel is wrapped in POJOError.
Uses the available default ServiceEndpoint, Service or Interface in order if all of the above is null in the passed MessageExchange.
Default Operation name is set if it is null on the passed MessageExchange.
me
- MessageExchange
org.glassfish.openesb.pojose.api.POJOError
- any MessagingException is also wrapped in this object.
MessageException
void send(javax.jbi.messaging.MessageExchange me) throws ErrorMessage
me
- MessageExchange
ErrorMessage
- any MessagingException is also wrapped in this object.void sendInOnly(java.lang.Object msg) throws ErrorMessage
msg
-
ErrorMessage
void sendInOut(java.lang.Object msg) throws ErrorMessage
msg
-
ErrorMessage
void sendSynchInOnly(java.lang.Object msg) throws ErrorMessage
Any MessagingException will be wrapped in Error to the caller, including when Delivery channel fails to process the message by returning false.
Implicit object conversion is done as below.
Instance of NormalizedMessage is sent as is.
Instance of Source, Node, String is wrapped with WSDL 1.1 JBI wrapper
message elements.
msg
- instance of type String, Node, Source or NormalizedMessage.
org.glassfish.openesb.pojose.api.Error
ErrorMessage
java.lang.Object sendSynchInOut(java.lang.Object inMsg, Consumer.MessageObjectType outputType) throws MessageException
Any MessagingException will be wrapped in POJOError to the caller including when Delivery channel fails to process the message by returning false.
Implicit input object conversion is done as below.
Instance of NormalizedMessage is sent as is.
Instance of Source, Node and String is wrapped with WSDL 1.1 JBI wrapper
message elements before sending it as source in a NormalizedMessage.
Output or returned object conversion is done based on the given MessageObjectType. Implicit WSDL 1.1 JBI message unwrapping is done when returned message is of type String, Node and Source.
inMsg
- instance of type String, Node, Source or NormalizedMessage.
org.glassfish.openesb.pojose.api.Error
MessageException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |