ARTEMIS-1697 give ActivateCallback default methods
This commit is contained in:
parent
43f4a758d6
commit
1e57a8e70a
|
@ -168,11 +168,6 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
|
||||||
|
|
||||||
// ActivateCallback implementation -------------------------------------
|
// ActivateCallback implementation -------------------------------------
|
||||||
|
|
||||||
@Override
|
|
||||||
public void preActivate() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void activated() {
|
public synchronized void activated() {
|
||||||
if (!startCalled) {
|
if (!startCalled) {
|
||||||
|
|
|
@ -21,21 +21,25 @@ public interface ActivateCallback {
|
||||||
/*
|
/*
|
||||||
* this is called before any services are started when the server first initialised
|
* this is called before any services are started when the server first initialised
|
||||||
*/
|
*/
|
||||||
void preActivate();
|
default void preActivate() {
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this is called after most of the services have been started but before any cluster resources or JMS resources have been
|
* this is called after most of the services have been started but before any cluster resources or JMS resources have been
|
||||||
*/
|
*/
|
||||||
void activated();
|
default void activated() {
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this is called when the server is stopping, after any network resources and clients are closed but before the rest
|
* this is called when the server is stopping, after any network resources and clients are closed but before the rest
|
||||||
* of the resources
|
* of the resources
|
||||||
*/
|
*/
|
||||||
void deActivate();
|
default void deActivate() {
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this is called when all resources have been started including any JMS resources
|
* this is called when all resources have been started including any JMS resources
|
||||||
*/
|
*/
|
||||||
void activationComplete();
|
default void activationComplete() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,18 +170,6 @@ public class FileLockNodeManager extends NodeManager {
|
||||||
ActiveMQServerLogger.LOGGER.obtainedLiveLock();
|
ActiveMQServerLogger.LOGGER.obtainedLiveLock();
|
||||||
|
|
||||||
return new ActivateCallback() {
|
return new ActivateCallback() {
|
||||||
@Override
|
|
||||||
public void preActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void activated() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activationComplete() {
|
public void activationComplete() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -108,18 +108,6 @@ public final class InVMNodeManager extends NodeManager {
|
||||||
state = FAILING_BACK;
|
state = FAILING_BACK;
|
||||||
liveLock.acquire();
|
liveLock.acquire();
|
||||||
return new ActivateCallback() {
|
return new ActivateCallback() {
|
||||||
@Override
|
|
||||||
public void preActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void activated() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activationComplete() {
|
public void activationComplete() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -350,18 +350,6 @@ public final class JdbcNodeManager extends NodeManager {
|
||||||
ActiveMQServerLogger.LOGGER.obtainedLiveLock();
|
ActiveMQServerLogger.LOGGER.obtainedLiveLock();
|
||||||
|
|
||||||
return new ActivateCallback() {
|
return new ActivateCallback() {
|
||||||
@Override
|
|
||||||
public void preActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void activated() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activationComplete() {
|
public void activationComplete() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -547,10 +547,6 @@ public class ManagementServiceImpl implements ManagementService {
|
||||||
* bridges won't be able to connect.
|
* bridges won't be able to connect.
|
||||||
*/
|
*/
|
||||||
messagingServer.registerActivateCallback(new ActivateCallback() {
|
messagingServer.registerActivateCallback(new ActivateCallback() {
|
||||||
@Override
|
|
||||||
public void preActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activated() {
|
public void activated() {
|
||||||
try {
|
try {
|
||||||
|
@ -559,14 +555,6 @@ public class ManagementServiceImpl implements ManagementService {
|
||||||
ActiveMQServerLogger.LOGGER.unableToCreateManagementNotificationAddress(managementNotificationAddress, e);
|
ActiveMQServerLogger.LOGGER.unableToCreateManagementNotificationAddress(managementNotificationAddress, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void activationComplete() {
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -195,21 +195,6 @@ public class DiscoveryBaseTest extends ActiveMQTestBase {
|
||||||
@Override
|
@Override
|
||||||
public ActivateCallback startLiveNode() throws Exception {
|
public ActivateCallback startLiveNode() throws Exception {
|
||||||
return new ActivateCallback() {
|
return new ActivateCallback() {
|
||||||
@Override
|
|
||||||
public void preActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void activated() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deActivate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void activationComplete() {
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue