|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Endpoint
Endpoint defines the behavior common to all Synapse endpoints. Synapse endpoints should be able to send the given Synapse message context, rather than just providing the information for sending the message. The task a particular endpoint does in its send(...) method is specific to the endpoint. For example a loadbalance endpoint may choose another endpoint using its load balance policy and call its send(...) method while an address endpoint (leaf level) may send the message to an actual endpoint url. Endpoints may contain zero or more endpoints in them and build up a hierarchical structure of endpoints.
| Method Summary | |
|---|---|
String |
getName()
Returns the name of the endpoint. |
boolean |
isActive(MessageContext synMessageContext)
Returns if the endpoint is currently active or not. |
void |
onChildEndpointFail(Endpoint endpoint,
MessageContext synMessageContext)
Endpoints that contain other endpoints should implement this method. |
void |
send(MessageContext synMessageContext)
Sends the message context according to an endpoint specific behavior. |
void |
setActive(boolean active,
MessageContext synMessageContext)
Sets the endpoint as active or inactive. |
void |
setName(String name)
Sets the name of the endpoint. |
void |
setParentEndpoint(Endpoint parentEndpoint)
Sets the parent endpoint for the current endpoint. |
| Method Detail |
|---|
void send(MessageContext synMessageContext)
synMessageContext - MessageContext to be sent.
void onChildEndpointFail(Endpoint endpoint,
MessageContext synMessageContext)
endpoint - The child endpoint which caused the exception.synMessageContext - MessageContext that was used in the failed attempt.void setParentEndpoint(Endpoint parentEndpoint)
parentEndpoint - parent endpoint containing this endpoint. It should handle the onChildEndpointFail(...)
callback.String getName()
void setName(String name)
name - Name for the endpoint.boolean isActive(MessageContext synMessageContext)
synMessageContext - MessageContext for the current message. This is required for
IndirectEndpoints where the actual endpoint is retrieved from the MessageContext. Other
Endpoint implementations may ignore this parameter.
void setActive(boolean active,
MessageContext synMessageContext)
active - true if active. false otherwise.synMessageContext - MessageContext for the current message. This is required for
IndirectEndpoints where the actual endpoint is retrieved from the MessageContext. Other
Endpoint implementations may ignore this parameter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||