Tabnine Logo
SoaHeader.getCustomerId
Code IndexAdd Tabnine to your IDE (free)

How to use
getCustomerId
method
in
com.isuwang.dapeng.core.SoaHeader

Best Java code snippets using com.isuwang.dapeng.core.SoaHeader.getCustomerId (Showing top 9 results out of 315)

origin: isuwang/isuwang-soa

/**
 * 设置默认的customer和operator
 *
 * @param header
 */
public static void resetSoaHeader(SoaHeader header) {
  if (!header.getOperatorId().isPresent()) {
    header.setOperatorId(Optional.of(0));
    header.setOperatorName(Optional.of("0"));
  }
  if (!header.getCustomerId().isPresent()) {
    header.setCustomerId(Optional.of(0));
    header.setCustomerName(Optional.of("0"));
  }
}
origin: com.isuwang/dapeng-core

/**
 * 设置默认的customer和operator
 *
 * @param header
 */
public static void resetSoaHeader(SoaHeader header) {
  if (!header.getOperatorId().isPresent()) {
    header.setOperatorId(Optional.of(0));
    header.setOperatorName(Optional.of("0"));
  }
  if (!header.getCustomerId().isPresent()) {
    header.setCustomerId(Optional.of(0));
    header.setCustomerName(Optional.of("0"));
  }
}
origin: isuwang/isuwang-soa

public Task(TransactionContext context) {
  this.startTime = System.currentTimeMillis();
  this.seqid = context.getSeqid();
  SoaHeader soaHeader = context.getHeader();
  this.serviceName = soaHeader.getServiceName();
  this.versionName = soaHeader.getVersionName();
  this.methodName = soaHeader.getMethodName();
  this.callerFrom = soaHeader.getCallerFrom().isPresent() ? soaHeader.getCallerFrom().get() : null;
  this.callerIp = soaHeader.getCallerIp().isPresent() ? soaHeader.getCallerIp().get() : null;
  this.operatorId = soaHeader.getOperatorId().isPresent() ? soaHeader.getOperatorId().get() : null;
  this.operatorName = soaHeader.getOperatorName().isPresent() ? soaHeader.getOperatorName().get() : null;
  this.customerId = soaHeader.getCustomerId().isPresent() ? soaHeader.getCustomerId().get() : null;
  this.customerName = soaHeader.getCustomerName().isPresent() ? soaHeader.getCustomerName().get() : null;
  this.currentThread = Thread.currentThread();
}
origin: isuwang/isuwang-soa

/**
 * 根据matcher.Id,返回上下文中对应的值
 *
 * @param ctx
 * @param matcher
 * @return
 */
public static Object checkFieldMatcher(InvocationContext ctx, Matcher matcher) {
  Id id = matcher.getId();
  if ("operatorId".equals(id.getName())) {
    return ctx.getHeader().getOperatorId().orElse(null);
  } else if ("callerFrom".equals(id.getName())) {
    return ctx.getHeader().getCallerFrom().orElse(null);
  } else if ("ip".equals(id.getName())) {
    return ctx.getHeader().getCallerIp().orElse(null);
  } else if ("customerId".equals(id.getName())) {
    return ctx.getHeader().getCustomerId().orElse(null);
  } else if ("service".equals(id.getName())) {
    return ctx.getHeader().getServiceName();
  } else if ("method".equals(id.getName())) {
    return ctx.getHeader().getMethodName();
  } else if ("version".equals(id.getName())) {
    return ctx.getHeader().getVersionName();
  } else {
    throw new AssertionError("not support Field: " + id.getName());
  }
}
origin: com.isuwang/dapeng-route-impl

/**
 * 根据matcher.Id,返回上下文中对应的值
 *
 * @param ctx
 * @param matcher
 * @return
 */
public static Object checkFieldMatcher(InvocationContext ctx, Matcher matcher) {
  Id id = matcher.getId();
  if ("operatorId".equals(id.getName())) {
    return ctx.getHeader().getOperatorId().orElse(null);
  } else if ("callerFrom".equals(id.getName())) {
    return ctx.getHeader().getCallerFrom().orElse(null);
  } else if ("ip".equals(id.getName())) {
    return ctx.getHeader().getCallerIp().orElse(null);
  } else if ("customerId".equals(id.getName())) {
    return ctx.getHeader().getCustomerId().orElse(null);
  } else if ("service".equals(id.getName())) {
    return ctx.getHeader().getServiceName();
  } else if ("method".equals(id.getName())) {
    return ctx.getHeader().getMethodName();
  } else if ("version".equals(id.getName())) {
    return ctx.getHeader().getVersionName();
  } else {
    throw new AssertionError("not support Field: " + id.getName());
  }
}
origin: com.isuwang/dapeng-remoting-api

SoaHeader oriHeader = transactionContext.getHeader();
soaHeader.setCustomerId(oriHeader.getCustomerId());
soaHeader.setCustomerName(oriHeader.getCustomerName());
soaHeader.setOperatorId(oriHeader.getOperatorId());
origin: isuwang/isuwang-soa

SoaHeader oriHeader = transactionContext.getHeader();
soaHeader.setCustomerId(oriHeader.getCustomerId());
soaHeader.setCustomerName(oriHeader.getCustomerName());
soaHeader.setOperatorId(oriHeader.getOperatorId());
origin: isuwang/isuwang-soa

  oprot.writeFieldEnd();
if (bean.getCustomerId().isPresent()) {
  oprot.writeFieldBegin(new TField("customerId", TType.I32, (short) 17));
  oprot.writeI32(bean.getCustomerId().get());
  oprot.writeFieldEnd();
origin: com.isuwang/dapeng-core

  oprot.writeFieldEnd();
if (bean.getCustomerId().isPresent()) {
  oprot.writeFieldBegin(new TField("customerId", TType.I32, (short) 17));
  oprot.writeI32(bean.getCustomerId().get());
  oprot.writeFieldEnd();
com.isuwang.dapeng.coreSoaHeadergetCustomerId

Popular methods of SoaHeader

  • getMethodName
  • getServiceName
  • getVersionName
  • <init>
  • setMethodName
  • setServiceName
  • setVersionName
  • getRespCode
  • setCallerFrom
  • getCallerFrom
  • getOperatorId
  • getRespMessage
  • getOperatorId,
  • getRespMessage,
  • getCallerIp,
  • getCustomerName,
  • getOperatorName,
  • setCallerIp,
  • setOperatorId,
  • setOperatorName,
  • setTransactionId

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • IsNull (org.hamcrest.core)
    Is the value null?
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now