Codota Logo
EventManager.post
Code IndexAdd Codota to your IDE (free)

How to use
post
method
in
org.apache.servicecomb.foundation.common.event.EventManager

Best Java code snippets using org.apache.servicecomb.foundation.common.event.EventManager.post (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: apache/servicecomb-java-chassis

@Override
public void onBusinessMethodFinish() {
 EventManager.post(new InvocationBusinessMethodFinishEvent(this));
}
origin: apache/servicecomb-java-chassis

private void sendHeartbeat(WebSocket ws) {
 try {
  ws.writeFrame(new WebSocketFrameImpl(FrameType.PING));
  EventManager.post(new ConnSuccEvent());
 } catch (IllegalStateException e) {
  EventManager.post(new ConnFailEvent("heartbeat fail, " + e.getMessage()));
  LOGGER.error("heartbeat fail", e);
 }
}
origin: apache/servicecomb-java-chassis

@Override
public void onBusinessMethodStart() {
 invocationStageTrace.startBusinessMethod();
 EventManager.post(new InvocationBusinessMethodStartEvent(this));
}
origin: apache/servicecomb-java-chassis

public void onFinish(Response response) {
 if (finished) {
  // avoid to post repeated event
  return;
 }
 invocationStageTrace.finish();
 EventManager.post(new InvocationFinishEvent(this, response));
 finished = true;
}
origin: apache/servicecomb-java-chassis

public void onStart(long start) {
 invocationStageTrace.start(start);
 initTraceId();
 EventManager.post(new InvocationStartEvent(this));
}
origin: apache/servicecomb-java-chassis

 private HeartbeatResult heartbeat() {
  HeartbeatResponse response =
    srClient.heartbeat(microserviceInstance.getServiceId(), microserviceInstance.getInstanceId());
  if (response == null) {
   LOGGER.error("Disconnected from service center and heartbeat failed for microservice instance={}/{}",
     microserviceInstance.getServiceId(),
     microserviceInstance.getInstanceId());
   EventManager.post(new HeartbeatFailEvent());
   return HeartbeatResult.DISCONNECTED;
  }

  if (!response.isOk()) {
   LOGGER.error("Update heartbeat to service center failed, microservice instance={}/{} does not exist",
     microserviceInstance.getServiceId(),
     microserviceInstance.getInstanceId());
   EventManager.post(new HeartbeatFailEvent());
   return HeartbeatResult.INSTANCE_NOT_REGISTERED;
  }
  EventManager.post(new HeartbeatSuccEvent());
  return HeartbeatResult.SUCCESS;
 }
}
origin: apache/servicecomb-java-chassis

        new TypeReference<LinkedHashMap<String, Map<String, String>>>() {
        }));
    EventManager.post(new ConnSuccEvent());
   } catch (IOException e) {
    EventManager.post(new ConnFailEvent(
      "config update result parse fail " + e.getMessage()));
    LOGGER.error("Config update from {} failed. Error message is [{}].",
 } else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()) {
  EventManager.post(new ConnSuccEvent());
  if (LOGGER.isDebugEnabled()) {
   LOGGER.debug("Updating remote config is done. the revision {} has no change",
   latch.countDown();
  });
  EventManager.post(new ConnFailEvent("fetch config fail"));
  LOGGER.error("Config update from {} failed.", configcenter);
    null))));
request.exceptionHandler(e -> {
 EventManager.post(new ConnFailEvent("fetch config fail"));
 LOGGER.error("Config update from {} failed. Error message is [{}].",
   configcenter,
origin: org.apache.servicecomb/java-chassis-core

@Override
public void onBusinessMethodFinish() {
 EventManager.post(new InvocationBusinessMethodFinishEvent(this));
}
origin: org.apache.servicecomb/config-cc

private void sendHeartbeat(WebSocket ws) {
 try {
  ws.writeFrame(new WebSocketFrameImpl(FrameType.PING));
  EventManager.post(new ConnSuccEvent());
 } catch (IllegalStateException e) {
  EventManager.post(new ConnFailEvent("heartbeat fail, " + e.getMessage()));
  LOGGER.error("heartbeat fail", e);
 }
}
origin: org.apache.servicecomb/java-chassis-core

public void onFinish(Response response) {
 if (finished) {
  // avoid to post repeated event
  return;
 }
 invocationStageTrace.finish();
 EventManager.post(new InvocationFinishEvent(this, response));
 finished = true;
}
origin: org.apache.servicecomb/java-chassis-core

@Override
public void onBusinessMethodStart() {
 invocationStageTrace.startBusinessMethod();
 EventManager.post(new InvocationBusinessMethodStartEvent(this));
}
origin: org.apache.servicecomb/java-chassis-core

public void onStart(long start) {
 invocationStageTrace.start(start);
 initTraceId();
 EventManager.post(new InvocationStartEvent(this));
}
origin: org.apache.servicecomb/service-registry

 private HeartbeatResult heartbeat() {
  HeartbeatResponse response =
    srClient.heartbeat(microserviceInstance.getServiceId(), microserviceInstance.getInstanceId());
  if (response == null) {
   LOGGER.error("Disconnected from service center and heartbeat failed for microservice instance={}/{}",
     microserviceInstance.getServiceId(),
     microserviceInstance.getInstanceId());
   EventManager.post(new HeartbeatFailEvent());
   return HeartbeatResult.DISCONNECTED;
  }

  if (!response.isOk()) {
   LOGGER.error("Update heartbeat to service center failed, microservice instance={}/{} does not exist",
     microserviceInstance.getServiceId(),
     microserviceInstance.getInstanceId());
   EventManager.post(new HeartbeatFailEvent());
   return HeartbeatResult.INSTANCE_NOT_REGISTERED;
  }
  EventManager.post(new HeartbeatSuccEvent());
  return HeartbeatResult.SUCCESS;
 }
}
origin: org.apache.servicecomb/config-cc

        new TypeReference<LinkedHashMap<String, Map<String, String>>>() {
        }));
    EventManager.post(new ConnSuccEvent());
   } catch (IOException e) {
    EventManager.post(new ConnFailEvent(
      "config update result parse fail " + e.getMessage()));
    LOGGER.error("Config update from {} failed. Error message is [{}].",
 } else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()) {
  EventManager.post(new ConnSuccEvent());
  if (LOGGER.isDebugEnabled()) {
   LOGGER.debug("Updating remote config is done. the revision {} has no change",
   latch.countDown();
  });
  EventManager.post(new ConnFailEvent("fetch config fail"));
  LOGGER.error("Config update from {} failed.", configcenter);
    null))));
request.exceptionHandler(e -> {
 EventManager.post(new ConnFailEvent("fetch config fail"));
 LOGGER.error("Config update from {} failed. Error message is [{}].",
   configcenter,
org.apache.servicecomb.foundation.common.eventEventManagerpost

Javadoc

post event.

Popular methods of EventManager

  • register
    Registering listener.
  • getEventBus
  • unregister
    Unregistering listener.

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
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