...
To support such scenarios, you can write your own custom inbound endpoint by further extending the inbound endpoint behaviour.
Anchor | ||||
---|---|---|---|---|
|
Following is a sample custom listening inbound endpoint configuration:
...
In addition to the parameters provided in the above sample configuration, you can provide other required parameters based on the listening behaviour you need to implement.
Custom listening inbound endpoint parameters
Parameter Name | Description | Required | Possible Values | Default Value |
---|---|---|---|---|
class | Name of the custom class implementation | Yes | A valid class name | n/a |
sequence
| Name of the sequence message that should be injected | Yes | A valid sequence name | n/a |
onError | Name of the fault sequence that should be invoked in case of failure | Yes | A valid fault sequence name | n/a |
inbound.behavior | The behaviour of the inbound endpoint | Yes | listening | n/a |
...
You need to copy the built jar file to the <ESB_HOME>/repository/components/lib
directory and restart the ESB to load the class.
Anchor | ||||
---|---|---|---|---|
|
Following is a sample custom polling inbound endpoint configuration:
Code Block | ||
---|---|---|
| ||
<inboundEndpoint xmlns="http://ws.apache.org/ns/synapse" name="class" sequence="request" onError="fault" class="org.wso2.carbon.inbound.custom.poll.SamplePollingClient" suspend="false"> <parameters> <parameter name="sequential">true</parameter> <parameter name="interval">2000</parameter> <parameter name="coordination">true</parameter> </parameters> </inboundEndpoint> |
Custom polling inbound endpoint parameters
Parameter Name | Description | Required | Possible Values | Default Value |
---|---|---|---|---|
class | Name of the custom class implementation | Yes | A valid class name | n/a |
...
You need to copy the built jar file to the <ESB_HOME>/repository/components/lib
directory and restart the ESB to load the class.
Anchor | ||||
---|---|---|---|---|
|
Following is a sample custom event-based inbound endpoint configuration:
...
In addition to the parameters provided in the above sample configuration, you can provide other required parameters based on the event-based behaviour you need to implement.
Custom event-based inbound endpoint parameters
Parameter Name | Description | Required | Possible Values | Default Value |
---|---|---|---|---|
class | Name of the custom class implementation | Yes | A valid class name | n/a |
sequence
| Name of the sequence message that should be injected | Yes | A valid sequence name | n/a |
onError
| Name of the fault sequence that should be invoked in case of failure | Yes | A valid fault sequence name | n/a |
inbound.behavior | The behaviour of the inbound endpoint | Yes | event-based | n/a |
...