Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARTEMIS-2749 - Broadcast Group Control Improvements
added some default behaviour for when overridden https://issues.apache.org/jira/browse/ARTEMIS-2749
- Loading branch information
1 parent
5d19ae9
commit 5737f96
Showing
4 changed files
with
118 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
.../apache/activemq/artemis/core/management/impl/JGroupsPropertiesBroadcastGroupControl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.activemq.artemis.core.management.impl; | ||
|
||
import org.apache.activemq.artemis.api.core.management.Attribute; | ||
import org.apache.activemq.artemis.api.core.management.JGroupsChannelBroadcastGroupControl; | ||
|
||
public interface JGroupsPropertiesBroadcastGroupControl extends JGroupsChannelBroadcastGroupControl { | ||
|
||
/** | ||
* Returns the JGroups properties | ||
*/ | ||
@Attribute(desc = "Returns the JGroups properties") | ||
String getProperties(); | ||
} |
71 changes: 71 additions & 0 deletions
71
...che/activemq/artemis/core/management/impl/JGroupsPropertiesBroadcastGroupControlImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.activemq.artemis.core.management.impl; | ||
|
||
import org.apache.activemq.artemis.api.core.BroadcastGroupConfiguration; | ||
import org.apache.activemq.artemis.api.core.JGroupsPropertiesBroadcastEndpointFactory; | ||
import org.apache.activemq.artemis.api.core.management.JGroupsChannelBroadcastGroupControl; | ||
import org.apache.activemq.artemis.core.persistence.StorageManager; | ||
import org.apache.activemq.artemis.core.server.cluster.BroadcastGroup; | ||
import org.apache.activemq.artemis.logs.AuditLogger; | ||
|
||
public class JGroupsPropertiesBroadcastGroupControlImpl extends BaseBroadcastGroupControlImpl implements JGroupsPropertiesBroadcastGroupControl { | ||
|
||
// Constants ----------------------------------------------------- | ||
|
||
// Attributes ---------------------------------------------------- | ||
|
||
private JGroupsPropertiesBroadcastEndpointFactory endpointFactory; | ||
|
||
// Static -------------------------------------------------------- | ||
|
||
// Constructors -------------------------------------------------- | ||
|
||
public JGroupsPropertiesBroadcastGroupControlImpl(final BroadcastGroup broadcastGroup, | ||
final StorageManager storageManager, | ||
final BroadcastGroupConfiguration configuration, | ||
final JGroupsPropertiesBroadcastEndpointFactory endpointFactory) throws Exception { | ||
super(JGroupsChannelBroadcastGroupControl.class, broadcastGroup, storageManager, configuration); | ||
this.endpointFactory = endpointFactory; | ||
} | ||
|
||
// BroadcastGroupControlMBean implementation --------------------- | ||
|
||
@Override | ||
public String getChannelName() throws Exception { | ||
if (AuditLogger.isEnabled()) { | ||
AuditLogger.getChannelName(this.endpointFactory.getChannelName()); | ||
} | ||
return endpointFactory.getChannelName(); | ||
} | ||
|
||
@Override | ||
public String getProperties() { | ||
return endpointFactory.getProperties(); | ||
} | ||
|
||
// Public -------------------------------------------------------- | ||
|
||
// Package protected --------------------------------------------- | ||
|
||
// Protected ----------------------------------------------------- | ||
|
||
// Private ------------------------------------------------------- | ||
|
||
// Inner classes ------------------------------------------------- | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters