本文整理汇总了Java中org.globus.wsrf.Resource类的典型用法代码示例。如果您正苦于以下问题:Java Resource类的具体用法?Java Resource怎么用?Java Resource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Resource类属于org.globus.wsrf包,在下文中一共展示了Resource类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
CaNanoLabServiceResourceProperties props = new CaNanoLabServiceResourceProperties();
CaNanoLabServiceResource resource = new CaNanoLabServiceResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, CaNanoLabServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, CaNanoLabServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cananolab,代码行数:24,代码来源:CaNanoLabServiceResourceHome.java
示例2: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
PhotoSharingRegistrationResourceProperties props = new PhotoSharingRegistrationResourceProperties();
PhotoSharingRegistrationResource resource = new PhotoSharingRegistrationResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, PhotoSharingRegistrationConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, PhotoSharingRegistrationConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-general,代码行数:24,代码来源:PhotoSharingRegistrationResourceHome.java
示例3: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
PhotoSharingResourceProperties props = new PhotoSharingResourceProperties();
PhotoSharingResource resource = new PhotoSharingResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, PhotoSharingConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, PhotoSharingConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-general,代码行数:24,代码来源:PhotoSharingResourceHome.java
示例4: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
StockManagerResourceProperties props = new StockManagerResourceProperties();
StockManagerResource resource = new StockManagerResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, StockManagerConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, StockManagerConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-general,代码行数:24,代码来源:StockManagerResourceHome.java
示例5: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
IdentifiersNAServiceResourceProperties props = new IdentifiersNAServiceResourceProperties();
IdentifiersNAServiceResource resource = new IdentifiersNAServiceResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, IdentifiersNAServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, IdentifiersNAServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:gsid,代码行数:24,代码来源:IdentifiersNAServiceResourceHome.java
示例6: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
CBMResourceProperties props = new CBMResourceProperties();
CBMResource resource = new CBMResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, CBMConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, CBMConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:common-biorepository-model,代码行数:24,代码来源:CBMResourceHome.java
示例7: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
GlobalModelExchangeResourceProperties props = new GlobalModelExchangeResourceProperties();
GlobalModelExchangeResource resource = new GlobalModelExchangeResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, GlobalModelExchangeConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, GlobalModelExchangeConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:GlobalModelExchangeResourceHome.java
示例8: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
TavernaWorkflowServiceResourceProperties props = new TavernaWorkflowServiceResourceProperties();
TavernaWorkflowServiceResource resource = new TavernaWorkflowServiceResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, TavernaWorkflowServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, TavernaWorkflowServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:TavernaWorkflowServiceResourceHome.java
示例9: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
ISO21090ReferenceServiceResourceProperties props = new ISO21090ReferenceServiceResourceProperties();
ISO21090ReferenceServiceResource resource = new ISO21090ReferenceServiceResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, ISO21090ReferenceServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, ISO21090ReferenceServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:iso21090,代码行数:24,代码来源:ISO21090ReferenceServiceResourceHome.java
示例10: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
AuthenticationServiceResourceProperties props = new AuthenticationServiceResourceProperties();
AuthenticationServiceResource resource = new AuthenticationServiceResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, AuthenticationServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, AuthenticationServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:AuthenticationServiceResourceHome.java
示例11: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
TransferServiceResourceProperties props = new TransferServiceResourceProperties();
TransferServiceResource resource = new TransferServiceResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, TransferServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, TransferServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:TransferServiceResourceHome.java
示例12: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
DorianResourceProperties props = new DorianResourceProperties();
DorianResource resource = new DorianResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, DorianConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, DorianConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:DorianResourceHome.java
示例13: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
CredentialDelegationServiceResourceProperties props = new CredentialDelegationServiceResourceProperties();
CredentialDelegationServiceResource resource = new CredentialDelegationServiceResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, CredentialDelegationServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, CredentialDelegationServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:CredentialDelegationServiceResourceHome.java
示例14: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
GTSResourceProperties props = new GTSResourceProperties();
GTSResource resource = new GTSResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, GTSConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, GTSConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:GTSResourceHome.java
示例15: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
GridGrouperResourceProperties props = new GridGrouperResourceProperties();
GridGrouperResource resource = new GridGrouperResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, GridGrouperConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, GridGrouperConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:GridGrouperResourceHome.java
示例16: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
MetadataModelServiceResourceProperties props = new MetadataModelServiceResourceProperties();
MetadataModelServiceResource resource = new MetadataModelServiceResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, MetadataModelServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, MetadataModelServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:MetadataModelServiceResourceHome.java
示例17: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
FederatedQueryProcessorResourceProperties props = new FederatedQueryProcessorResourceProperties();
FederatedQueryProcessorResource resource = new FederatedQueryProcessorResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, FederatedQueryProcessorConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, FederatedQueryProcessorConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:FederatedQueryProcessorResourceHome.java
示例18: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
SyncGTSResourceProperties props = new SyncGTSResourceProperties();
SyncGTSResource resource = new SyncGTSResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, SyncGTSConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, SyncGTSConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:SyncGTSResourceHome.java
示例19: find
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource find(ResourceKey key) throws ResourceException {
if (key != null) {
throw new NoSuchResourceException();
}
synchronized (this) {
// if we do not already have a value, call findSingleton()
// and then cache the result.
if (this.singleResource == null) {
// check to see if the resource is persisted
this.singleResource = createSingleton();
}
if (this.singleResource == null) {
throw new NoSuchResourceException();
}
}
return this.singleResource;
}
开发者ID:NCIP,项目名称:cagrid-core,代码行数:21,代码来源:SingletonResourceHomeImpl.java
示例20: createSingleton
import org.globus.wsrf.Resource; //导入依赖的package包/类
public Resource createSingleton() {
logger.info("Creating a single resource.");
try {
CaObrResourceProperties props = new CaObrResourceProperties();
CaObrResource resource = new CaObrResource();
if (resource instanceof PersistenceCallback) {
//try to load the resource if it was persisted
try{
((PersistenceCallback) resource).load(null);
} catch (InvalidResourceKeyException ex){
//persisted singleton resource was not found so we will just create a new one
resource.initialize(props, CaObrConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
} else {
resource.initialize(props, CaObrConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
}
return resource;
} catch (Exception e) {
logger.error("Exception when creating the resource",e);
return null;
}
}
开发者ID:NCIP,项目名称:caobr,代码行数:24,代码来源:CaObrResourceHome.java
注:本文中的org.globus.wsrf.Resource类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论