in chatterbox-slack/chatterbox-slack-impl/src/main/java/org/apache/tomee/chatterbox/slack/adapter/SlackResourceAdapter.java [126:140]
public void endpointDeactivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) {
final SlackActivationSpec telnetActivationSpec = (SlackActivationSpec) activationSpec;
final EndpointTarget endpointTarget = targets.get(telnetActivationSpec);
if (endpointTarget == null) {
throw new IllegalStateException("No EndpointTarget to undeploy for ActivationSpec " + activationSpec);
}
final List<Cmd> commands = telnetActivationSpec.getCommands();
for (Cmd command : commands) {
main.remove(command);
}
endpointTarget.messageEndpoint.release();
}