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:
Robert Davies 2006-10-09 22:09:54 +00:00
parent 7a6b944e6b
commit 5c4bd063d7
9 changed files with 166 additions and 0 deletions

View File

@ -33,6 +33,8 @@ public class BrokerInfo extends BaseCommand{
boolean slaveBroker;
boolean masterBroker;
boolean faultTolerantConfiguration;
boolean networkConnection;
boolean duplexConnection;
BrokerInfo peerBrokerInfos[];
String brokerName;
@ -133,4 +135,38 @@ public class BrokerInfo extends BaseCommand{
public void setFaultTolerantConfiguration(boolean 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;
}
}

View File

@ -36,6 +36,7 @@ public class ConnectionInfo extends BaseCommand {
protected BrokerId[] brokerPath;
protected boolean brokerMasterConnector;
protected boolean manageable;
protected boolean clientMaster;
protected transient Object transportContext;
public ConnectionInfo() {
@ -166,4 +167,19 @@ public class ConnectionInfo extends BaseCommand {
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;
}
}

View File

@ -32,6 +32,9 @@ public class ConsumerControl extends BaseCommand {
protected ConsumerId consumerId;
protected boolean close;
protected boolean stop;
protected boolean start;
protected boolean flush;
protected int prefetch;
public byte getDataStructureType() {
return DATA_STRUCTURE_TYPE;
@ -113,4 +116,79 @@ public class ConsumerControl extends BaseCommand {
public void setPrefetch(int 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;
}
}

View File

@ -84,6 +84,8 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
info.setSlaveBroker(bs.readBoolean());
info.setMasterBroker(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.isMasterBroker());
bs.writeBoolean(info.isFaultTolerantConfiguration());
bs.writeBoolean(info.isDuplexConnection());
bs.writeBoolean(info.isNetworkConnection());
return rc + 0;
}
@ -125,6 +129,8 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
}
@ -157,6 +163,8 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
info.setSlaveBroker(dataIn.readBoolean());
info.setMasterBroker(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.isMasterBroker());
dataOut.writeBoolean(info.isFaultTolerantConfiguration());
dataOut.writeBoolean(info.isDuplexConnection());
dataOut.writeBoolean(info.isNetworkConnection());
}
}

View File

@ -84,6 +84,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
}
info.setBrokerMasterConnector(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);
bs.writeBoolean(info.isBrokerMasterConnector());
bs.writeBoolean(info.isManageable());
bs.writeBoolean(info.isClientMaster());
return rc + 0;
}
@ -125,6 +127,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
}
@ -157,6 +160,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
}
info.setBrokerMasterConnector(dataIn.readBoolean());
info.setManageable(dataIn.readBoolean());
info.setClientMaster(dataIn.readBoolean());
}
@ -176,6 +180,7 @@ public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
dataOut.writeBoolean(info.isBrokerMasterConnector());
dataOut.writeBoolean(info.isManageable());
dataOut.writeBoolean(info.isClientMaster());
}
}

View File

@ -69,6 +69,9 @@ public class ConsumerControlMarshaller extends BaseCommandMarshaller {
info.setClose(bs.readBoolean());
info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
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);
bs.writeBoolean(info.isClose());
rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
bs.writeBoolean(info.isFlush());
bs.writeBoolean(info.isStart());
bs.writeBoolean(info.isStop());
return rc + 4;
}
@ -101,6 +107,9 @@ public class ConsumerControlMarshaller extends BaseCommandMarshaller {
bs.readBoolean();
tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
dataOut.writeInt(info.getPrefetch());
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
}
@ -118,6 +127,9 @@ public class ConsumerControlMarshaller extends BaseCommandMarshaller {
info.setClose(dataIn.readBoolean());
info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
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());
looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
dataOut.writeInt(info.getPrefetch());
dataOut.writeBoolean(info.isFlush());
dataOut.writeBoolean(info.isStart());
dataOut.writeBoolean(info.isStop());
}
}

View File

@ -64,5 +64,7 @@ public class BrokerInfoTest extends BaseCommandTestSupport {
info.setSlaveBroker(true);
info.setMasterBroker(false);
info.setFaultTolerantConfiguration(true);
info.setDuplexConnection(false);
info.setNetworkConnection(true);
}
}

View File

@ -64,5 +64,6 @@ public class ConnectionInfoTest extends BaseCommandTestSupport {
}
info.setBrokerMasterConnector(true);
info.setManageable(false);
info.setClientMaster(true);
}
}

View File

@ -54,5 +54,8 @@ public class ConsumerControlTest extends BaseCommandTestSupport {
info.setClose(true);
info.setConsumerId(createConsumerId("ConsumerId:1"));
info.setPrefetch(1);
info.setFlush(false);
info.setStart(true);
info.setStop(false);
}
}