@HandlerOutput(name="lastApply", type=String.class),
@HandlerOutput(name="lastExport", type=String.class)}
)
public static void getLBExportInfo(HandlerContext handlerCtx){
String lbName = (String)handlerCtx.getInputValue("lbName");
LoadBalancer loadBalancer = AMXUtil.getDomainRoot().getLoadBalancerMap().get(lbName);
LBConfig lBConfig = getLBConfigOfLoadBalancer(lbName);
if (loadBalancer == null || lBConfig == null ){
GuiUtil.prepareAlert(handlerCtx, "error", GuiUtil.getMessage("msg.loadBalancer.NoSuchLB", new Object[]{lbName}), null);
}
try{
Date lastApplyDate = loadBalancer.getLastApplied();
Date lastExportDate = loadBalancer.getLastExported();
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, GuiUtil.getLocale());
String lastApply = (lastApplyDate == null)? "" : dateFormat.format(lastApplyDate);
String lastExport = (lastExportDate == null)? "" : dateFormat.format(lastExportDate);
handlerCtx.setOutputValue("lastApply", lastApply);
handlerCtx.setOutputValue("lastExport", lastExport);