当前位置: 首页>>代码示例>>Java>>正文


Java SyncGTS类代码示例

本文整理汇总了Java中gov.nih.nci.cagrid.syncgts.core.SyncGTS的典型用法代码示例。如果您正苦于以下问题:Java SyncGTS类的具体用法?Java SyncGTS怎么用?Java SyncGTS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SyncGTS类属于gov.nih.nci.cagrid.syncgts.core包,在下文中一共展示了SyncGTS类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: synchronizeOnce

import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入依赖的package包/类
public static boolean synchronizeOnce(String syncDescriptionFile)
{

	boolean success = false;
	try
	{
		// Load Sync Description
		String pathToSyncDescription = syncDescriptionFile;
		SyncDescription description = (SyncDescription) Utils
				.deserializeDocument(pathToSyncDescription,
						SyncDescription.class);

		// Sync with the Trust Fabric Once
		SyncGTS.getInstance().syncOnce(description);
		success = true;
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}

	return success;
}
 
开发者ID:NCIP,项目名称:gsid,代码行数:24,代码来源:GridAuthenticationClient.java

示例2: synchronizePeriodic

import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入依赖的package包/类
private static boolean synchronizePeriodic(String syncDescriptionFile)
{
	boolean success = false;
	try
	{
		// Load Sync Description
		String pathToSyncDescription = syncDescriptionFile; // "conf/training/sync-description.xml";
		SyncDescription description = (SyncDescription) Utils
				.deserializeDocument(pathToSyncDescription,
						SyncDescription.class);

		// Sync with the Trust Fabric Once
		SyncGTS.getInstance().syncAndResync(description, success);
		success = true;
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}

	return success;
}
 
开发者ID:NCIP,项目名称:gsid,代码行数:23,代码来源:GridAuthenticationClient.java

示例3: testSyncGTS

