Refine search
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeBoolean(info.isClose()); looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); dataOut.writeInt(info.getPrefetch()); } }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; int rc = super.tightMarshal1(wireFormat, o, bs); bs.writeBoolean(info.isClose()); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); return rc + 4; }
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); 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()); } }
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); 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()); } }
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); 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()); } }
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); 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()); } }
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); 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()); } }
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); 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()); } }
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); 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()); } }
/** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); 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()); } }
protected void onConsumerControl(ConsumerControl command) { if (command.isClose()) { for (ActiveMQSession session : this.sessions) { session.close(command.getConsumerId()); } } else { for (ActiveMQSession session : this.sessions) { session.setPrefetchSize(command.getConsumerId(), command.getPrefetch()); } for (ActiveMQConnectionConsumer connectionConsumer: connectionConsumers) { ConsumerInfo consumerInfo = connectionConsumer.getConsumerInfo(); if (consumerInfo.getConsumerId().equals(command.getConsumerId())) { consumerInfo.setPrefetchSize(command.getPrefetch()); } } } }
private void processCommand(Object incoming) { Command command = (Command) incoming; if (command == null) { return; } if (command.isResponse()) { Object object = null; synchronized (requestMap) { object = requestMap.remove(Integer.valueOf(((Response) command).getCorrelationId())); } if (object != null && object.getClass() == Tracked.class) { ((Tracked) object).onResponses(command); } } if (command.isConnectionControl()) { handleConnectionControl((ConnectionControl) command); } else if (command.isConsumerControl()) { ConsumerControl consumerControl = (ConsumerControl)command; if (consumerControl.isClose()) { stateTracker.processRemoveConsumer(consumerControl.getConsumerId(), RemoveInfo.LAST_DELIVERED_UNKNOWN); } } if (transportListener != null) { transportListener.onCommand(command); } }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; 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; }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; 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; }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; 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; }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; 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; }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), 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; }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), 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; }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), 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; }
/** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), 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; }