if (member == null)
return null;
// Create Axi2 member object
String transport = extractTransport(synCtx);
Port transportPort = member.getPort(transport);
if (transportPort == null) {
if (log.isErrorEnabled()) {
log.error(String.format("Port not found for transport %s in member %s", transport, member.getMemberId()));
}
throwSynapseException(synCtx, 500, "Internal server error");
}
int memberPort = transportPort.getValue();
org.apache.axis2.clustering.Member axis2Member = new org.apache.axis2.clustering.Member(getMemberIp(synCtx, member), memberPort);
axis2Member.setDomain(member.getClusterId());
Port httpPort = member.getPort("http");
if (httpPort != null)
axis2Member.setHttpPort(httpPort.getValue());
Port httpsPort = member.getPort("https");
if (httpsPort != null)
axis2Member.setHttpsPort(httpsPort.getValue());
axis2Member.setActive(member.isActive());
// Set cluster id and partition id in message context
axis2Member.getProperties().setProperty(Constants.CLUSTER_ID, member.getClusterId());
return axis2Member;
}