@Override
 protected Attributes storeTo(Connection conn, Attributes attrs) {
   super.storeTo(conn, attrs);
   storeNotNull(attrs, "dcmProtocol", StringUtils.nullify(conn.getProtocol(), Protocol.DICOM));
   storeNotNull(attrs, "dcmHTTPProxy", conn.getHttpProxy());
   storeNotEmpty(attrs, "dcmBlacklistedHostname", conn.getBlacklist());
   storeNotDef(attrs, "dcmTCPBacklog", conn.getBacklog(), Connection.DEF_BACKLOG);
   storeNotDef(attrs, "dcmTCPConnectTimeout", conn.getConnectTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmAARQTimeout", conn.getRequestTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmAAACTimeout", conn.getAcceptTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmARRPTimeout", conn.getReleaseTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmResponseTimeout", conn.getResponseTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmRetrieveTimeout", conn.getRetrieveTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmIdleTimeout", conn.getIdleTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmTCPCloseDelay", conn.getSocketCloseDelay(), Connection.DEF_SOCKETDELAY);
   storeNotDef(attrs, "dcmTCPSendBufferSize", conn.getSendBufferSize(), Connection.DEF_BUFFERSIZE);
   storeNotDef(
       attrs, "dcmTCPReceiveBufferSize", conn.getReceiveBufferSize(), Connection.DEF_BUFFERSIZE);
   storeNotDef(attrs, "dcmTCPNoDelay", conn.isTcpNoDelay(), true);
   storeNotDef(attrs, "dcmSendPDULength", conn.getSendPDULength(), Connection.DEF_MAX_PDU_LENGTH);
   storeNotDef(
       attrs, "dcmReceivePDULength", conn.getReceivePDULength(), Connection.DEF_MAX_PDU_LENGTH);
   storeNotDef(
       attrs, "dcmMaxOpsPerformed", conn.getMaxOpsPerformed(), Connection.SYNCHRONOUS_MODE);
   storeNotDef(attrs, "dcmMaxOpsInvoked", conn.getMaxOpsInvoked(), Connection.SYNCHRONOUS_MODE);
   storeNotDef(attrs, "dcmPackPDV", conn.isPackPDV(), true);
   if (conn.isTls()) {
     storeNotEmpty(attrs, "dcmTLSProtocol", conn.getTlsProtocols());
     storeNotDef(attrs, "dcmTLSNeedClientAuth", conn.isTlsNeedClientAuth(), true);
   }
   return attrs;
 }
示例#2
0
 public static String info() {
   if (logger == null) {
     return "AuditLogger not configured!";
   }
   StringBuilder sb = new StringBuilder();
   sb.append("Audit Source ID:")
       .append(logger.getAuditSourceID())
       .append("\nInstalled:")
       .append(logger.isInstalled());
   for (Connection c : logger.getConnections()) {
     sb.append("\nConnection: ")
         .append(c.getHostname())
         .append(":")
         .append(c.getPort())
         .append('(')
         .append(c.getProtocol())
         .append(')');
   }
   Device arrDevice = logger.getAuditRecordRepositoryDevice();
   sb.append("\nAudit Record Repository:").append(arrDevice);
   sb.append("\nProcess ID:")
       .append(AuditLogger.processID())
       .append("\nLocalHost:")
       .append(AuditLogger.localHost());
   return sb.toString();
 }
 @Override
 protected List<ModificationItem> storeDiffs(
     Connection a, Connection b, List<ModificationItem> mods) {
   super.storeDiffs(a, b, mods);
   storeDiff(
       mods,
       "dcmProtocol",
       StringUtils.nullify(a.getProtocol(), Protocol.DICOM),
       StringUtils.nullify(b.getProtocol(), Protocol.DICOM));
   storeDiff(mods, "dcmHTTPProxy", a.getHttpProxy(), b.getHttpProxy());
   storeDiff(mods, "dcmBlacklistedHostname", a.getBlacklist(), b.getBlacklist());
   storeDiff(mods, "dcmTCPBacklog", a.getBacklog(), b.getBacklog(), Connection.DEF_BACKLOG);
   storeDiff(
       mods,
       "dcmTCPConnectTimeout",
       a.getConnectTimeout(),
       b.getConnectTimeout(),
       Connection.NO_TIMEOUT);
   storeDiff(
       mods,
       "dcmAARQTimeout",
       a.getRequestTimeout(),
       b.getRequestTimeout(),
       Connection.NO_TIMEOUT);
   storeDiff(
       mods, "dcmAAACTimeout", a.getAcceptTimeout(), b.getAcceptTimeout(), Connection.NO_TIMEOUT);
   storeDiff(
       mods,
       "dcmARRPTimeout",
       a.getReleaseTimeout(),
       b.getReleaseTimeout(),
       Connection.NO_TIMEOUT);
   storeDiff(
       mods,
       "dcmResponseTimeout",
       a.getResponseTimeout(),
       b.getResponseTimeout(),
       Connection.NO_TIMEOUT);
   storeDiff(
       mods,
       "dcmRetrieveTimeout",
       a.getRetrieveTimeout(),
       b.getRetrieveTimeout(),
       Connection.NO_TIMEOUT);
   storeDiff(
       mods, "dcmIdleTimeout", a.getIdleTimeout(), b.getIdleTimeout(), Connection.NO_TIMEOUT);
   storeDiff(
       mods,
       "dcmTCPCloseDelay",
       a.getSocketCloseDelay(),
       b.getSocketCloseDelay(),
       Connection.DEF_SOCKETDELAY);
   storeDiff(
       mods,
       "dcmTCPSendBufferSize",
       a.getSendBufferSize(),
       b.getSendBufferSize(),
       Connection.DEF_BUFFERSIZE);
   storeDiff(
       mods,
       "dcmTCPReceiveBufferSize",
       a.getReceiveBufferSize(),
       b.getReceiveBufferSize(),
       Connection.DEF_BUFFERSIZE);
   storeDiff(mods, "dcmTCPNoDelay", a.isTcpNoDelay(), b.isTcpNoDelay(), true);
   storeDiff(
       mods,
       "dcmTLSProtocol",
       a.isTls() ? a.getTlsProtocols() : StringUtils.EMPTY_STRING,
       b.isTls() ? b.getTlsProtocols() : StringUtils.EMPTY_STRING);
   storeDiff(
       mods,
       "dcmTLSNeedClientAuth",
       !a.isTls() || a.isTlsNeedClientAuth(),
       !a.isTls() || a.isTlsNeedClientAuth(),
       true);
   storeDiff(
       mods,
       "dcmSendPDULength",
       a.getSendPDULength(),
       b.getSendPDULength(),
       Connection.DEF_MAX_PDU_LENGTH);
   storeDiff(
       mods,
       "dcmReceivePDULength",
       a.getReceivePDULength(),
       b.getReceivePDULength(),
       Connection.DEF_MAX_PDU_LENGTH);
   storeDiff(
       mods,
       "dcmMaxOpsPerformed",
       a.getMaxOpsPerformed(),
       b.getMaxOpsPerformed(),
       Connection.SYNCHRONOUS_MODE);
   storeDiff(
       mods,
       "dcmMaxOpsInvoked",
       a.getMaxOpsInvoked(),
       b.getMaxOpsInvoked(),
       Connection.SYNCHRONOUS_MODE);
   storeDiff(mods, "dcmPackPDV", a.isPackPDV(), b.isPackPDV(), true);
   return mods;
 }