org.apache.axiom.om.util.UUIDGenerator类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(9.7k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.apache.axiom.om.util.UUIDGenerator类的一些代码示例,展示了UUIDGenerator类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UUIDGenerator类的具体详情如下:
包路径:org.apache.axiom.om.util.UUIDGenerator
类名称:UUIDGenerator

UUIDGenerator介绍

暂无

代码示例

代码示例来源:origin: org.apache.airavata/airavata-workflow-model-core

/**
 * Creates an InputNode.
 * 
 * @param graph
 */
public StreamSourceNode(Graph graph) {
  super(graph);
  this.label = UUIDGenerator.getUUID();
}

代码示例来源:origin: org.bluestemsoftware.open.eoa.ext/open-eoa-aspect-axiom

public String getContentID() {
  if (contentID == null) {
    contentID = UUIDGenerator.getUUID() + "@apache.org";
  }
  return this.contentID;
}

代码示例来源:origin: org.apache.airavata/airavata-workflow-model-core

/**
 * Constructs an InputNode.
 * 
 * @param nodeElement
 * @throws GraphException
 */
public StreamSourceNode(XmlElement nodeElement) throws GraphException {
  super(nodeElement);
  this.label = UUIDGenerator.getUUID();
}

代码示例来源:origin: org.wso2.mercury/mercury-core

public static String getUUID() {
    String uuid = org.apache.axiom.om.util.UUIDGenerator.getUUID();
    return uuid;
  }
}

代码示例来源:origin: org.wso2.xkms/xkms

public String generateRequestId() {
  return UUIDGenerator.getUUID();
}

代码示例来源:origin: org.apache.sandesha2/sandesha2-core

/**
 * Create a new UUID.
 * 
 * @return
 */
public static String getUUID() {
  // String uuid = "uuid:" + UUIDGenerator.getUUID();
  String uuid = org.apache.axiom.om.util.UUIDGenerator.getUUID();
  return uuid;
}

代码示例来源:origin: org.wso2.xkms/xkms

public static String getRamdomId() {
  return UUIDGenerator.getUUID();
}

代码示例来源:origin: fbit/Cloud42

/**
 * Generates an Id for a subscription.
 * 
 * @return the generated Id as String
 */
public static String generateId() throws EventingException {
  // generate an ID for this subscription
  String id = UUIDGenerator.getUUID();
  try {
    URI uri = new URI(id);
    return uri.getSchemeSpecificPart();
  } catch (URISyntaxException e) {
    throw new EventingException(e);
  }
  
}

代码示例来源:origin: org.apache.axis2.transport/axis2-transport-mail

@Override
protected void updateMessageID() throws MessagingException {
  // although MailConstants.MAIL_HEADER_X_MESSAGE_ID solves the gmail problem with axis2-axis2
  // invocations it is not a generic solution.
  // we can over come gmail problem by setting the message id as follows with a valid gmail address
  // <xxxx@gmail.com> this can be achived by appending from address at the end of uuid
  if (getHeader(MailConstants.MAIL_HEADER_MESSAGE_ID) == null) {
    String uuid = "<" + UUIDGenerator.getUUID().replaceAll(":",".") + fromAddress +">";
    setHeader(MailConstants.MAIL_HEADER_MESSAGE_ID, uuid);
  }
}

代码示例来源:origin: usnistgov/iheos-toolkit2

/**
 * Method getId returns the id of this AssertionWrapper model.
 *
 * @return the id (type String) of this AssertionWrapper model.
 */
public String getId() {
  String id = null;
  if (saml2 != null) {
    id = saml2.getID();
  } else {
    log.error("AssertionWrapper: unable to return ID - no saml assertion model");
  }
  if (id == null || id.length() == 0) {
    log.error("AssertionWrapper: ID was null, seeting a new ID value");
    id = UUIDGenerator.getUUID();
    if (saml2 != null) {
      saml2.setID(id);
    } 
  }
  return id;
}

代码示例来源:origin: org.apache.airavata/messenger-commons

public static Options getOptions(String soapAction, long timeout, EndpointReference destination) {
  Options opts = new Options();
  opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
  opts.setAction(soapAction);
  opts.setTimeOutInMilliSeconds(timeout);
  opts.setMessageId(UUIDGenerator.getUUID());
  opts.setTo(destination);
  return opts;
}

代码示例来源:origin: org.apache.airavata/airavata-messenger-commons

public static Options getOptions(String soapAction, long timeout, EndpointReference destination) {
  Options opts = new Options();
  opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
  opts.setAction(soapAction);
  opts.setTimeOutInMilliSeconds(timeout);
  opts.setMessageId(UUIDGenerator.getUUID());
  opts.setTo(destination);
  return opts;
}

代码示例来源:origin: wso2/wso2-synapse

public String subscribe(Subscription subscription) throws EventException {
  if (subscription.getId() == null) {
    subscription.setId(org.apache.axiom.om.util.UUIDGenerator.getUUID());
  }
  store.put(subscription.getId(), subscription);
  return subscription.getId();
}

代码示例来源:origin: org.apache.airavata/airavata-messenger-client

