public HL7AdminVo getInboundInfo() throws ims.domain.exceptions.DomainInterfaceException { HL7AdminVo retVo = new HL7AdminVo(); try { IHL7Controller controller = HL7ControllerFactory.getController(); retVo.setCfgStartInterface(new Boolean(controller.isInboundEnabled())); retVo.setIsRunning(new Boolean(controller.isInboundRunning())); if (controller.getInbound() != null && controller.getInbound().getStartTime() != null) { retVo.setStarted(controller.getInbound().getStartTime().toString()); retVo.setMessages(new HL7MessageInfoVoCollection()); for (int i = 0; i < controller.getInbound().getEventCodesHandled().length; i++ ) { HL7MessageInfoVo infoVo = new HL7MessageInfoVo(); String messType = ""; messType = controller.getInbound().getEventCodesHandled()[i]; infoVo.setMessageType(messType); infoVo.setTotal(new Integer(controller.getInbound().getProcessedCount(messType))); infoVo.setFailed(new Integer(controller.getInbound().getErrorCount(messType))); infoVo.setSuccessful(new Integer(controller.getInbound().getSuccessfulCount(messType))); infoVo.setLastFailedDateTime(controller.getInbound().getLastFailedDateTime(messType)); infoVo.setLastSuccessDateTime(controller.getInbound().getLastSuccesfulDateTime(messType)); infoVo.setLastFailedMessage(controller.getInbound().getLastFailedMessage(messType)); infoVo.setLastSuccessMessage(controller.getInbound().getLastSuccesfulMessage(messType)); retVo.getMessages().add(infoVo); } } } catch (Exception e) { throw new DomainInterfaceException("Exception " + e.getMessage() + " occurred getting inbound interface information"); } return retVo; }
public HL7AdminVo getOutboundInfo() throws ims.domain.exceptions.DomainInterfaceException { HL7AdminVo retVo = new HL7AdminVo(); try { IHL7Controller controller = HL7ControllerFactory.getController(); retVo.setCfgStartInterface(new Boolean(controller.isOutboundEnabled())); retVo.setIsRunning(new Boolean(controller.isOutboundRunning())); if (controller.getOutbound() != null && controller.getOutbound().getStartTime() != null) { retVo.setStarted(controller.getOutbound().getStartTime().toString()); retVo.setMessages(new HL7MessageInfoVoCollection()); retVo.setIpAddress(controller.getOutbound().getIpAddress()); for (int i = 0; i < controller.getOutbound().getEventCodesHandled().length; i++ ) { HL7MessageInfoVo infoVo = new HL7MessageInfoVo(); String messType = ""; messType = controller.getOutbound().getEventCodesHandled()[i]; infoVo.setMessageType(messType); infoVo.setTotal(new Integer(controller.getOutbound().getProcessedCount(messType))); infoVo.setFailed(new Integer(controller.getOutbound().getErrorCount(messType))); infoVo.setSuccessful(new Integer(controller.getOutbound().getSuccessfulCount(messType))); infoVo.setLastFailedDateTime(controller.getOutbound().getLastFailedDateTime(messType)); infoVo.setLastSuccessDateTime(controller.getOutbound().getLastSuccesfulDateTime(messType)); infoVo.setLastFailedMessage(controller.getOutbound().getLastFailedMessage(messType)); infoVo.setLastSuccessMessage(controller.getOutbound().getLastSuccesfulMessage(messType)); retVo.getMessages().add(infoVo); } } } catch (Exception e) { throw new DomainInterfaceException("Exception " + e.getMessage() + " getting outbound interface information"); } return retVo; }