Log the protocol module name on boot
This commit is contained in:
parent
77efc950af
commit
a176a542aa
|
@ -29,6 +29,8 @@ public class ProtonProtocolManagerFactory extends AbstractProtocolManagerFactory
|
||||||
{
|
{
|
||||||
private static final String AMQP_PROTOCOL_NAME = "AMQP";
|
private static final String AMQP_PROTOCOL_NAME = "AMQP";
|
||||||
|
|
||||||
|
private static final String MODULE_NAME = "artemis-amqp-protocol";
|
||||||
|
|
||||||
private static String[] SUPPORTED_PROTOCOLS = {AMQP_PROTOCOL_NAME};
|
private static String[] SUPPORTED_PROTOCOLS = {AMQP_PROTOCOL_NAME};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,4 +51,10 @@ public class ProtonProtocolManagerFactory extends AbstractProtocolManagerFactory
|
||||||
{
|
{
|
||||||
return SUPPORTED_PROTOCOLS;
|
return SUPPORTED_PROTOCOLS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getModuleName()
|
||||||
|
{
|
||||||
|
return MODULE_NAME;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@ public class HornetQProtocolManagerFactory extends CoreProtocolManagerFactory
|
||||||
{
|
{
|
||||||
public static final String HORNETQ_PROTOCOL_NAME = "HORNETQ";
|
public static final String HORNETQ_PROTOCOL_NAME = "HORNETQ";
|
||||||
|
|
||||||
|
private static final String MODULE_NAME = "artemis-hornetq-protocol";
|
||||||
|
|
||||||
private static String[] SUPPORTED_PROTOCOLS = {HORNETQ_PROTOCOL_NAME};
|
private static String[] SUPPORTED_PROTOCOLS = {HORNETQ_PROTOCOL_NAME};
|
||||||
|
|
||||||
public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
|
public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
|
||||||
|
@ -43,4 +45,10 @@ public class HornetQProtocolManagerFactory extends CoreProtocolManagerFactory
|
||||||
{
|
{
|
||||||
return SUPPORTED_PROTOCOLS;
|
return SUPPORTED_PROTOCOLS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getModuleName()
|
||||||
|
{
|
||||||
|
return MODULE_NAME;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ public class OpenWireProtocolManagerFactory extends AbstractProtocolManagerFacto
|
||||||
{
|
{
|
||||||
public static final String OPENWIRE_PROTOCOL_NAME = "OPENWIRE";
|
public static final String OPENWIRE_PROTOCOL_NAME = "OPENWIRE";
|
||||||
|
|
||||||
|
private static final String MODULE_NAME = "artemis-openwire-protocol";
|
||||||
|
|
||||||
private static String[] SUPPORTED_PROTOCOLS = {OPENWIRE_PROTOCOL_NAME};
|
private static String[] SUPPORTED_PROTOCOLS = {OPENWIRE_PROTOCOL_NAME};
|
||||||
|
|
||||||
public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
|
public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
|
||||||
|
@ -48,4 +50,9 @@ public class OpenWireProtocolManagerFactory extends AbstractProtocolManagerFacto
|
||||||
return SUPPORTED_PROTOCOLS;
|
return SUPPORTED_PROTOCOLS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getModuleName()
|
||||||
|
{
|
||||||
|
return MODULE_NAME;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,8 @@ public class StompProtocolManagerFactory extends AbstractProtocolManagerFactory<
|
||||||
{
|
{
|
||||||
public static final String STOMP_PROTOCOL_NAME = "STOMP";
|
public static final String STOMP_PROTOCOL_NAME = "STOMP";
|
||||||
|
|
||||||
|
private static final String MODULE_NAME = "artemis-stomp-protocol";
|
||||||
|
|
||||||
private static String[] SUPPORTED_PROTOCOLS = {STOMP_PROTOCOL_NAME};
|
private static String[] SUPPORTED_PROTOCOLS = {STOMP_PROTOCOL_NAME};
|
||||||
|
|
||||||
public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<StompFrameInterceptor> incomingInterceptors, List<StompFrameInterceptor> outgoingInterceptors)
|
public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<StompFrameInterceptor> incomingInterceptors, List<StompFrameInterceptor> outgoingInterceptors)
|
||||||
|
@ -46,4 +48,10 @@ public class StompProtocolManagerFactory extends AbstractProtocolManagerFactory<
|
||||||
return SUPPORTED_PROTOCOLS;
|
return SUPPORTED_PROTOCOLS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getModuleName()
|
||||||
|
{
|
||||||
|
return MODULE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ public class CoreProtocolManagerFactory extends AbstractProtocolManagerFactory<I
|
||||||
{
|
{
|
||||||
private static String[] SUPPORTED_PROTOCOLS = {ActiveMQClient.DEFAULT_CORE_PROTOCOL};
|
private static String[] SUPPORTED_PROTOCOLS = {ActiveMQClient.DEFAULT_CORE_PROTOCOL};
|
||||||
|
|
||||||
|
private static final String MODULE_NAME = "artemis-server";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc} *
|
* {@inheritDoc} *
|
||||||
* @param server
|
* @param server
|
||||||
|
@ -55,4 +57,11 @@ public class CoreProtocolManagerFactory extends AbstractProtocolManagerFactory<I
|
||||||
{
|
{
|
||||||
return SUPPORTED_PROTOCOLS;
|
return SUPPORTED_PROTOCOLS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getModuleName()
|
||||||
|
{
|
||||||
|
return MODULE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
|
||||||
//i know there is only 1
|
//i know there is only 1
|
||||||
this.flushExecutor = flushExecutor;
|
this.flushExecutor = flushExecutor;
|
||||||
|
|
||||||
ActiveMQServerLogger.LOGGER.addingProtocolSupport(coreProtocolManagerFactory.getProtocols()[0]);
|
ActiveMQServerLogger.LOGGER.addingProtocolSupport(coreProtocolManagerFactory.getProtocols()[0], coreProtocolManagerFactory.getModuleName());
|
||||||
this.protocolMap.put(coreProtocolManagerFactory.getProtocols()[0],
|
this.protocolMap.put(coreProtocolManagerFactory.getProtocols()[0],
|
||||||
coreProtocolManagerFactory.createProtocolManager(server, coreProtocolManagerFactory.filterInterceptors(incomingInterceptors),
|
coreProtocolManagerFactory.createProtocolManager(server, coreProtocolManagerFactory.filterInterceptors(incomingInterceptors),
|
||||||
coreProtocolManagerFactory.filterInterceptors(outgoingInterceptors)));
|
coreProtocolManagerFactory.filterInterceptors(outgoingInterceptors)));
|
||||||
|
@ -161,9 +161,9 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
|
||||||
String[] protocols = next.getProtocols();
|
String[] protocols = next.getProtocols();
|
||||||
for (String protocol : protocols)
|
for (String protocol : protocols)
|
||||||
{
|
{
|
||||||
ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol);
|
ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol, next.getModuleName());
|
||||||
protocolMap.put(protocol, next.createProtocolManager(server, next.filterInterceptors(incomingInterceptors),
|
protocolMap.put(protocol, next.createProtocolManager(server, next.filterInterceptors(incomingInterceptors),
|
||||||
next.filterInterceptors(outgoingInterceptors)));
|
next.filterInterceptors(outgoingInterceptors)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
|
||||||
String[] protocols = protocolManagerFactory.getProtocols();
|
String[] protocols = protocolManagerFactory.getProtocols();
|
||||||
for (String protocol : protocols)
|
for (String protocol : protocols)
|
||||||
{
|
{
|
||||||
ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol);
|
ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol, protocolManagerFactory.getModuleName());
|
||||||
protocolMap.put(protocol, protocolManagerFactory.createProtocolManager(server, incomingInterceptors, outgoingInterceptors));
|
protocolMap.put(protocol, protocolManagerFactory.createProtocolManager(server, incomingInterceptors, outgoingInterceptors));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,8 +265,8 @@ public interface ActiveMQServerLogger extends BasicLogger
|
||||||
void timedOutWaitingCompletions(String bridgeName, long numberOfMessages);
|
void timedOutWaitingCompletions(String bridgeName, long numberOfMessages);
|
||||||
|
|
||||||
@LogMessage(level = Logger.Level.INFO)
|
@LogMessage(level = Logger.Level.INFO)
|
||||||
@Message(id = 221043, value = "Adding protocol support {0}", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 221043, value = "Protocol module found: [{1}]. Adding protocol support for: {0}", format = Message.Format.MESSAGE_FORMAT)
|
||||||
void addingProtocolSupport(String protocolKey);
|
void addingProtocolSupport(String protocolKey, String moduleName);
|
||||||
|
|
||||||
@LogMessage(level = Logger.Level.INFO)
|
@LogMessage(level = Logger.Level.INFO)
|
||||||
@Message(id = 221045, value = "libaio is not available, switching the configuration into NIO", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 221045, value = "libaio is not available, switching the configuration into NIO", format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
|
|
@ -42,4 +42,6 @@ public interface ProtocolManagerFactory<P extends BaseInterceptor>
|
||||||
List<P> filterInterceptors(List<BaseInterceptor> interceptors);
|
List<P> filterInterceptors(List<BaseInterceptor> interceptors);
|
||||||
|
|
||||||
String[] getProtocols();
|
String[] getProtocols();
|
||||||
|
|
||||||
|
String getModuleName();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue