mirror of https://github.com/apache/activemq.git
added additional properties for network control etc
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@454532 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7a6b944e6b
commit
5c4bd063d7
|
@ -33,6 +33,8 @@ public class BrokerInfo extends BaseCommand{
|
||||||
boolean slaveBroker;
|
boolean slaveBroker;
|
||||||
boolean masterBroker;
|
boolean masterBroker;
|
||||||
boolean faultTolerantConfiguration;
|
boolean faultTolerantConfiguration;
|
||||||
|
boolean networkConnection;
|
||||||
|
boolean duplexConnection;
|
||||||
BrokerInfo peerBrokerInfos[];
|
BrokerInfo peerBrokerInfos[];
|
||||||
String brokerName;
|
String brokerName;
|
||||||
|
|
||||||
|
@ -133,4 +135,38 @@ public class BrokerInfo extends BaseCommand{
|
||||||
public void setFaultTolerantConfiguration(boolean faultTolerantConfiguration){
|
public void setFaultTolerantConfiguration(boolean faultTolerantConfiguration){
|
||||||
this.faultTolerantConfiguration=faultTolerantConfiguration;
|
this.faultTolerantConfiguration=faultTolerantConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @openwire:property version=2
|
||||||
|
* @return the duplexConnection
|
||||||
|
*/
|
||||||
|
public boolean isDuplexConnection(){
|
||||||
|
return this.duplexConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param duplexConnection the duplexConnection to set
|
||||||
|
*/
|
||||||
|
public void setDuplexConnection(boolean duplexConnection){
|
||||||
|
this.duplexConnection=duplexConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @openwire:property version=2
|
||||||
|
* @return the networkConnection
|
||||||
|
*/
|
||||||
|
public boolean isNetworkConnection(){
|
||||||
|
return this.networkConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param networkConnection the networkConnection to set
|
||||||
|
*/
|
||||||
|
public void setNetworkConnection(boolean networkConnection){
|
||||||
|
this.networkConnection=networkConnection;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class ConnectionInfo extends BaseCommand {
|
||||||
protected BrokerId[] brokerPath;
|
protected BrokerId[] brokerPath;
|
||||||
protected boolean brokerMasterConnector;
|
protected boolean brokerMasterConnector;
|
||||||
protected boolean manageable;
|
protected boolean manageable;
|
||||||
|
protected boolean clientMaster;
|
||||||
protected transient Object transportContext;
|
protected transient Object transportContext;
|
||||||
|
|
||||||
public ConnectionInfo() {
|
public ConnectionInfo() {
|
||||||
|
@ -165,5 +166,20 @@ public class ConnectionInfo extends BaseCommand {
|
||||||
public void setTransportContext(Object transportContext) {
|
public void setTransportContext(Object transportContext) {
|
||||||
this.transportContext = transportContext;
|
this.transportContext = transportContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @openwire:property version=2
|
||||||
|
* @return the clientMaster
|
||||||
|
*/
|
||||||
|
public boolean isClientMaster(){
|
||||||
|
return this.clientMaster;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param clientMaster the clientMaster to set
|
||||||
|
*/
|
||||||
|
public void setClientMaster(boolean clientMaster){
|
||||||
|
this.clientMaster=clientMaster;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,9 @@ public class ConsumerControl extends BaseCommand {
|
||||||
|
|
||||||
protected ConsumerId consumerId;
|
protected ConsumerId consumerId;
|
||||||
protected boolean close;
|
protected boolean close;
|
||||||
|
protected boolean stop;
|
||||||
|
protected boolean start;
|
||||||
|
protected boolean flush;
|
||||||
protected int prefetch;
|
protected int prefetch;
|
||||||
public byte getDataStructureType() {
|
public byte getDataStructureType() {
|
||||||
return DATA_STRUCTURE_TYPE;
|
return DATA_STRUCTURE_TYPE;
|
||||||
|
@ -113,4 +116,79 @@ public class ConsumerControl extends BaseCommand {
|
||||||
public void setPrefetch(int prefetch){
|
public void setPrefetch(int prefetch){
|
||||||
this.prefetch=prefetch;
|
this.prefetch=prefetch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @openwire:property version=2
|
||||||
|
* @return the flush
|
||||||
|
*/
|
||||||
|
public boolean isFlush(){
|
||||||
|
return this.flush;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param flush the flush to set
|
||||||
|
*/
|
||||||
|
public void setFlush(boolean flush){
|
||||||
|
this.flush=flush;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @openwire:property version=2
|
||||||
|
* @return the start
|
||||||
|
*/
|
||||||
|
public boolean isStart(){
|
||||||
|
return this.start;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param start the start to set
|
||||||
|
*/
|
||||||
|
public void setStart(boolean start){
|
||||||
|
this.start=start;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @openwire:property version=2
|
||||||
|
* @return the stop
|
||||||
|
*/
|
||||||
|
public boolean isStop(){
|
||||||
|
return this.stop;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param stop the stop to set
|
||||||
|
*/
|
||||||
|
public void setStop(boolean stop){
|
||||||
|
this.stop=stop;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,8 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
info.setSlaveBroker(bs.readBoolean());
|
info.setSlaveBroker(bs.readBoolean());
|
||||||
info.setMasterBroker(bs.readBoolean());
|
info.setMasterBroker(bs.readBoolean());
|
||||||
info.setFaultTolerantConfiguration(bs.readBoolean());
|
info.setFaultTolerantConfiguration(bs.readBoolean());
|
||||||
|
info.setDuplexConnection(bs.readBoolean());
|
||||||
|
info.setNetworkConnection(bs.readBoolean());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +105,8 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
bs.writeBoolean(info.isSlaveBroker());
|
bs.writeBoolean(info.isSlaveBroker());
|
||||||
bs.writeBoolean(info.isMasterBroker());
|
bs.writeBoolean(info.isMasterBroker());
|
||||||
bs.writeBoolean(info.isFaultTolerantConfiguration());
|
bs.writeBoolean(info.isFaultTolerantConfiguration());
|
||||||
|
bs.writeBoolean(info.isDuplexConnection());
|
||||||
|
bs.writeBoolean(info.isNetworkConnection());
|
||||||
|
|
||||||
return rc + 0;
|
return rc + 0;
|
||||||
}
|
}
|
||||||
|
@ -125,6 +129,8 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
|
bs.readBoolean();
|
||||||
|
bs.readBoolean();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +163,8 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
info.setSlaveBroker(dataIn.readBoolean());
|
info.setSlaveBroker(dataIn.readBoolean());
|
||||||
info.setMasterBroker(dataIn.readBoolean());
|
info.setMasterBroker(dataIn.readBoolean());
|
||||||
info.setFaultTolerantConfiguration(dataIn.readBoolean());
|
info.setFaultTolerantConfiguration(dataIn.readBoolean());
|
||||||
|
info.setDuplexConnection(dataIn.readBoolean());
|
||||||
|
info.setNetworkConnection(dataIn.readBoolean());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,6 +184,8 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
dataOut.writeBoolean(info.isSlaveBroker());
|
dataOut.writeBoolean(info.isSlaveBroker());
|
||||||
dataOut.writeBoolean(info.isMasterBroker());
|
dataOut.writeBoolean(info.isMasterBroker());
|
||||||
dataOut.writeBoolean(info.isFaultTolerantConfiguration());
|
dataOut.writeBoolean(info.isFaultTolerantConfiguration());
|
||||||
|
dataOut.writeBoolean(info.isDuplexConnection());
|
||||||
|
dataOut.writeBoolean(info.isNetworkConnection());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
|
||||||
}
|
}
|
||||||
info.setBrokerMasterConnector(bs.readBoolean());
|
info.setBrokerMasterConnector(bs.readBoolean());
|
||||||
info.setManageable(bs.readBoolean());
|
info.setManageable(bs.readBoolean());
|
||||||
|
info.setClientMaster(bs.readBoolean());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +104,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
|
||||||
rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
|
rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
|
||||||
bs.writeBoolean(info.isBrokerMasterConnector());
|
bs.writeBoolean(info.isBrokerMasterConnector());
|
||||||
bs.writeBoolean(info.isManageable());
|
bs.writeBoolean(info.isManageable());
|
||||||
|
bs.writeBoolean(info.isClientMaster());
|
||||||
|
|
||||||
return rc + 0;
|
return rc + 0;
|
||||||
}
|
}
|
||||||
|
@ -125,6 +127,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
|
||||||
tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
|
tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
|
bs.readBoolean();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +160,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
|
||||||
}
|
}
|
||||||
info.setBrokerMasterConnector(dataIn.readBoolean());
|
info.setBrokerMasterConnector(dataIn.readBoolean());
|
||||||
info.setManageable(dataIn.readBoolean());
|
info.setManageable(dataIn.readBoolean());
|
||||||
|
info.setClientMaster(dataIn.readBoolean());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,6 +180,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
|
||||||
looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
|
looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
|
||||||
dataOut.writeBoolean(info.isBrokerMasterConnector());
|
dataOut.writeBoolean(info.isBrokerMasterConnector());
|
||||||
dataOut.writeBoolean(info.isManageable());
|
dataOut.writeBoolean(info.isManageable());
|
||||||
|
dataOut.writeBoolean(info.isClientMaster());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,9 @@ public class ConsumerControlMarshaller extends BaseCommandMarshaller {
|
||||||
info.setClose(bs.readBoolean());
|
info.setClose(bs.readBoolean());
|
||||||
info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
|
info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
|
||||||
info.setPrefetch(dataIn.readInt());
|
info.setPrefetch(dataIn.readInt());
|
||||||
|
info.setFlush(bs.readBoolean());
|
||||||
|
info.setStart(bs.readBoolean());
|
||||||
|
info.setStop(bs.readBoolean());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,6 +86,9 @@ public class ConsumerControlMarshaller extends BaseCommandMarshaller {
|
||||||
int rc = super.tightMarshal1(wireFormat, o, bs);
|
int rc = super.tightMarshal1(wireFormat, o, bs);
|
||||||
bs.writeBoolean(info.isClose());
|
bs.writeBoolean(info.isClose());
|
||||||
rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
|
rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
|
||||||
|
bs.writeBoolean(info.isFlush());
|
||||||
|
bs.writeBoolean(info.isStart());
|
||||||
|
bs.writeBoolean(info.isStop());
|
||||||
|
|
||||||
return rc + 4;
|
return rc + 4;
|
||||||
}
|
}
|
||||||
|
@ -101,6 +107,9 @@ public class ConsumerControlMarshaller extends BaseCommandMarshaller {
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
|
tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
|
||||||
dataOut.writeInt(info.getPrefetch());
|
dataOut.writeInt(info.getPrefetch());
|
||||||
|
bs.readBoolean();
|
||||||
|
bs.readBoolean();
|
||||||
|
bs.readBoolean();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,6 +127,9 @@ public class ConsumerControlMarshaller extends BaseCommandMarshaller {
|
||||||
info.setClose(dataIn.readBoolean());
|
info.setClose(dataIn.readBoolean());
|
||||||
info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
|
info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
|
||||||
info.setPrefetch(dataIn.readInt());
|
info.setPrefetch(dataIn.readInt());
|
||||||
|
info.setFlush(dataIn.readBoolean());
|
||||||
|
info.setStart(dataIn.readBoolean());
|
||||||
|
info.setStop(dataIn.readBoolean());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,6 +145,9 @@ public class ConsumerControlMarshaller extends BaseCommandMarshaller {
|
||||||
dataOut.writeBoolean(info.isClose());
|
dataOut.writeBoolean(info.isClose());
|
||||||
looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
|
looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
|
||||||
dataOut.writeInt(info.getPrefetch());
|
dataOut.writeInt(info.getPrefetch());
|
||||||
|
dataOut.writeBoolean(info.isFlush());
|
||||||
|
dataOut.writeBoolean(info.isStart());
|
||||||
|
dataOut.writeBoolean(info.isStop());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,5 +64,7 @@ public class BrokerInfoTest extends BaseCommandTestSupport {
|
||||||
info.setSlaveBroker(true);
|
info.setSlaveBroker(true);
|
||||||
info.setMasterBroker(false);
|
info.setMasterBroker(false);
|
||||||
info.setFaultTolerantConfiguration(true);
|
info.setFaultTolerantConfiguration(true);
|
||||||
|
info.setDuplexConnection(false);
|
||||||
|
info.setNetworkConnection(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,5 +64,6 @@ public class ConnectionInfoTest extends BaseCommandTestSupport {
|
||||||
}
|
}
|
||||||
info.setBrokerMasterConnector(true);
|
info.setBrokerMasterConnector(true);
|
||||||
info.setManageable(false);
|
info.setManageable(false);
|
||||||
|
info.setClientMaster(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,5 +54,8 @@ public class ConsumerControlTest extends BaseCommandTestSupport {
|
||||||
info.setClose(true);
|
info.setClose(true);
|
||||||
info.setConsumerId(createConsumerId("ConsumerId:1"));
|
info.setConsumerId(createConsumerId("ConsumerId:1"));
|
||||||
info.setPrefetch(1);
|
info.setPrefetch(1);
|
||||||
|
info.setFlush(false);
|
||||||
|
info.setStart(true);
|
||||||
|
info.setStop(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue