Codota Logo
InvocationContext.getCalleePort
Code IndexAdd Codota to your IDE (free)

How to use
getCalleePort
method
in
com.isuwang.dapeng.core.InvocationContext

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: isuwang/isuwang-soa

/**
 * 删除链接
 *
 * @throws SoaException
 */
@Override
public synchronized void removeConnection() throws SoaException {
  InvocationContext context = InvocationContext.Factory.getCurrentInstance();
  if (context.getCalleeIp() == null || context.getCalleePort() <= 0)
    return;
  String connectKey = context.getCalleeIp() + ":" + String.valueOf(context.getCalleePort());
  if (connectionMap.containsKey(connectKey))
    connectionMap.remove(connectKey);
  if (scalaConnectionMap.containsKey(connectKey))
    scalaConnectionMap.remove(connectKey);
}
origin: isuwang/isuwang-soa

@Override
public synchronized SoaConnection getConnection() throws SoaException {
  InvocationContext context = InvocationContext.Factory.getCurrentInstance();
  if (context.getCalleeIp() == null || context.getCalleePort() <= 0)
    throw new SoaException(SoaBaseCode.NotFoundServer);
  String connectKey = context.getCalleeIp() + ":" + String.valueOf(context.getCalleePort());
  if (connectionMap.containsKey(connectKey)) {
    return connectionMap.get(connectKey);
  }
  SoaConnectionImpl soaConnection = new SoaConnectionImpl(context.getCalleeIp(), context.getCalleePort());
  connectionMap.put(connectKey, soaConnection);
  return soaConnection;
}
origin: isuwang/isuwang-soa

@Override
public SoaCommonConnection getCommonConnection() throws SoaException {
  InvocationContext context = InvocationContext.Factory.getCurrentInstance();
  if (context.getCalleeIp() == null || context.getCalleePort() <= 0)
    throw new SoaException(SoaBaseCode.NotFoundServer);
  String connectKey = context.getCalleeIp() + ":" + String.valueOf(context.getCalleePort());
  if (scalaConnectionMap.containsKey(connectKey)) {
    return scalaConnectionMap.get(connectKey);
  }
  SoaCommonConnectionImpl soaConnection = new SoaCommonConnectionImpl(context.getCalleeIp(), context.getCalleePort());
  scalaConnectionMap.put(connectKey, soaConnection);
  return soaConnection;
}
origin: isuwang/isuwang-soa

@Override
public void doFilter(FilterChain chain) throws TException {
  final SoaHeader soaHeader = (SoaHeader) chain.getAttribute(StubFilterChain.ATTR_KEY_HEADER);
  final Object request = chain.getAttribute(StubFilterChain.ATTR_KEY_REQUEST);
  final long startTime = System.currentTimeMillis();
  final InvocationContext context = (InvocationContext) chain.getAttribute(StubFilterChain.ATTR_KEY_CONTEXT);
  LOGGER.info("{} {} {} request", soaHeader.getServiceName(), soaHeader.getVersionName(), soaHeader.getMethodName());
  try {
    chain.doFilter();
  } finally {
    // Object response = chain.getAttribute(StubFilterChain.ATTR_KEY_RESPONSE);
    final long endTime = System.currentTimeMillis();
    LOGGER.info("{} {} {} callee: {}:{} response respCode:{} time:{}ms", soaHeader.getServiceName(), soaHeader.getVersionName(), soaHeader.getMethodName(),
        context.getCalleeIp(), context.getCalleePort(), soaHeader.getRespCode(), endTime-startTime);
  }
}
origin: isuwang/isuwang-soa

Socket socket = new Socket(context.getCalleeIp(), context.getCalleePort());
BufferedOutputStream output = new BufferedOutputStream(socket.getOutputStream());
BufferedInputStream input = new BufferedInputStream(socket.getInputStream());
com.isuwang.dapeng.coreInvocationContextgetCalleePort

Popular methods of InvocationContext

  • getHeader
  • getCalleeIp
  • getCalleeTimeout
  • getSeqid
  • setCalleeTimeout
  • setHeader
  • setSeqid
  • <init>
  • getFailedTimes
  • isSoaTransactionProcess
  • setCalleeIp
  • setCalleePort
  • setCalleeIp,
  • setCalleePort,
  • setFailedTimes,
  • setSoaTransactionProcess

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JFileChooser (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now