Class JCoConnectionMonitorProvider

java.lang.Object
de.hybris.platform.sap.core.jco.monitor.provider.JCoConnectionMonitorProvider
Direct Known Subclasses:
JCoConnectionMonitorClusterProvider, JCoConnectionMonitorLocalProvider

public abstract class JCoConnectionMonitorProvider extends Object
Provider of JCoConnectionMonitor for cluster environment.
  • Field Details

    • rfcDestinationService

      protected RFCDestinationService rfcDestinationService
      RFC destination service.
    • jaxbHandler

      protected JCoMonitorJAXBHandler jaxbHandler
      JAXB handler.
    • longLifetimeThresholdMSecs

      protected long longLifetimeThresholdMSecs
      Long lifetime threshold in milliseconds.
  • Constructor Details

    • JCoConnectionMonitorProvider

      public JCoConnectionMonitorProvider()
  • Method Details

    • setClusterService

      public void setClusterService(de.hybris.platform.servicelayer.cluster.ClusterService clusterService)
      Injection setter for ClusterService.
      Parameters:
      clusterService - the clusterService to set
    • setRfcDestinationService

      public void setRfcDestinationService(RFCDestinationService rfcDestinationService)
      Injection setter for RFCDestinationService.
      Parameters:
      rfcDestinationService - RFCDestinationService
    • setJaxbHandler

      public void setJaxbHandler(JCoMonitorJAXBHandler jaxbHandler)
      Injection setter for JCoMonitorJAXBHandler.
      Parameters:
      jaxbHandler - the jaxb handler to set
    • setLongLifetimeThresholdInSeconds

      public void setLongLifetimeThresholdInSeconds(long longLifetimeThresholdInSeconds)
      Injection setter for long lifetime threshold.
      Parameters:
      longLifetimeThresholdInSeconds - long lifetime threshold in seconds
    • isLongLifetimeJCoConnection

      protected boolean isLongLifetimeJCoConnection(long currentTimestamp, long lastActivityTimestamp, long longLifetime)
      Calculates if the lifetime of the given JCo connection exceeds the specified threshold. If the threshold is less than 0, it is set to 0.
      Parameters:
      currentTimestamp - current time stamp
      lastActivityTimestamp - last activity time stamp
      longLifetime - the defined threshold
      Returns:
      true if the lifetime exceeds the threshold
    • createSnapshotFile

      protected File createSnapshotFile(String snapshotFileName, Date snapshotDate) throws JCoMonitorException
      Creates the snapshot file.
      Parameters:
      snapshotFileName - name of the snapshot file
      snapshotDate - time stamp of snapshot
      Returns:
      snapshot file
      Throws:
      JCoMonitorException - JCoMonitorException
    • getClusterId

      protected Integer getClusterId()
      Returns the cluster id.
      Returns:
      cluster id