本文整理了Java中io.gravitee.common.event.Event.type()
方法的一些代码示例,展示了Event.type()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.type()
方法的具体详情如下:
包路径:io.gravitee.common.event.Event
类名称:Event
方法名:type
暂无
代码示例来源:origin: gravitee-io/gravitee-gateway
@Override
public void onEvent(Event<ReactorEvent, Reactable> event) {
switch (event.type()) {
case DEPLOY:
reactorHandlerRegistry.create(event.content());
break;
case UPDATE:
reactorHandlerRegistry.update(event.content());
break;
case UNDEPLOY:
reactorHandlerRegistry.remove(event.content());
break;
}
}
代码示例来源:origin: gravitee-io/gravitee-gateway
@Override
public void onEvent(Event<ReactorEvent, Reactable> event) {
final Api api = (Api) event.content().item();
switch (event.type()) {
case DEPLOY:
startHealthCheck(api);
break;
case UNDEPLOY:
stopHealthCheck(api);
break;
case UPDATE:
stopHealthCheck(api);
startHealthCheck(api);
break;
}
}
代码示例来源:origin: gravitee-io/gravitee-gateway
@Override
public void onEvent(Event<ReactorEvent, Reactable> event) {
final Api api = (Api) event.content().item();
switch (event.type()) {
case DEPLOY:
lookupForServiceDiscovery(api);
break;
case UNDEPLOY:
stopServiceDiscovery(api);
break;
case UPDATE:
stopServiceDiscovery(api);
lookupForServiceDiscovery(api);
break;
}
}
代码示例来源:origin: gravitee-io/gravitee-gateway
@Override
public void onEvent(Event<ReactorEvent, Reactable> event) {
final Api api = (Api) event.content().item();
switch (event.type()) {
case DEPLOY:
startRefresher(api);
break;
case UNDEPLOY:
stopRefresher(api);
break;
case UPDATE:
stopRefresher(api);
startRefresher(api);
break;
default:
// Nothing to do with unknown event type
break;
}
}
代码示例来源:origin: gravitee-io/gravitee-gateway
@Override
public void onEvent(Event<ReactorEvent, Reactable> event) {
final Api api = (Api) event.content().item();
switch (event.type()) {
case DEPLOY:
startRefresher(api);
break;
case UNDEPLOY:
stopRefresher(api);
break;
case UPDATE:
stopRefresher(api);
startRefresher(api);
break;
default:
// Nothing to do with unknown event type
break;
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
public void publishEvent(Event event) {
LOGGER.debug("Publish event {} - {}", event.type(), event.content());
List<EventListenerWrapper> listeners = getEventListeners(event.type().getClass());
List<EventListenerWrapper> safeConcurrentListeners = Lists.newArrayList(listeners.iterator());
for(EventListenerWrapper listener : safeConcurrentListeners) {
listener.eventListener().onEvent(event);
}
}
代码示例来源:origin: io.gravitee.common/gravitee-common
public void publishEvent(Event event) {
LOGGER.debug("Publish event {} - {}", event.type(), event.content());
List<EventListenerWrapper> listeners = getEventListeners(event.type().getClass());
for(EventListenerWrapper listener : listeners) {
listener.eventListener().onEvent(event);
}
}
代码示例来源:origin: gravitee-io/gravitee-management-rest-api
@Override
public void onEvent(Event<DictionaryEvent, DictionaryEntity> event) {
final DictionaryEntity dictionary = event.content();
switch (event.type()) {
case START:
startDynamicDictionary(dictionary);
break;
case STOP:
stopDynamicDictionary(dictionary);
break;
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void onEvent(Event<ClientEvent, Payload> event) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateClient(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeClient(event.content().getId(), event.content().getDomain());
break;
}
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
@Override
public void onEvent(Event<ClientEvent, Payload> event) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateClient(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeClient(event.content().getId(), event.content().getDomain());
break;
}
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
@Override
public void onEvent(Event<CertificateEvent, Payload> event) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateCertificate(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeCertificate(event.content().getId(), event.content().getDomain());
break;
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void onEvent(Event<CertificateEvent, Payload> event) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateCertificate(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeCertificate(event.content().getId(), event.content().getDomain());
break;
}
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
@Override
public void onEvent(Event<FormEvent, Payload> event) {
if (domain.getId().equals(event.content().getDomain())) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateForm(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeForm(event.content().getId());
break;
}
}
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
@Override
public void onEvent(Event<ExtensionGrantEvent, Payload> event) {
if (domain.getId().equals(event.content().getDomain())) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateExtensionGrant(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeExtensionGrant(event.content().getId());
break;
}
}
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
@Override
public void onEvent(Event<IdentityProviderEvent, Payload> event) {
if (domain.getId().equals(event.content().getDomain())) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateIdentityProvider(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeIdentityProvider(event.content().getId());
break;
}
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void onEvent(Event<ExtensionGrantEvent, Payload> event) {
if (domain.getId().equals(event.content().getDomain())) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateExtensionGrant(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeExtensionGrant(event.content().getId());
break;
}
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void onEvent(Event<IdentityProviderEvent, Payload> event) {
if (domain.getId().equals(event.content().getDomain())) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateIdentityProvider(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeIdentityProvider(event.content().getId());
break;
}
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void onEvent(Event<FormEvent, Payload> event) {
if (domain.getId().equals(event.content().getDomain())) {
switch (event.type()) {
case DEPLOY:
case UPDATE:
updateForm(event.content().getId(), event.type());
break;
case UNDEPLOY:
removeForm(event.content().getId());
break;
}
}
}
代码示例来源:origin: io.gravitee.am.gateway/gravitee-am-gateway-reactor
@Override
public void onEvent(Event<DomainEvent, Domain> event) {
switch (event.type()) {
case DEPLOY:
securityDomainHandlerRegistry.create(event.content());
break;
case UPDATE:
securityDomainHandlerRegistry.update(event.content());
break;
case UNDEPLOY:
securityDomainHandlerRegistry.remove(event.content());
break;
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void onEvent(Event<DomainEvent, Domain> event) {
switch (event.type()) {
case DEPLOY:
securityDomainHandlerRegistry.create(event.content());
break;
case UPDATE:
securityDomainHandlerRegistry.update(event.content());
break;
case UNDEPLOY:
securityDomainHandlerRegistry.remove(event.content());
break;
}
}
内容来源于网络,如有侵权,请联系作者删除!