|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.soa.esb.client.ServiceInvoker
public class ServiceInvoker
Invoker class for managing Message delivery to a specified Service.
EPRs, Courier selection and
message delivery. Provides a unified/simplified interface for message
delivery.
The ServiceInvoker will cache entries from the registry for the relevant
service. This cache will be refreshed under the following conditions:
(i) all of the entries fail on a delivery attempt.
(ii) the cache times out (see property org.jboss.soa.esb.registry.cache.life): default is
60 seconds.
| Field Summary | |
|---|---|
static java.lang.String |
DEAD_LETTER_SERVICE_NAME
|
static java.lang.String |
DELIVER_TO
|
static Service |
dlqService
Dead letter Service |
static java.lang.String |
INTERNAL_SERVICE_CATEGORY
|
| Constructor Summary | |
|---|---|
ServiceInvoker(Service service)
Public constructor. |
|
ServiceInvoker(Service service,
java.util.List<PortReference.Extension> extensions)
Public constructor. |
|
ServiceInvoker(java.lang.String serviceCategory,
java.lang.String serviceName)
Public constructor. |
|
| Method Summary | |
|---|---|
void |
deliverAsync(Message message)
Asynchronously deliver the supplied message to the target service associated with this invoker instance. |
Message |
deliverSync(Message message,
long timeoutMillis)
Synchronously deliver the supplied message to the target service associated with this invoker instance. |
protected static void |
deliverToDeadLetterService(Message message)
Deliver a message to the Dead Letter Channel Service. |
protected TwoWayCourier |
getCourier(EPR epr)
Get a Courier for the supplied EPR. |
protected EPR |
getReplyToAddress(EPR toEpr)
Get the reply to address for synchronous delivery. |
Service |
getService()
Get the details of Service to which this invoker instance is delivering messages. |
java.lang.String |
getServiceCategory()
Get the Service category name for the Service for which this instance is delivering messages. |
java.lang.String |
getServiceName()
Get the Service name for the Service for which this instance is delivering messages. |
void |
loadServiceClusterInfo()
Loads the EPRs fresh from the Registry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INTERNAL_SERVICE_CATEGORY
public static final java.lang.String DEAD_LETTER_SERVICE_NAME
public static final java.lang.String DELIVER_TO
public static final Service dlqService
| Constructor Detail |
|---|
public ServiceInvoker(Service service)
throws MessageDeliverException
service - The Service to which this instance will deliver messages.
MessageDeliverException - Failed to deliver message to endpoint.
public ServiceInvoker(Service service,
java.util.List<PortReference.Extension> extensions)
throws MessageDeliverException
service - The Service to which this instance will deliver messages.extensions - The extensions to be added to the target service.
MessageDeliverException - Failed to deliver message to endpoint.
public ServiceInvoker(java.lang.String serviceCategory,
java.lang.String serviceName)
throws MessageDeliverException
serviceCategory - The category name of the Service to which this instance will
deliver messages.serviceName - The name of the Service to which this instance will
deliver messages.
MessageDeliverException - Failed to deliver message to endpoint.| Method Detail |
|---|
public Message deliverSync(Message message,
long timeoutMillis)
throws MessageDeliverException,
RegistryException,
FaultMessageException
message - The message to be delivered.timeoutMillis - Number of milliseconds before synchronous reply pickup should timeout.
RegistryException - Failed to lookup Service endpoint.
MessageDeliverException - Failed to deliver message to endpoint.
FaultMessageException
public void deliverAsync(Message message)
throws MessageDeliverException
message - The message to be delivered.
MessageDeliverException - Failed to deliver message, after trying all available EPRs.
protected static void deliverToDeadLetterService(Message message)
throws MessageDeliverException
message - The message to be delivered to the dead letter chennel.
RegistryException - Service endpoint lookup failure.
MessageDeliverException - Message delivery failure.public Service getService()
public java.lang.String getServiceCategory()
public java.lang.String getServiceName()
protected EPR getReplyToAddress(EPR toEpr)
throws ConfigurationException
toEpr - The to address.
ConfigurationException - Unable to support synchronous reply on 'to' address.
protected TwoWayCourier getCourier(EPR epr)
throws CourierException,
MalformedEPRException
Courier for the supplied EPR.
epr - The EPR for which a Courier
is being sought.
CourierException - A courier implementation cannot be created.
MalformedEPRException - Bad EPR.
public void loadServiceClusterInfo()
throws MessageDeliverException
MessageDeliverException - Registry lookup failure.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||