本文整理汇总了Java中org.globus.wsrf.Resource类的典型用法代码示例。如果您正苦于以下问题:Java Resource类的具体用法?Java Resource怎么用?Java Resource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Resource类属于org.globus.wsrf包,在下文中一共展示了Resource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}