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


Java UIDGenerator类代码示例

本文整理汇总了Java中org.apache.axiom.util.UIDGenerator的典型用法代码示例。如果您正苦于以下问题:Java UIDGenerator类的具体用法?Java UIDGenerator怎么用?Java UIDGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: generateErrorneousResponse

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public static String generateErrorneousResponse() {
    Response response = new ResponseBuilder().buildObject();
    response.setIssuer(getIssuer());
    response.setStatus(buildStatus());
    response.setVersion(SAMLVersion.VERSION_20);
    response.setID(UIDGenerator.generateUID());

    try {
        return encode(marshall(response));
    } catch (IdentityException e) {
        if (log.isDebugEnabled()) {
            log.debug("Error while encoding.", e);
        }
        return null;
    }
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:17,代码来源:ErrorResponseBuilder.java

示例2: processMessageID

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
private void processMessageID() {
    String messageID = messageContextOptions.getMessageId();
    
    //Check whether we want to force a message id to be sent.
    if (messageID == null && includeOptionalHeaders) {
        messageID = UIDGenerator.generateURNString();
        messageContextOptions.setMessageId(messageID);
    }
    
    if (messageID != null && !isAddressingHeaderAlreadyAvailable(WSA_MESSAGE_ID, false))
    {//optional
    	ArrayList attributes = (ArrayList)messageContext.getLocalProperty(
                AddressingConstants.MESSAGEID_ATTRIBUTES);
        createSOAPHeaderBlock(messageID, WSA_MESSAGE_ID, attributes);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:AddressingOutHandler.java

示例3: setPolicy

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/**
* @param policy
* @see org.apache.axis2.description.PolicySubject#attachPolicy(Policy)
* @see org.apache.axis2.description.PolicySubject#clear()
* @deprecated As of 1.4 release, replaced by
*             {@link PolicySubject #attachPolicy(Policy)} Use
*             {@link PolicySubject #clear()} beforehand effective policy of
*             {@link AxisDescription} has to be set as the argument.
* 
*/
  public void setPolicy(Policy policy) {
      wrapperElements.clear();

      if (policy.getName() == null && policy.getId() == null) {
          policy.setId(UIDGenerator.generateUID());
      }

      Wrapper wrapper = new Wrapper(PolicyInclude.ANON_POLICY, policy);
      if (policy.getName() != null) {
          wrapperElements.put(policy.getName(), wrapper);
      } else {
          wrapperElements.put(policy.getId(), wrapper);
      }
      
      if (description != null) {
	description.getPolicySubject().clear();
	description.getPolicySubject().attachPolicy(policy);
}
  }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:30,代码来源:PolicyInclude.java

示例4: addPolicyElement

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/**
* @deprecated As of 1.4 release, replaced by
*             {@link PolicySubject #attachPolicy(Policy)}
*/
  public void addPolicyElement(int type, Policy policy) {

      String key;

      if ((key = policy.getName()) == null && (key = policy.getId()) == null) {
          policy.setId(UIDGenerator.generateUID());
      }

      key = (policy.getName() != null) ? policy.getName() : policy.getId();

      Wrapper wrapper = new Wrapper(type, policy);
      wrapperElements.put(key, wrapper);
      reg.register(key, policy);
      
      if (description != null) {
	description.getPolicySubject().attachPolicy(policy);
}
  }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:23,代码来源:PolicyInclude.java

示例5: testMEPfindingOnRelatesTO

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public void testMEPfindingOnRelatesTO() throws Exception {

        AxisService axisService = new AxisService("TempSC");
        configContext.getAxisConfiguration().addService(axisService);
        ServiceGroupContext sgc = configContext.createServiceGroupContext(
                axisService.getAxisServiceGroup());
        ServiceContext sessionContext = sgc.getServiceContext(axisService);
        MessageContext messageContext1 = this.getBasicMessageContext();

        messageContext1.setMessageID(UIDGenerator.generateURNString());
        AxisOperation axisOperation = new InOutAxisOperation(new QName("test"));
        OperationContext operationContext1 = axisOperation
                .findOperationContext(messageContext1, sessionContext);
        axisOperation.registerOperationContext(messageContext1, operationContext1);

        MessageContext messageContext2 = this.getBasicMessageContext();
        messageContext2.setMessageID(UIDGenerator.generateURNString());
        messageContext2.getOptions().addRelatesTo(
                new RelatesTo(messageContext1.getMessageID()));
        messageContext2.setAxisOperation(axisOperation);
        OperationContext operationContext2 = axisOperation
                .findOperationContext(messageContext2, sessionContext);
        assertEquals(operationContext1, operationContext2);
    }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:25,代码来源:OperationContextTest.java

示例6: createSynapseMessageContext

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
private MessageContext createSynapseMessageContext() throws AxisFault {
    org.apache.axis2.context.MessageContext axis2MC = new org.apache.axis2.context.MessageContext();
    axis2MC.setConfigurationContext(this.configContext);
    ServiceContext svcCtx = new ServiceContext();
    OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx);
    axis2MC.setServiceContext(svcCtx);
    axis2MC.setOperationContext(opCtx);
    Axis2MessageContext mc = new Axis2MessageContext(axis2MC, this.synapseConfig, null);
    mc.setMessageID(UIDGenerator.generateURNString());

    mc.setEnvelope(OMAbstractFactory.getSOAP12Factory().createSOAPEnvelope());
    mc.getEnvelope().addChild(OMAbstractFactory.getSOAP12Factory().createSOAPBody());

    return mc;
}
 
开发者ID:wso2-extensions,项目名称:esb-connector-file,代码行数:16,代码来源:FileMoveUnitTest.java

示例7: subscribe

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public String subscribe(Subscription subscription)
        throws EventBrokerException {

    //if there is a subscription with the same topic and event sink url then
    //we think it is the same subscription.
    Subscription existingSubscription = getExistingNonExpiredSubscription(subscription);
    if (existingSubscription != null) {
        return existingSubscription.getId();
    }
    if (EventBrokerHolder.getInstance().getTenantDomain() != null) {
        subscription.setTenantDomain(EventBrokerHolder.getInstance().getTenantDomain());
        subscription.setTenantId(EventBrokerHolder.getInstance().getTenantId());
    }
    // generates an id for the subscription
    subscription.setId(UIDGenerator.generateUID());
    this.topicManager.addTopic(subscription.getTopicName());
    this.deliveryManager.subscribe(subscription);

    if (subscription.getEventDispatcherName() != null) {
        // we persists a subscription only if it has a event dispatcher
        // name. the subscriptions with only an event dispatcher is not persisted.
        this.subscriptionManager.addSubscription(subscription);
    } else {
        if (subscription.getEventDispatcher() == null) {
            throw new EventBrokerException(" subscription url, event " +
                                           "dispatcher name and event dispatcher is null");
        }
    }
    return subscription.getId();
}
 
开发者ID:wso2,项目名称:carbon-registry,代码行数:35,代码来源:CarbonEventBroker.java

示例8: setUp

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
    super.setUp();
    attachmentContent = new byte[8192];
    random.nextBytes(attachmentContent);
    contentID = UIDGenerator.generateContentId();
}
 
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:8,代码来源:SwATestCase.java

示例9: OutInAxisOperation

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public OutInAxisOperation() {
    super();
    //setup a temporary name
    QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
    this.setName(tmpName);
    setMessageExchangePattern(WSDL2Constants.MEP_URI_OUT_IN);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:8,代码来源:OutInAxisOperation.java

示例10: attachPolicy

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public void attachPolicy(Policy policy) {
	String key = policy.getName();
	if (key == null) {
		key = policy.getId();
		if (key == null) {
			key = UIDGenerator.generateUID();
			policy.setId(key);
		}
	}
	attachPolicyComponent(key, policy);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:PolicySubject.java

示例11: OutOnlyAxisOperation

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public OutOnlyAxisOperation() {
    super();
    //setup a temporary name
    QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
    this.setName(tmpName);
    createMessage();
    setMessageExchangePattern(WSDL2Constants.MEP_URI_OUT_ONLY);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:9,代码来源:OutOnlyAxisOperation.java

示例12: AxisOperation

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/** Default constructor */
public AxisOperation() {
    mepURI = WSDL2Constants.MEP_URI_IN_OUT;
    modulerefs = new ArrayList<String>();
    moduleConfigmap = new HashMap<String, ModuleConfiguration>();
    faultMessages = new ArrayList<AxisMessage>();
    //setup a temporary name
    QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
    this.setName(tmpName);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:11,代码来源:AxisOperation.java

示例13: RobustOutOnlyAxisOperation

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public RobustOutOnlyAxisOperation() {
    super();
    //setup a temporary name
    QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
    this.setName(tmpName);
    setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_OUT_ONLY);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:8,代码来源:RobustOutOnlyAxisOperation.java

示例14: InOnlyAxisOperation

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public InOnlyAxisOperation() {
    super();
    //setup a temporary name
    QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
    this.setName(tmpName);
    createMessage();
    setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_ONLY);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:9,代码来源:InOnlyAxisOperation.java

示例15: TwoChannelAxisOperation

import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public TwoChannelAxisOperation() {
    super();
    //setup a temporary name
    QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
    this.setName(tmpName);
    createMessages();
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:8,代码来源:TwoChannelAxisOperation.java


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