ARTEMIS-227 allow adding STOMP interceptor instances

This commit is contained in:
Julian Scheid 2015-09-25 14:09:28 +02:00 committed by Clebert Suconic
parent 616f68372b
commit fe16ffe068
4 changed files with 12 additions and 16 deletions

View File

@ -20,7 +20,6 @@ import java.util.List;
import java.util.Set;
import org.apache.activemq.artemis.api.core.BaseInterceptor;
import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection;
import org.apache.activemq.artemis.core.security.ActiveMQPrincipal;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
@ -43,17 +42,17 @@ public interface RemotingService {
ReusableLatch getConnectionCountLatch();
void addIncomingInterceptor(Interceptor interceptor);
void addIncomingInterceptor(BaseInterceptor interceptor);
List<BaseInterceptor> getIncomingInterceptors();
void addOutgoingInterceptor(Interceptor interceptor);
void addOutgoingInterceptor(BaseInterceptor interceptor);
List<BaseInterceptor> getOutgoinInterceptors();
boolean removeIncomingInterceptor(Interceptor interceptor);
boolean removeIncomingInterceptor(BaseInterceptor interceptor);
boolean removeOutgoingInterceptor(Interceptor interceptor);
boolean removeOutgoingInterceptor(BaseInterceptor interceptor);
void stop(boolean criticalError) throws Exception;

View File

@ -40,7 +40,6 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.ActiveMQException;
import org.apache.activemq.artemis.api.core.ActiveMQInterruptedException;
import org.apache.activemq.artemis.api.core.BaseInterceptor;
import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
import org.apache.activemq.artemis.core.config.Configuration;
import org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection;
@ -525,7 +524,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
}
@Override
public void addIncomingInterceptor(final Interceptor interceptor) {
public void addIncomingInterceptor(final BaseInterceptor interceptor) {
incomingInterceptors.add(interceptor);
updateProtocols();
@ -537,7 +536,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
}
@Override
public boolean removeIncomingInterceptor(final Interceptor interceptor) {
public boolean removeIncomingInterceptor(final BaseInterceptor interceptor) {
if (incomingInterceptors.remove(interceptor)) {
updateProtocols();
return true;
@ -548,7 +547,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
}
@Override
public void addOutgoingInterceptor(final Interceptor interceptor) {
public void addOutgoingInterceptor(final BaseInterceptor interceptor) {
outgoingInterceptors.add(interceptor);
updateProtocols();
}
@ -559,7 +558,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
}
@Override
public boolean removeOutgoingInterceptor(final Interceptor interceptor) {
public boolean removeOutgoingInterceptor(final BaseInterceptor interceptor) {
if (outgoingInterceptors.remove(interceptor)) {
updateProtocols();
return true;

View File

@ -17,7 +17,6 @@
package org.apache.activemq.artemis.core.server;
import org.apache.activemq.artemis.api.core.BaseInterceptor;
import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.core.config.ConnectorServiceConfiguration;
import org.apache.activemq.artemis.core.server.cluster.Transformer;
@ -55,7 +54,7 @@ public interface ServiceRegistry {
*/
Collection<Pair<ConnectorServiceFactory, ConnectorServiceConfiguration>> getConnectorServices(List<ConnectorServiceConfiguration> configs);
void addIncomingInterceptor(Interceptor interceptor);
void addIncomingInterceptor(BaseInterceptor interceptor);
/**
* Get a list of org.apache.activemq.artemis.api.core.BaseInterceptor instances
@ -65,7 +64,7 @@ public interface ServiceRegistry {
*/
List<BaseInterceptor> getIncomingInterceptors(List<String> classNames);
void addOutgoingInterceptor(Interceptor interceptor);
void addOutgoingInterceptor(BaseInterceptor interceptor);
/**
* Get a list of org.apache.activemq.artemis.api.core.BaseInterceptor instances

View File

@ -17,7 +17,6 @@
package org.apache.activemq.artemis.core.server.impl;
import org.apache.activemq.artemis.api.core.BaseInterceptor;
import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.core.config.ConnectorServiceConfiguration;
import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle;
@ -118,7 +117,7 @@ public class ServiceRegistryImpl implements ServiceRegistry {
}
@Override
public void addIncomingInterceptor(Interceptor interceptor) {
public void addIncomingInterceptor(BaseInterceptor interceptor) {
incomingInterceptors.add(interceptor);
}
@ -132,7 +131,7 @@ public class ServiceRegistryImpl implements ServiceRegistry {
}
@Override
public void addOutgoingInterceptor(Interceptor interceptor) {
public void addOutgoingInterceptor(BaseInterceptor interceptor) {
outgoingInterceptors.add(interceptor);
}