org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activemq-osgi Show documentation
Show all versions of activemq-osgi Show documentation
Puts together an ActiveMQ OSGi bundle
//
// Generated by protoc, do not edit by hand.
//
package org.apache.activemq.store.kahadb.data;
public final class KahaRemoveDestinationCommand extends KahaRemoveDestinationCommandBase implements org.apache.activemq.store.kahadb.JournalCommand {
public java.util.ArrayList missingFields() {
java.util.ArrayList missingFields = super.missingFields();
if( !hasDestination() ) {
missingFields.add("destination");
}
if( hasDestination() ) {
try {
getDestination().assertInitialized();
} catch (org.apache.activemq.protobuf.UninitializedMessageException e){
missingFields.addAll(prefix(e.getMissingFields(),"destination."));
}
}
return missingFields;
}
public void clear() {
super.clear();
clearDestination();
}
public KahaRemoveDestinationCommand clone() {
return new KahaRemoveDestinationCommand().mergeFrom(this);
}
public KahaRemoveDestinationCommand mergeFrom(KahaRemoveDestinationCommand other) {
if (other.hasDestination()) {
if (hasDestination()) {
getDestination().mergeFrom(other.getDestination());
} else {
setDestination(other.getDestination().clone());
}
}
return this;
}
public int serializedSizeUnframed() {
if (memoizedSerializedSize != -1)
return memoizedSerializedSize;
int size = 0;
if (hasDestination()) {
size += computeMessageSize(1, getDestination());
}
memoizedSerializedSize = size;
return size;
}
public KahaRemoveDestinationCommand mergeUnframed(org.apache.activemq.protobuf.CodedInputStream input) throws java.io.IOException {
while (true) {
int tag = input.readTag();
if ((tag & 0x07) == 4) {
return this;
}
switch (tag) {
case 0:
return this;
default: {
break;
}
case 10:
if (hasDestination()) {
getDestination().mergeFramed(input);
} else {
setDestination(new KahaDestination().mergeFramed(input));
}
break;
}
}
}
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException {
if (hasDestination()) {
writeMessage(output, 1, getDestination());
}
}
public static KahaRemoveDestinationCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaRemoveDestinationCommand().mergeUnframed(data).checktInitialized();
}
public static KahaRemoveDestinationCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaRemoveDestinationCommand().mergeUnframed(data).checktInitialized();
}
public static KahaRemoveDestinationCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaRemoveDestinationCommand().mergeUnframed(data).checktInitialized();
}
public static KahaRemoveDestinationCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaRemoveDestinationCommand().mergeUnframed(data).checktInitialized();
}
public static KahaRemoveDestinationCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaRemoveDestinationCommand().mergeFramed(data).checktInitialized();
}
public static KahaRemoveDestinationCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaRemoveDestinationCommand().mergeFramed(data).checktInitialized();
}
public static KahaRemoveDestinationCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaRemoveDestinationCommand().mergeFramed(data).checktInitialized();
}
public static KahaRemoveDestinationCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaRemoveDestinationCommand().mergeFramed(data).checktInitialized();
}
public String toString() {
return toString(new java.lang.StringBuilder(), "").toString();
}
public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) {
if( hasDestination() ) {
sb.append(prefix+"destination {\n");
getDestination().toString(sb, prefix+" ");
sb.append(prefix+"}\n");
}
return sb;
}
public void visit(org.apache.activemq.store.kahadb.Visitor visitor) throws java.io.IOException {
visitor.visit(this);
}
public KahaEntryType type() {
return KahaEntryType.KAHA_REMOVE_DESTINATION_COMMAND;
}
public boolean equals(Object obj) {
if( obj==this )
return true;
if( obj==null || obj.getClass()!=KahaRemoveDestinationCommand.class )
return false;
return equals((KahaRemoveDestinationCommand)obj);
}
public boolean equals(KahaRemoveDestinationCommand obj) {
if (hasDestination() ^ obj.hasDestination() )
return false;
if (hasDestination() && ( !getDestination().equals(obj.getDestination()) ))
return false;
return true;
}
public int hashCode() {
int rc=302570256;
if (hasDestination()) {
rc ^= ( 238021614^getDestination().hashCode() );
}
return rc;
}
}
abstract class KahaRemoveDestinationCommandBase extends org.apache.activemq.protobuf.BaseMessage {
// required KahaDestination destination = 1;
private KahaDestination f_destination = null;
public boolean hasDestination() {
return this.f_destination!=null;
}
public KahaDestination getDestination() {
if( this.f_destination == null ) {
this.f_destination = new KahaDestination();
}
return this.f_destination;
}
public T setDestination(KahaDestination destination) {
loadAndClear();
this.f_destination = destination;
return (T)this;
}
public void clearDestination() {
loadAndClear();
this.f_destination = null;
}
}