CertificateLocalizationService.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:hops 作者:
@Override
protected void serviceStart() throws Exception {
  String uuid = UUID.randomUUID().toString();
  tmpDir = Paths.get(SYSTEM_TMP, LOCALIZATION_DIR).toFile();
  if (!tmpDir.exists()) {
    tmpDir.mkdir();
  }
  tmpDir.setExecutable(false, false);
  tmpDir.setExecutable(true);
  // Writable only to the owner
  tmpDir.setWritable(false, false);
  tmpDir.setWritable(true);
  // Readable by none
  tmpDir.setReadable(false, false);

  materializeDir = Paths.get(tmpDir.getAbsolutePath(), uuid);
  // Random materialization directory should have the default umask
  materializeDir.toFile().mkdir();
  LOG.debug("Initialized at dir: " + materializeDir.toString());

  StandardMBean mbean = new StandardMBean(this, CertificateLocalizationMBean.class);
  mbeanObjectName = MBeans.register(serviceName, "CertificateLocalizer", mbean);

  super.serviceStart();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号