|
||||||||||
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 | |
---|---|
MessageExchange |
createInOnlyMessageExchange()
Creates and returns InOnly MessageExchange. |
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. |
ServiceEndpoint |
getServiceEndpoint()
Returns ServiceEndpoint instance associated with this Consumer. |
void |
send(MessageExchange me)
Sends the ME is asynch mode. |
void |
send(MessageExchange me,
boolean propagateTxn)
Sends the ME is asynch mode. |
void |
sendInOnly(java.lang.Object msg)
Sends the ME is asynch mode. |
void |
sendInOnly(java.lang.Object msg,
boolean propTxn)
Sends the ME is asynch mode. |
void |
sendInOut(java.lang.Object msg)
Sends the ME is asynch mode. |
void |
sendInOut(java.lang.Object msg,
boolean propTxn)
Sends the ME is asynch mode. |
boolean |
sendSynch(MessageExchange me)
Sends the MessageExchange in synch mode. |
boolean |
sendSynch(MessageExchange me,
long timeout)
Sends the MessageExchange in synch mode. |
void |
sendSynchInOnly(java.lang.Object msg)
Sends the message to given ServiceEndpoint. |
void |
sendSynchInOnly(java.lang.Object msg,
long timeout)
Sends the message to given ServiceEndpoint. |
java.lang.Object |
sendSynchInOut(java.lang.Object inMsg,
Consumer.MessageObjectType outputType)
Sends the message to given ServiceEndpoint. |
java.lang.Object |
sendSynchInOut(java.lang.Object inMsg,
Consumer.MessageObjectType outputType,
long timeout)
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(ServiceEndpoint se)
Sets ServiceEndpoint. |
Method Detail |
---|
void setServiceEndpoint(ServiceEndpoint se)
se
- ServiceEndpointServiceEndpoint 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.MessageExchange createInOnlyMessageExchange() throws MessagingException
MessagingException
MessageExchange createInOutMessageExchange() throws MessagingException
MessagingException
boolean sendSynch(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
boolean sendSynch(MessageExchange me, long timeout) 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
- MessageExchangetimeout
-
org.glassfish.openesb.pojose.api.POJOError
- any MessagingException is also wrapped in this object.
MessageException
void send(MessageExchange me) throws ErrorMessage
me
- MessageExchange
ErrorMessage
- any MessagingException is also wrapped in this object.
void send(MessageExchange me, boolean propagateTxn) throws ErrorMessage
me
- MessageExchangepropagateTxn
- boolean, true - propagate transaction, false other wise.
ErrorMessage
- any MessagingException is also wrapped in this object.void sendInOnly(java.lang.Object msg) throws ErrorMessage
Transaction object is not propagated by default, in asynch mode. Use overloaded method to explicitly suspend and propagate transaction object if one is available in provisioning message exchange.
msg
-
ErrorMessage
sendInOnly(java.lang.Object, boolean)
void sendInOnly(java.lang.Object msg, boolean propTxn) throws ErrorMessage
msg
- propTxn
- true to propagate the Transaction if available.
ErrorMessage
void sendInOut(java.lang.Object msg) throws ErrorMessage
Transaction object is not propagated by default, in asynch mode. Use overloaded method to explicitly suspend and propagate transaction object if one is available in provisioning message exchange.
msg
-
ErrorMessage
sendInOut(java.lang.Object, boolean)
void sendInOut(java.lang.Object msg, boolean propTxn) throws ErrorMessage
msg
- propTxn
- true to propagate the Transaction if available.
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.
ErrorMessage
void sendSynchInOnly(java.lang.Object msg, long timeout) 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.timeout
-
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.outputType
- - value to be returned of type.
MessageException
java.lang.Object sendSynchInOut(java.lang.Object inMsg, Consumer.MessageObjectType outputType, long timeout) 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.outputType
- - value to be returned of type.timeout
-
MessageException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |