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

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

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

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: isuwang/isuwang-soa

  oprot.writeFieldEnd();
if (bean.getCallerIp().isPresent()) {
  oprot.writeFieldBegin(new TField("callerIP", TType.STRING, (short) 5));
  oprot.writeString(bean.getCallerIp().get());
  oprot.writeFieldEnd();
origin: com.isuwang/dapeng-core

  oprot.writeFieldEnd();
if (bean.getCallerIp().isPresent()) {
  oprot.writeFieldBegin(new TField("callerIP", TType.STRING, (short) 5));
  oprot.writeString(bean.getCallerIp().get());
  oprot.writeFieldEnd();
com.isuwang.dapeng.coreSoaHeadergetCallerIp

Popular methods of SoaHeader

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Vim 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