private ServiceClient createServiceClient() throws AxisFault {
  String uuid = UUIDGenerator.getUUID();
  Options opts = new Options();
  opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
  opts.setTo(new EndpointReference(this.msgBoxEndPointReference));
  opts.setMessageId(uuid);
  opts.setAction(NameSpaceConstants.MSG_BOX.getNamespaceURI() + "/" + "createMsgBox");
  opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds());
  ServiceClient client = new ServiceClient();
  try {
    client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING);
    if (logger.isDebugEnabled())
      logger.debug("Addressing module engaged");
  } catch (AxisFault e) {
    if (logger.isDebugEnabled())
      logger.debug("Addressing module not engaged :" + e);
  }
  client.setOptions(opts);
  return client;
}

代码示例来源:origin: org.apache.airavata/messenger-client

private ServiceClient createServiceClient() throws AxisFault {
  String uuid = UUIDGenerator.getUUID();
  Options opts = new Options();
  opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
  opts.setTo(new EndpointReference(this.msgBoxEndPointReference));
  opts.setMessageId(uuid);
  opts.setAction(NameSpaceConstants.MSG_BOX.getNamespaceURI() + "/" + "createMsgBox");
  opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds());
  ServiceClient client = new ServiceClient();
  try {
    client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING);
    if (logger.isDebugEnabled())
      logger.debug("Addressing module engaged");
  } catch (AxisFault e) {
    if (logger.isDebugEnabled())
      logger.debug("Addressing module not engaged :" + e);
  }
  client.setOptions(opts);
  return client;
}

代码示例来源:origin: org.apache.airavata/airavata-messenger-client

private ServiceClient createServiceClient() throws AxisFault {
    String uuid = UUIDGenerator.getUUID();
    Options opts = new Options();
    opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
    opts.setTo(msgBoxEndPointReference);
    opts.setMessageId(uuid);
    opts.setAction(NameSpaceConstants.MSG_BOX.getNamespaceURI() + "/" + "storeMessages");

    opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds());
    ServiceClient client = new ServiceClient();
    try {
      client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING);
      if (logger.isDebugEnabled())
        logger.debug("Addressing module engaged");
    } catch (AxisFault e) {
      if (logger.isDebugEnabled())
        logger.debug("Addressing module not engaged :" + e);
    }
    client.setOptions(opts);
    return client;
  }
}

代码示例来源:origin: org.apache.airavata/messenger-client

private ServiceClient createServiceClient() throws AxisFault {
    String uuid = UUIDGenerator.getUUID();
    Options opts = new Options();
    opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
    opts.setTo(msgBoxEndPointReference);
    opts.setMessageId(uuid);
    opts.setAction(NameSpaceConstants.MSG_BOX.getNamespaceURI() + "/" + "storeMessages");

    opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds());
    ServiceClient client = new ServiceClient();
    try {
      client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING);
      if (logger.isDebugEnabled())
        logger.debug("Addressing module engaged");
    } catch (AxisFault e) {
      if (logger.isDebugEnabled())
        logger.debug("Addressing module not engaged :" + e);
    }
    client.setOptions(opts);
    return client;
  }
}

代码示例来源:origin: org.apache.airavata/airavata-messenger-client

private ServiceClient createServiceClient(OMElement message) throws AxisFault {
    String uuid = UUIDGenerator.getUUID();
    Options opts = new Options();
    opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
    opts.setTo(msgBoxEndPointReference);
    opts.setMessageId(uuid);
    opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName());

    opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds());
    ServiceClient client = new ServiceClient();
    try {
      client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING);
      if (logger.isDebugEnabled())
        logger.debug("Addressing module engaged");
    } catch (AxisFault e) {
      if (logger.isDebugEnabled())
        logger.debug("Addressing module not engaged :" + e);
    }

    client.setOptions(opts);
    return client;
  }
}

代码示例来源:origin: org.apache.airavata/messenger-client

private ServiceClient createServiceClient(OMElement message) throws AxisFault {
    String uuid = UUIDGenerator.getUUID();
    Options opts = new Options();
    opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
    opts.setTo(msgBoxEndPointReference);
    opts.setMessageId(uuid);
    opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName());

    opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds());

    ServiceClient client = new ServiceClient();
    try {
      client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING);
      if (logger.isDebugEnabled())
        logger.debug("Addressing module engaged");
    } catch (AxisFault e) {
      if (logger.isDebugEnabled())
        logger.debug("Addressing module not engaged :" + e);
    }

    client.setOptions(opts);
    return client;
  }
}

代码示例来源:origin: org.apache.airavata/messenger-client

private ServiceClient createServiceClient(OMElement message) throws AxisFault {
    String uuid = UUIDGenerator.getUUID();
    Options opts = new Options();
    opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
    opts.setTo(msgBoxEndPointReference);
    opts.setMessageId(uuid);
    opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName());

    opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds());
    ServiceClient client = new ServiceClient();
    try {
      client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING);
      if (logger.isDebugEnabled())
        logger.debug("Addressing module engaged");
    } catch (AxisFault e) {
      if (logger.isDebugEnabled())
        logger.debug("Addressing module not engaged :" + e);
    }

    client.setOptions(opts);
    return client;
  }
}

相关文章

微信公众号

最新文章

更多

UUIDGenerator类方法