Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DedunuKarunarathne committed Feb 16, 2024
1 parent 5ab5719 commit 0d3f0c9
Showing 1 changed file with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ public class TemplateEndpoint extends AbstractEndpoint {

@Override
public void send(MessageContext synCtx) {
sendMessage(synCtx);
reLoadAndInitEndpoint(synCtx.getEnvironment());

if (realEndpoint != null) {
realEndpoint.send(synCtx);
} else {
informFailure(synCtx, SynapseConstants.ENDPOINT_IN_DIRECT_NOT_READY,
"Couldn't find the endpoint with the name " + getName() +
" & template : " + template);
}
}

@Override
Expand All @@ -64,18 +72,6 @@ protected void createJsonRepresentation() {
endpointJson.put("template", getTemplate());
}

public void sendMessage(MessageContext synCtx) {
reLoadAndInitEndpoint(synCtx.getEnvironment());

if (realEndpoint != null) {
realEndpoint.send(synCtx);
} else {
informFailure(synCtx, SynapseConstants.ENDPOINT_IN_DIRECT_NOT_READY,
"Couldn't find the endpoint with the name " + getName() +
" & template : " + template);
}
}

public Map<String, String> getParameters() {
return parameters;
}
Expand Down

0 comments on commit 0d3f0c9

Please sign in to comment.