import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入依赖的package包/类
public static void testSyncGTS(){
	try
	{
		
		if ("yes".equalsIgnoreCase(getSTartAutoSyncGTS()))
		{
			String pathToSyncDescription = FileHelper.getFileAsURL("sync-description.xml").getPath();
			
			//Load Sync Description
			SyncDescription description = (SyncDescription) Utils.deserializeDocument(pathToSyncDescription,SyncDescription.class);

			// Sync with the Trust Fabric Once
			SyncGTS.getInstance().syncAndResyncInBackground(description, false);
		}
	}
	catch (Exception e) 
	{
		e.printStackTrace();
		
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:22,代码来源:CGMMTest.java

示例4: init

import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException {
	try {
		String isSyncGtsAuto = config.getInitParameter("start-auto-syncgts");
		log.debug("isSyncGtsAuto "+isSyncGtsAuto);			
		if (isSyncGtsAuto.equals("true")) {
			ServletContextResource contextResource=new ServletContextResource(config.getServletContext(), "/WEB-INF/sync-description.xml");
			InputStream inputStream = contextResource.getInputStream();
			final InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
			SyncDescription description = (SyncDescription) Utils.deserializeObject(inputStreamReader,SyncDescription.class);
			inputStreamReader.close();
			SyncGTS.getInstance().syncAndResyncInBackground(description, false);
		}
   	} catch (Exception e) {
   		log.error("Unable to Start Sync GTS Service." + FaultUtil.printFaultToString(e));
		throw new ServletException(e);
	}
	super.init(config);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:20,代码来源:StartSyncGTSServlet.java

示例5: init

import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException{
	try{
		WebApplicationContext ctx =
			WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext());
		WebSSOProperties webSSOProperties = (WebSSOProperties)ctx.getBean(WebSSOConstants.WEBSSO_PROPERTIES);
		WebSSOServerInformation webSSOServerInformation = webSSOProperties.getWebSSOServerInformation();

		if ("yes".equalsIgnoreCase(webSSOServerInformation.getStartAutoSyncGTS())){
			Resource syncdesc = (Resource)ctx.getBean(WebSSOConstants.SYNC_DESC_RESOURCE);
			//Load Sync Description
			final InputStreamReader inputStreamReader = new InputStreamReader(syncdesc.getInputStream());
			SyncDescription description = Utils.deserializeObject(inputStreamReader,SyncDescription.class);
			inputStreamReader.close();
			// Sync with the Trust Fabric Once
			SyncGTS.getInstance().syncAndResyncInBackground(description, false);
		}
	} catch (Exception e) {
		throw new ServletException("Unable to Start Sync GTS Service: " + e.getMessage(), e);
	}
	super.init(config);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:23,代码来源:StartSyncGTSServlet.java

示例6: SyncGTSImpl

import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入依赖的package包/类
public SyncGTSImpl() throws RemoteException {
    try {
        this.configuration = SyncGTSConfiguration.getConfiguration();
        SyncGTSDefault.setServiceSyncDescriptionLocation(SyncGTSConfiguration.getConfiguration().getSyncDescription());
        SyncDescription description = SyncGTSDefault.getSyncDescription();
        try {
            SyncGTS sync = SyncGTS.getInstance();
            if ((this.configuration.getPerformFirstSync() != null)
                && (this.configuration.getPerformFirstSync().equalsIgnoreCase("true"))) {
                sync.syncOnce(description);
            }
            sync.syncAndResyncInBackground(description, true);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } catch (Exception ex) {
        ex.printStackTrace();
        throw new RemoteException("Error Starting SyncGTS Service: " + ex.getMessage());
    }

}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:22,代码来源:SyncGTSImpl.java

示例7: configureGlobusCertificates

import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入依赖的package包/类
private void configureGlobusCertificates() throws Exception {
	File globusCertificateDir = Utils.getTrustedCerificatesDirectory();
	File gridTargetCertsDir = new File(gaardsConfigurationDirectory, targetGrid + File.separator + "certificates");

	Utils.copyDirectory(gridTargetCertsDir, globusCertificateDir);

	SyncGTSDefault.setServiceSyncDescriptionLocation(gaardsConfigurationDirectory.getAbsolutePath()
			+ File.separator + targetGrid + File.separator
			+ "sync-description.xml");

	SyncDescription description = SyncGTSDefault.getSyncDescription();

	SyncGTS sync = SyncGTS.getInstance();
	sync.syncOnce(description);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:16,代码来源:GAARDSApplication.java

示例8: setDefaultGrid

import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入依赖的package包/类
private void setDefaultGrid() {
	try {
		File targetGridDirectory = new File(GAARDSApplication.getGAARDSConfigurationDirectory(), grid.getSystemName());

		File gridSyncGTDCertsDir = Utils.getTrustedCerificatesDirectory();			

		File gridTargetCertsDir = new File(targetGridDirectory, "certificates");
		Utils.copyDirectory(gridTargetCertsDir, gridSyncGTDCertsDir);


		// sync with trust fabric
		SyncGTSDefault
				.setServiceSyncDescriptionLocation(targetGridDirectory.getAbsolutePath()
						+ File.separator + "sync-description.xml");

		SyncDescription description = SyncGTSDefault.getSyncDescription();

		SyncGTS sync = SyncGTS.getInstance();
		sync.syncOnce(description);

		// reload
		GAARDSApplication.getContext().getConfigurationManager()
				.setActiveConfiguration(grid.getSystemName());
		GAARDSApplication.getContext().getConfigurationManager().reload();
		ServicesManager.getInstance().syncWithUpdatedConfiguration();

		GAARDSApplication.setTargetGrid(grid.getSystemName());
	} catch (Exception e) {
		ErrorDialog.showError(e);
		FaultUtil.logFault(log, e);
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:33,代码来源:TargetGridDisplayPanel.java


注:本文中的gov.nih.nci.cagrid.syncgts.core.SyncGTS类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。