http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transaction/TransactionalState.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transaction/TransactionalState.java b/proton-j/codec/src/org/apache/qpid/proton/type/transaction/TransactionalState.java deleted file mode 100644 index 3dd4a95..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transaction/TransactionalState.java +++ /dev/null @@ -1,166 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transaction; -import java.util.List; -import java.util.AbstractList; - - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.*; -import org.apache.qpid.proton.type.messaging.Outcome; - -public class TransactionalState - implements DescribedType , org.apache.qpid.proton.type.transport.DeliveryState -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000034L), Symbol.valueOf("amqp:transactional-state:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000034L); - private final TransactionalStateWrapper _wrapper = new TransactionalStateWrapper(); - - private Binary _txnId; - private Outcome _outcome; - - public Binary getTxnId() - { - return _txnId; - } - - public void setTxnId(Binary txnId) - { - if( txnId == null ) - { - throw new NullPointerException("the txn-id field is mandatory"); - } - - _txnId = txnId; - } - - public Outcome getOutcome() - { - return _outcome; - } - - public void setOutcome(Outcome outcome) - { - _outcome = outcome; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _txnId; - case 1: - return _outcome; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _outcome != null - ? 2 - : 1; - - } - - - public final class TransactionalStateWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return TransactionalState.this.get(index); - } - - @Override - public int size() - { - return TransactionalState.this.size(); - } - } - - private static class TransactionalStateConstructor implements DescribedTypeConstructor<TransactionalState> - { - public TransactionalState newInstance(Object described) - { - List l = (List) described; - - TransactionalState o = new TransactionalState(); - - if(l.size() <= 0) - { - throw new DecodeException("The txn-id field cannot be omitted"); - } - - switch(2 - l.size()) - { - - case 0: - o.setOutcome( (Outcome) l.get( 1 ) ); - case 1: - o.setTxnId( (Binary) l.get( 0 ) ); - } - - - return o; - } - - public Class<TransactionalState> getTypeClass() - { - return TransactionalState.class; - } - } - - - public static void register(Decoder decoder) - { - TransactionalStateConstructor constructor = new TransactionalStateConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } -} - \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transaction/TxnCapability.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transaction/TxnCapability.java b/proton-j/codec/src/org/apache/qpid/proton/type/transaction/TxnCapability.java deleted file mode 100644 index 8fcd65a..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transaction/TxnCapability.java +++ /dev/null @@ -1,40 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transaction; - -import org.apache.qpid.proton.type.*; - -public interface TxnCapability -{ - final static Symbol LOCAL_TXN = Symbol.valueOf("amqp:local-transactions"); - - final static Symbol DISTRIBUTED_TXN = Symbol.valueOf("amqp:distributed-transactions"); - - final static Symbol PROMOTABLE_TXN = Symbol.valueOf("amqp:promotable-transactions"); - - final static Symbol MULTI_TXNS_PER_SSN = Symbol.valueOf("amqp:multi-txns-per-ssn"); - - final static Symbol MULTI_SSNS_PER_TXN = Symbol.valueOf("amqp:multi-ssns-per-txn"); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/AmqpError.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/AmqpError.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/AmqpError.java deleted file mode 100644 index 889deee..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/AmqpError.java +++ /dev/null @@ -1,56 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.type.*; - -public interface AmqpError -{ - final static Symbol INTERNAL_ERROR = Symbol.valueOf("amqp:internal-error"); - - final static Symbol NOT_FOUND = Symbol.valueOf("amqp:not-found"); - - final static Symbol UNAUTHORIZED_ACCESS = Symbol.valueOf("amqp:unauthorized-access"); - - final static Symbol DECODE_ERROR = Symbol.valueOf("amqp:decode-error"); - - final static Symbol RESOURCE_LIMIT_EXCEEDED = Symbol.valueOf("amqp:resource-limit-exceeded"); - - final static Symbol NOT_ALLOWED = Symbol.valueOf("amqp:not-allowed"); - - final static Symbol INVALID_FIELD = Symbol.valueOf("amqp:invalid-field"); - - final static Symbol NOT_IMPLEMENTED = Symbol.valueOf("amqp:not-implemented"); - - final static Symbol RESOURCE_LOCKED = Symbol.valueOf("amqp:resource-locked"); - - final static Symbol PRECONDITION_FAILED = Symbol.valueOf("amqp:precondition-failed"); - - final static Symbol RESOURCE_DELETED = Symbol.valueOf("amqp:resource-deleted"); - - final static Symbol ILLEGAL_STATE = Symbol.valueOf("amqp:illegal-state"); - - final static Symbol FRAME_SIZE_TOO_SMALL = Symbol.valueOf("amqp:frame-size-too-small"); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Attach.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Attach.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Attach.java deleted file mode 100644 index 0b1fc9a..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Attach.java +++ /dev/null @@ -1,423 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.Binary; -import org.apache.qpid.proton.type.DescribedType; -import org.apache.qpid.proton.type.Symbol; -import org.apache.qpid.proton.type.UnsignedByte; -import org.apache.qpid.proton.type.UnsignedInteger; -import org.apache.qpid.proton.type.UnsignedLong; - -import java.util.AbstractList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - - -public class Attach - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000012L), Symbol.valueOf("amqp:attach:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000012L); - private final AttachWrapper _wrapper = new AttachWrapper(); - - private String _name; - private UnsignedInteger _handle; - private boolean _role; - private UnsignedByte _sndSettleMode = UnsignedByte.valueOf((byte) 2); - private UnsignedByte _rcvSettleMode = UnsignedByte.valueOf((byte) 0); - private Source _source; - private Target _target; - private Map _unsettled; - private boolean _incompleteUnsettled; - private UnsignedInteger _initialDeliveryCount; - private UnsignedLong _maxMessageSize; - private Symbol[] _offeredCapabilities; - private Symbol[] _desiredCapabilities; - private Map _properties; - - public String getName() - { - return _name; - } - - public void setName(String name) - { - if( name == null ) - { - throw new NullPointerException("the name field is mandatory"); - } - - _name = name; - } - - public UnsignedInteger getHandle() - { - return _handle; - } - - public void setHandle(UnsignedInteger handle) - { - if( handle == null ) - { - throw new NullPointerException("the handle field is mandatory"); - } - - _handle = handle; - } - - public boolean getRole() - { - return _role; - } - - public void setRole(boolean role) - { - _role = role; - } - - public UnsignedByte getSndSettleMode() - { - return _sndSettleMode; - } - - public void setSndSettleMode(UnsignedByte sndSettleMode) - { - _sndSettleMode = sndSettleMode; - } - - public UnsignedByte getRcvSettleMode() - { - return _rcvSettleMode; - } - - public void setRcvSettleMode(UnsignedByte rcvSettleMode) - { - _rcvSettleMode = rcvSettleMode; - } - - public Source getSource() - { - return _source; - } - - public void setSource(Source source) - { - _source = source; - } - - public Target getTarget() - { - return _target; - } - - public void setTarget(Target target) - { - _target = target; - } - - public Map getUnsettled() - { - return _unsettled; - } - - public void setUnsettled(Map unsettled) - { - _unsettled = unsettled; - } - - public boolean getIncompleteUnsettled() - { - return _incompleteUnsettled; - } - - public void setIncompleteUnsettled(boolean incompleteUnsettled) - { - _incompleteUnsettled = incompleteUnsettled; - } - - public UnsignedInteger getInitialDeliveryCount() - { - return _initialDeliveryCount; - } - - public void setInitialDeliveryCount(UnsignedInteger initialDeliveryCount) - { - _initialDeliveryCount = initialDeliveryCount; - } - - public UnsignedLong getMaxMessageSize() - { - return _maxMessageSize; - } - - public void setMaxMessageSize(UnsignedLong maxMessageSize) - { - _maxMessageSize = maxMessageSize; - } - - public Symbol[] getOfferedCapabilities() - { - return _offeredCapabilities; - } - - public void setOfferedCapabilities(Symbol... offeredCapabilities) - { - _offeredCapabilities = offeredCapabilities; - } - - public Symbol[] getDesiredCapabilities() - { - return _desiredCapabilities; - } - - public void setDesiredCapabilities(Symbol... desiredCapabilities) - { - _desiredCapabilities = desiredCapabilities; - } - - public Map getProperties() - { - return _properties; - } - - public void setProperties(Map properties) - { - _properties = properties; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _name; - case 1: - return _handle; - case 2: - return _role; - case 3: - return _sndSettleMode; - case 4: - return _rcvSettleMode; - case 5: - return _source; - case 6: - return _target; - case 7: - return _unsettled; - case 8: - return _incompleteUnsettled; - case 9: - return _initialDeliveryCount; - case 10: - return _maxMessageSize; - case 11: - return _offeredCapabilities; - case 12: - return _desiredCapabilities; - case 13: - return _properties; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _properties != null - ? 14 - : _desiredCapabilities != null - ? 13 - : _offeredCapabilities != null - ? 12 - : _maxMessageSize != null - ? 11 - : _initialDeliveryCount != null - ? 10 - : (_incompleteUnsettled != false) - ? 9 - : _unsettled != null - ? 8 - : _target != null - ? 7 - : _source != null - ? 6 - : (_rcvSettleMode != null && !_rcvSettleMode.equals(ReceiverSettleMode.FIRST)) - ? 5 - : (_sndSettleMode != null && !_sndSettleMode.equals(SenderSettleMode.MIXED)) - ? 4 - : 3; - - } - - - public final class AttachWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Attach.this.get(index); - } - - @Override - public int size() - { - return Attach.this.size(); - } - } - - private static class AttachConstructor implements DescribedTypeConstructor<Attach> - { - public Attach newInstance(Object described) - { - List l = (List) described; - - Attach o = new Attach(); - - if(l.size() <= 2) - { - throw new DecodeException("The role field cannot be omitted"); - } - - switch(14 - l.size()) - { - - case 0: - o.setProperties( (Map) l.get( 13 ) ); - case 1: - Object val1 = l.get( 12 ); - if( val1 == null || val1.getClass().isArray() ) - { - o.setDesiredCapabilities( (Symbol[]) val1 ); - } - else - { - o.setDesiredCapabilities( (Symbol) val1 ); - } - case 2: - Object val2 = l.get( 11 ); - if( val2 == null || val2.getClass().isArray() ) - { - o.setOfferedCapabilities( (Symbol[]) val2 ); - } - else - { - o.setOfferedCapabilities( (Symbol) val2 ); - } - case 3: - o.setMaxMessageSize( (UnsignedLong) l.get( 10 ) ); - case 4: - o.setInitialDeliveryCount( (UnsignedInteger) l.get( 9 ) ); - case 5: - Boolean incompleteUnsettled = (Boolean) l.get(8); - o.setIncompleteUnsettled(incompleteUnsettled == null ? false : incompleteUnsettled); - case 6: - o.setUnsettled( (Map) l.get( 7 ) ); - case 7: - o.setTarget( (Target) l.get( 6 ) ); - case 8: - o.setSource( (Source) l.get( 5 ) ); - case 9: - UnsignedByte rcvSettleMode = (UnsignedByte) l.get(4); - o.setRcvSettleMode(rcvSettleMode == null ? ReceiverSettleMode.FIRST : rcvSettleMode); - case 10: - UnsignedByte sndSettleMode = (UnsignedByte) l.get(3); - o.setSndSettleMode(sndSettleMode == null ? SenderSettleMode.MIXED : sndSettleMode); - case 11: - o.setRole( (Boolean) l.get( 2 ) ); - case 12: - o.setHandle( (UnsignedInteger) l.get( 1 ) ); - case 13: - o.setName( (String) l.get( 0 ) ); - } - - - return o; - } - - public Class<Attach> getTypeClass() - { - return Attach.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleAttach(this, payload, context); - } - - - public static void register(Decoder decoder) - { - AttachConstructor constructor = new AttachConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } - - @Override - public String toString() - { - return "Attach{" + - "name='" + _name + '\'' + - ", handle=" + _handle + - ", role=" + _role + - ", sndSettleMode=" + _sndSettleMode + - ", rcvSettleMode=" + _rcvSettleMode + - ", source=" + _source + - ", target=" + _target + - ", unsettled=" + _unsettled + - ", incompleteUnsettled=" + _incompleteUnsettled + - ", initialDeliveryCount=" + _initialDeliveryCount + - ", maxMessageSize=" + _maxMessageSize + - ", offeredCapabilities=" + (_offeredCapabilities == null ? null : Arrays.asList(_offeredCapabilities)) + - ", desiredCapabilities=" + (_desiredCapabilities == null ? null : Arrays.asList(_desiredCapabilities)) + - ", properties=" + _properties + - '}'; - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Begin.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Begin.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Begin.java deleted file mode 100644 index 605348f..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Begin.java +++ /dev/null @@ -1,316 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.Binary; -import org.apache.qpid.proton.type.DescribedType; -import org.apache.qpid.proton.type.Symbol; -import org.apache.qpid.proton.type.UnsignedInteger; -import org.apache.qpid.proton.type.UnsignedLong; -import org.apache.qpid.proton.type.UnsignedShort; - -import java.util.AbstractList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - - -public class Begin - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000011L), Symbol.valueOf("amqp:begin:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000011L); - private final BeginWrapper _wrapper = new BeginWrapper(); - - private UnsignedShort _remoteChannel; - private UnsignedInteger _nextOutgoingId; - private UnsignedInteger _incomingWindow; - private UnsignedInteger _outgoingWindow; - private UnsignedInteger _handleMax = UnsignedInteger.valueOf(0xffffffff); - private Symbol[] _offeredCapabilities; - private Symbol[] _desiredCapabilities; - private Map _properties; - - public UnsignedShort getRemoteChannel() - { - return _remoteChannel; - } - - public void setRemoteChannel(UnsignedShort remoteChannel) - { - _remoteChannel = remoteChannel; - } - - public UnsignedInteger getNextOutgoingId() - { - return _nextOutgoingId; - } - - public void setNextOutgoingId(UnsignedInteger nextOutgoingId) - { - if( nextOutgoingId == null ) - { - throw new NullPointerException("the next-outgoing-id field is mandatory"); - } - - _nextOutgoingId = nextOutgoingId; - } - - public UnsignedInteger getIncomingWindow() - { - return _incomingWindow; - } - - public void setIncomingWindow(UnsignedInteger incomingWindow) - { - if( incomingWindow == null ) - { - throw new NullPointerException("the incoming-window field is mandatory"); - } - - _incomingWindow = incomingWindow; - } - - public UnsignedInteger getOutgoingWindow() - { - return _outgoingWindow; - } - - public void setOutgoingWindow(UnsignedInteger outgoingWindow) - { - if( outgoingWindow == null ) - { - throw new NullPointerException("the outgoing-window field is mandatory"); - } - - _outgoingWindow = outgoingWindow; - } - - public UnsignedInteger getHandleMax() - { - return _handleMax; - } - - public void setHandleMax(UnsignedInteger handleMax) - { - _handleMax = handleMax; - } - - public Symbol[] getOfferedCapabilities() - { - return _offeredCapabilities; - } - - public void setOfferedCapabilities(Symbol... offeredCapabilities) - { - _offeredCapabilities = offeredCapabilities; - } - - public Symbol[] getDesiredCapabilities() - { - return _desiredCapabilities; - } - - public void setDesiredCapabilities(Symbol... desiredCapabilities) - { - _desiredCapabilities = desiredCapabilities; - } - - public Map getProperties() - { - return _properties; - } - - public void setProperties(Map properties) - { - _properties = properties; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _remoteChannel; - case 1: - return _nextOutgoingId; - case 2: - return _incomingWindow; - case 3: - return _outgoingWindow; - case 4: - return _handleMax; - case 5: - return _offeredCapabilities; - case 6: - return _desiredCapabilities; - case 7: - return _properties; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _properties != null - ? 8 - : _desiredCapabilities != null - ? 7 - : _offeredCapabilities != null - ? 6 - : (_handleMax != null && !_handleMax.equals(UnsignedInteger.MAX_VALUE)) - ? 5 - : 4; - - } - - - public final class BeginWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Begin.this.get(index); - } - - @Override - public int size() - { - return Begin.this.size(); - } - } - - private static class BeginConstructor implements DescribedTypeConstructor<Begin> - { - public Begin newInstance(Object described) - { - List l = (List) described; - - Begin o = new Begin(); - - if(l.size() <= 3) - { - throw new DecodeException("The outgoing-window field cannot be omitted"); - } - - switch(8 - l.size()) - { - - case 0: - o.setProperties( (Map) l.get( 7 ) ); - case 1: - Object val1 = l.get( 6 ); - if( val1 == null || val1.getClass().isArray() ) - { - o.setDesiredCapabilities( (Symbol[]) val1 ); - } - else - { - o.setDesiredCapabilities( (Symbol) val1 ); - } - case 2: - Object val2 = l.get( 5 ); - if( val2 == null || val2.getClass().isArray() ) - { - o.setOfferedCapabilities( (Symbol[]) val2 ); - } - else - { - o.setOfferedCapabilities( (Symbol) val2 ); - } - case 3: - UnsignedInteger handleMax = (UnsignedInteger) l.get(4); - o.setHandleMax(handleMax == null ? UnsignedInteger.MAX_VALUE : handleMax); - case 4: - o.setOutgoingWindow( (UnsignedInteger) l.get( 3 ) ); - case 5: - o.setIncomingWindow( (UnsignedInteger) l.get( 2 ) ); - case 6: - o.setNextOutgoingId( (UnsignedInteger) l.get( 1 ) ); - case 7: - o.setRemoteChannel( (UnsignedShort) l.get( 0 ) ); - } - - - return o; - } - - public Class<Begin> getTypeClass() - { - return Begin.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleBegin(this, payload, context); - } - - - public static void register(Decoder decoder) - { - BeginConstructor constructor = new BeginConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } - - @Override - public String toString() - { - return "Begin{" + - "remoteChannel=" + _remoteChannel + - ", nextOutgoingId=" + _nextOutgoingId + - ", incomingWindow=" + _incomingWindow + - ", outgoingWindow=" + _outgoingWindow + - ", handleMax=" + _handleMax + - ", offeredCapabilities=" + (_offeredCapabilities == null ? null : Arrays.asList(_offeredCapabilities)) + - ", desiredCapabilities=" + (_desiredCapabilities == null ? null : Arrays.asList(_desiredCapabilities)) + - ", properties=" + _properties + - '}'; - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Close.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Close.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Close.java deleted file mode 100644 index d4579cb..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Close.java +++ /dev/null @@ -1,154 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; -import java.util.List; -import java.util.AbstractList; - - -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.*; - - -public class Close - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000018L), Symbol.valueOf("amqp:close:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000018L); - private final CloseWrapper _wrapper = new CloseWrapper(); - - private List _error; - - public List getError() - { - return _error; - } - - public void setError(List error) - { - _error = error; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _error; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _error != null - ? 1 - : 0; - - } - - - public final class CloseWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Close.this.get(index); - } - - @Override - public int size() - { - return Close.this.size(); - } - } - - private static class CloseConstructor implements DescribedTypeConstructor<Close> - { - public Close newInstance(Object described) - { - List l = (List) described; - - Close o = new Close(); - - - switch(1 - l.size()) - { - - case 0: - o.setError( (List) l.get( 0 ) ); - } - - - return o; - } - - public Class<Close> getTypeClass() - { - return Close.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleClose(this, payload, context); - } - - - public static void register(Decoder decoder) - { - CloseConstructor constructor = new CloseConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } - - @Override - public String toString() - { - return "Close{" + - "error=" + _error + - '}'; - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/ConnectionError.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/ConnectionError.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/ConnectionError.java deleted file mode 100644 index dfb9dd7..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/ConnectionError.java +++ /dev/null @@ -1,36 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.type.*; - -public interface ConnectionError -{ - final static Symbol CONNECTION_FORCED = Symbol.valueOf("amqp:connection:forced"); - - final static Symbol FRAMING_ERROR = Symbol.valueOf("amqp:connection:framing-error"); - - final static Symbol REDIRECT = Symbol.valueOf("amqp:connection:redirect"); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/DeliveryState.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/DeliveryState.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/DeliveryState.java deleted file mode 100644 index df4d227..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/DeliveryState.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.proton.type.transport; - -public interface DeliveryState -{ - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Detach.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Detach.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Detach.java deleted file mode 100644 index 2617941..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Detach.java +++ /dev/null @@ -1,198 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; -import java.util.List; -import java.util.AbstractList; - - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.*; - - -public class Detach - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000016L), Symbol.valueOf("amqp:detach:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000016L); - private final DetachWrapper _wrapper = new DetachWrapper(); - - private UnsignedInteger _handle; - private boolean _closed; - private List _error; - - public UnsignedInteger getHandle() - { - return _handle; - } - - public void setHandle(UnsignedInteger handle) - { - if( handle == null ) - { - throw new NullPointerException("the handle field is mandatory"); - } - - _handle = handle; - } - - public boolean getClosed() - { - return _closed; - } - - public void setClosed(boolean closed) - { - _closed = closed; - } - - public List getError() - { - return _error; - } - - public void setError(List error) - { - _error = error; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _handle; - case 1: - return _closed; - case 2: - return _error; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _error != null - ? 3 - : (_closed != false) - ? 2 - : 1; - - } - - - public final class DetachWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Detach.this.get(index); - } - - @Override - public int size() - { - return Detach.this.size(); - } - } - - private static class DetachConstructor implements DescribedTypeConstructor<Detach> - { - public Detach newInstance(Object described) - { - List l = (List) described; - - Detach o = new Detach(); - - if(l.size() <= 0) - { - throw new DecodeException("The handle field cannot be omitted"); - } - - switch(3 - l.size()) - { - - case 0: - o.setError( (List) l.get( 2 ) ); - case 1: - Boolean closed = (Boolean) l.get(1); - o.setClosed(closed == null ? false : closed); - case 2: - o.setHandle( (UnsignedInteger) l.get( 0 ) ); - } - - - return o; - } - - public Class<Detach> getTypeClass() - { - return Detach.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleDetach(this, payload, context); - } - - - public static void register(Decoder decoder) - { - DetachConstructor constructor = new DetachConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } - - @Override - public String toString() - { - return "Detach{" + - "closed=" + _closed + - ", error=" + _error + - '}'; - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Disposition.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Disposition.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Disposition.java deleted file mode 100644 index 18284db..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Disposition.java +++ /dev/null @@ -1,239 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; -import java.util.List; -import java.util.AbstractList; - - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.*; - - -public class Disposition - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000015L), Symbol.valueOf("amqp:disposition:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000015L); - private final DispositionWrapper _wrapper = new DispositionWrapper(); - - private boolean _role; - private UnsignedInteger _first; - private UnsignedInteger _last; - private boolean _settled; - private DeliveryState _state; - private boolean _batchable; - - public boolean getRole() - { - return _role; - } - - public void setRole(boolean role) - { - _role = role; - } - - public UnsignedInteger getFirst() - { - return _first; - } - - public void setFirst(UnsignedInteger first) - { - if( first == null ) - { - throw new NullPointerException("the first field is mandatory"); - } - - _first = first; - } - - public UnsignedInteger getLast() - { - return _last; - } - - public void setLast(UnsignedInteger last) - { - _last = last; - } - - public boolean getSettled() - { - return _settled; - } - - public void setSettled(boolean settled) - { - _settled = settled; - } - - public DeliveryState getState() - { - return _state; - } - - public void setState(DeliveryState state) - { - _state = state; - } - - public boolean getBatchable() - { - return _batchable; - } - - public void setBatchable(boolean batchable) - { - _batchable = batchable; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _role; - case 1: - return _first; - case 2: - return _last; - case 3: - return _settled; - case 4: - return _state; - case 5: - return _batchable; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return (_batchable != false) - ? 6 - : _state != null - ? 5 - : (_settled != false) - ? 4 - : _last != null - ? 3 - : 2; - - } - - - public final class DispositionWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Disposition.this.get(index); - } - - @Override - public int size() - { - return Disposition.this.size(); - } - } - - private static class DispositionConstructor implements DescribedTypeConstructor<Disposition> - { - public Disposition newInstance(Object described) - { - List l = (List) described; - - Disposition o = new Disposition(); - - if(l.size() <= 1) - { - throw new DecodeException("The first field cannot be omitted"); - } - - switch(6 - l.size()) - { - - case 0: - Boolean batchable = (Boolean) l.get(5); - o.setBatchable(batchable == null ? false : batchable); - case 1: - o.setState( (DeliveryState) l.get( 4 ) ); - case 2: - Boolean settled = (Boolean) l.get(3); - o.setSettled(settled == null ? false : settled); - case 3: - o.setLast( (UnsignedInteger) l.get( 2 ) ); - case 4: - o.setFirst( (UnsignedInteger) l.get( 1 ) ); - case 5: - o.setRole( (Boolean) l.get( 0 ) ); - } - - - return o; - } - - public Class<Disposition> getTypeClass() - { - return Disposition.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleDisposition(this, payload, context); - } - - - public static void register(Decoder decoder) - { - DispositionConstructor constructor = new DispositionConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/End.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/End.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/End.java deleted file mode 100644 index 96ac989..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/End.java +++ /dev/null @@ -1,154 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; -import java.util.List; -import java.util.AbstractList; - - -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.*; - - -public class End - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000017L), Symbol.valueOf("amqp:end:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000017L); - private final EndWrapper _wrapper = new EndWrapper(); - - private List _error; - - public List getError() - { - return _error; - } - - public void setError(List error) - { - _error = error; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _error; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _error != null - ? 1 - : 0; - - } - - - public final class EndWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return End.this.get(index); - } - - @Override - public int size() - { - return End.this.size(); - } - } - - private static class EndConstructor implements DescribedTypeConstructor<End> - { - public End newInstance(Object described) - { - List l = (List) described; - - End o = new End(); - - - switch(1 - l.size()) - { - - case 0: - o.setError( (List) l.get( 0 ) ); - } - - - return o; - } - - public Class<End> getTypeClass() - { - return End.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleEnd(this, payload, context); - } - - - public static void register(Decoder decoder) - { - EndConstructor constructor = new EndConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } - - @Override - public String toString() - { - return "End{" + - "error=" + _error + - '}'; - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Error.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Error.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Error.java deleted file mode 100644 index c0030af..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Error.java +++ /dev/null @@ -1,184 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; -import java.util.Map; -import java.util.List; -import java.util.AbstractList; - - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.*; - - -public class Error - implements DescribedType -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x000000000000001dL), Symbol.valueOf("amqp:error:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x000000000000001dL); - private final ErrorWrapper _wrapper = new ErrorWrapper(); - - private Symbol _condition; - private String _description; - private Map _info; - - public Symbol getCondition() - { - return _condition; - } - - public void setCondition(Symbol condition) - { - if( condition == null ) - { - throw new NullPointerException("the condition field is mandatory"); - } - - _condition = condition; - } - - public String getDescription() - { - return _description; - } - - public void setDescription(String description) - { - _description = description; - } - - public Map getInfo() - { - return _info; - } - - public void setInfo(Map info) - { - _info = info; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _condition; - case 1: - return _description; - case 2: - return _info; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _info != null - ? 3 - : _description != null - ? 2 - : 1; - - } - - - public final class ErrorWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Error.this.get(index); - } - - @Override - public int size() - { - return Error.this.size(); - } - } - - private static class ErrorConstructor implements DescribedTypeConstructor<Error> - { - public Error newInstance(Object described) - { - List l = (List) described; - - Error o = new Error(); - - if(l.size() <= 0) - { - throw new DecodeException("The condition field cannot be omitted"); - } - - switch(3 - l.size()) - { - - case 0: - o.setInfo( (Map) l.get( 2 ) ); - case 1: - o.setDescription( (String) l.get( 1 ) ); - case 2: - o.setCondition( (Symbol) l.get( 0 ) ); - } - - - return o; - } - - public Class<Error> getTypeClass() - { - return Error.class; - } - } - - - public static void register(Decoder decoder) - { - ErrorConstructor constructor = new ErrorConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Flow.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Flow.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Flow.java deleted file mode 100644 index 7458b5e..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Flow.java +++ /dev/null @@ -1,349 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; -import java.util.Map; -import java.util.List; -import java.util.AbstractList; - - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.*; - - -public class Flow - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000013L), Symbol.valueOf("amqp:flow:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000013L); - private final FlowWrapper _wrapper = new FlowWrapper(); - - private UnsignedInteger _nextIncomingId; - private UnsignedInteger _incomingWindow; - private UnsignedInteger _nextOutgoingId; - private UnsignedInteger _outgoingWindow; - private UnsignedInteger _handle; - private UnsignedInteger _deliveryCount; - private UnsignedInteger _linkCredit; - private UnsignedInteger _available; - private boolean _drain; - private boolean _echo; - private Map _properties; - - public UnsignedInteger getNextIncomingId() - { - return _nextIncomingId; - } - - public void setNextIncomingId(UnsignedInteger nextIncomingId) - { - _nextIncomingId = nextIncomingId; - } - - public UnsignedInteger getIncomingWindow() - { - return _incomingWindow; - } - - public void setIncomingWindow(UnsignedInteger incomingWindow) - { - if( incomingWindow == null ) - { - throw new NullPointerException("the incoming-window field is mandatory"); - } - - _incomingWindow = incomingWindow; - } - - public UnsignedInteger getNextOutgoingId() - { - return _nextOutgoingId; - } - - public void setNextOutgoingId(UnsignedInteger nextOutgoingId) - { - if( nextOutgoingId == null ) - { - throw new NullPointerException("the next-outgoing-id field is mandatory"); - } - - _nextOutgoingId = nextOutgoingId; - } - - public UnsignedInteger getOutgoingWindow() - { - return _outgoingWindow; - } - - public void setOutgoingWindow(UnsignedInteger outgoingWindow) - { - if( outgoingWindow == null ) - { - throw new NullPointerException("the outgoing-window field is mandatory"); - } - - _outgoingWindow = outgoingWindow; - } - - public UnsignedInteger getHandle() - { - return _handle; - } - - public void setHandle(UnsignedInteger handle) - { - _handle = handle; - } - - public UnsignedInteger getDeliveryCount() - { - return _deliveryCount; - } - - public void setDeliveryCount(UnsignedInteger deliveryCount) - { - _deliveryCount = deliveryCount; - } - - public UnsignedInteger getLinkCredit() - { - return _linkCredit; - } - - public void setLinkCredit(UnsignedInteger linkCredit) - { - _linkCredit = linkCredit; - } - - public UnsignedInteger getAvailable() - { - return _available; - } - - public void setAvailable(UnsignedInteger available) - { - _available = available; - } - - public boolean getDrain() - { - return _drain; - } - - public void setDrain(boolean drain) - { - _drain = drain; - } - - public boolean getEcho() - { - return _echo; - } - - public void setEcho(boolean echo) - { - _echo = echo; - } - - public Map getProperties() - { - return _properties; - } - - public void setProperties(Map properties) - { - _properties = properties; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _nextIncomingId; - case 1: - return _incomingWindow; - case 2: - return _nextOutgoingId; - case 3: - return _outgoingWindow; - case 4: - return _handle; - case 5: - return _deliveryCount; - case 6: - return _linkCredit; - case 7: - return _available; - case 8: - return _drain; - case 9: - return _echo; - case 10: - return _properties; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _properties != null - ? 11 - : (_echo != false) - ? 10 - : (_drain != false) - ? 9 - : _available != null - ? 8 - : _linkCredit != null - ? 7 - : _deliveryCount != null - ? 6 - : _handle != null - ? 5 - : 4; - - } - - - public final class FlowWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Flow.this.get(index); - } - - @Override - public int size() - { - return Flow.this.size(); - } - } - - private static class FlowConstructor implements DescribedTypeConstructor<Flow> - { - public Flow newInstance(Object described) - { - List l = (List) described; - - Flow o = new Flow(); - - if(l.size() <= 3) - { - throw new DecodeException("The outgoing-window field cannot be omitted"); - } - - switch(11 - l.size()) - { - - case 0: - o.setProperties( (Map) l.get( 10 ) ); - case 1: - Boolean echo = (Boolean) l.get(9); - o.setEcho(echo == null ? false : echo); - case 2: - Boolean drain = (Boolean) l.get(8); - o.setDrain(drain == null ? false : drain ); - case 3: - o.setAvailable( (UnsignedInteger) l.get( 7 ) ); - case 4: - o.setLinkCredit( (UnsignedInteger) l.get( 6 ) ); - case 5: - o.setDeliveryCount( (UnsignedInteger) l.get( 5 ) ); - case 6: - o.setHandle( (UnsignedInteger) l.get( 4 ) ); - case 7: - o.setOutgoingWindow( (UnsignedInteger) l.get( 3 ) ); - case 8: - o.setNextOutgoingId( (UnsignedInteger) l.get( 2 ) ); - case 9: - o.setIncomingWindow( (UnsignedInteger) l.get( 1 ) ); - case 10: - o.setNextIncomingId( (UnsignedInteger) l.get( 0 ) ); - } - - - return o; - } - - public Class<Flow> getTypeClass() - { - return Flow.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleFlow(this, payload, context); - } - - - public static void register(Decoder decoder) - { - FlowConstructor constructor = new FlowConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } - - @Override - public String toString() - { - return "Flow{" + - "nextIncomingId=" + _nextIncomingId + - ", incomingWindow=" + _incomingWindow + - ", nextOutgoingId=" + _nextOutgoingId + - ", outgoingWindow=" + _outgoingWindow + - ", handle=" + _handle + - ", deliveryCount=" + _deliveryCount + - ", linkCredit=" + _linkCredit + - ", available=" + _available + - ", drain=" + _drain + - ", echo=" + _echo + - ", properties=" + _properties + - '}'; - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/FrameBody.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/FrameBody.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/FrameBody.java deleted file mode 100644 index 2c840cd..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/FrameBody.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.type.Binary; - -public interface FrameBody -{ - interface FrameBodyHandler<E> - { - void handleOpen(Open open, Binary payload, E context); - void handleBegin(Begin begin, Binary payload, E context); - void handleAttach(Attach attach, Binary payload, E context); - void handleFlow(Flow flow, Binary payload, E context); - void handleTransfer(Transfer transfer, Binary payload, E context); - void handleDisposition(Disposition disposition, Binary payload, E context); - void handleDetach(Detach detach, Binary payload, E context); - void handleEnd(End end, Binary payload, E context); - void handleClose(Close close, Binary payload, E context); - - } - - <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context); -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/LinkError.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/LinkError.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/LinkError.java deleted file mode 100644 index cfc4d5e..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/LinkError.java +++ /dev/null @@ -1,40 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.type.*; - -public interface LinkError -{ - final static Symbol DETACH_FORCED = Symbol.valueOf("amqp:link:detach-forced"); - - final static Symbol TRANSFER_LIMIT_EXCEEDED = Symbol.valueOf("amqp:link:transfer-limit-exceeded"); - - final static Symbol MESSAGE_SIZE_EXCEEDED = Symbol.valueOf("amqp:link:message-size-exceeded"); - - final static Symbol REDIRECT = Symbol.valueOf("amqp:link:redirect"); - - final static Symbol STOLEN = Symbol.valueOf("amqp:link:stolen"); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Open.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Open.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Open.java deleted file mode 100644 index f456ba2..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Open.java +++ /dev/null @@ -1,365 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.Binary; -import org.apache.qpid.proton.type.DescribedType; -import org.apache.qpid.proton.type.Symbol; -import org.apache.qpid.proton.type.UnsignedInteger; -import org.apache.qpid.proton.type.UnsignedLong; -import org.apache.qpid.proton.type.UnsignedShort; - -import java.util.AbstractList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - - -public class Open - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000010L), Symbol.valueOf("amqp:open:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000010L); - private final OpenWrapper _wrapper = new OpenWrapper(); - - private String _containerId; - private String _hostname; - private UnsignedInteger _maxFrameSize = UnsignedInteger.valueOf(0xffffffff); - private UnsignedShort _channelMax = UnsignedShort.valueOf((short) 65535); - private UnsignedInteger _idleTimeOut; - private Symbol[] _outgoingLocales; - private Symbol[] _incomingLocales; - private Symbol[] _offeredCapabilities; - private Symbol[] _desiredCapabilities; - private Map _properties; - - public String getContainerId() - { - return _containerId; - } - - public void setContainerId(String containerId) - { - if( containerId == null ) - { - throw new NullPointerException("the container-id field is mandatory"); - } - - _containerId = containerId; - } - - public String getHostname() - { - return _hostname; - } - - public void setHostname(String hostname) - { - _hostname = hostname; - } - - public UnsignedInteger getMaxFrameSize() - { - return _maxFrameSize; - } - - public void setMaxFrameSize(UnsignedInteger maxFrameSize) - { - _maxFrameSize = maxFrameSize; - } - - public UnsignedShort getChannelMax() - { - return _channelMax; - } - - public void setChannelMax(UnsignedShort channelMax) - { - _channelMax = channelMax; - } - - public UnsignedInteger getIdleTimeOut() - { - return _idleTimeOut; - } - - public void setIdleTimeOut(UnsignedInteger idleTimeOut) - { - _idleTimeOut = idleTimeOut; - } - - public Symbol[] getOutgoingLocales() - { - return _outgoingLocales; - } - - public void setOutgoingLocales(Symbol... outgoingLocales) - { - _outgoingLocales = outgoingLocales; - } - - public Symbol[] getIncomingLocales() - { - return _incomingLocales; - } - - public void setIncomingLocales(Symbol... incomingLocales) - { - _incomingLocales = incomingLocales; - } - - public Symbol[] getOfferedCapabilities() - { - return _offeredCapabilities; - } - - public void setOfferedCapabilities(Symbol... offeredCapabilities) - { - _offeredCapabilities = offeredCapabilities; - } - - public Symbol[] getDesiredCapabilities() - { - return _desiredCapabilities; - } - - public void setDesiredCapabilities(Symbol... desiredCapabilities) - { - _desiredCapabilities = desiredCapabilities; - } - - public Map getProperties() - { - return _properties; - } - - public void setProperties(Map properties) - { - _properties = properties; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _containerId; - case 1: - return _hostname; - case 2: - return _maxFrameSize; - case 3: - return _channelMax; - case 4: - return _idleTimeOut; - case 5: - return _outgoingLocales; - case 6: - return _incomingLocales; - case 7: - return _offeredCapabilities; - case 8: - return _desiredCapabilities; - case 9: - return _properties; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return _properties != null - ? 10 - : _desiredCapabilities != null - ? 9 - : _offeredCapabilities != null - ? 8 - : _incomingLocales != null - ? 7 - : _outgoingLocales != null - ? 6 - : _idleTimeOut != null - ? 5 - : (_channelMax != null && !_channelMax.equals(UnsignedShort.MAX_VALUE)) - ? 4 - : (_maxFrameSize != null && !_maxFrameSize.equals(UnsignedInteger.MAX_VALUE)) - ? 3 - : _hostname != null - ? 2 - : 1; - - } - - - public final class OpenWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Open.this.get(index); - } - - @Override - public int size() - { - return Open.this.size(); - } - } - - private static class OpenConstructor implements DescribedTypeConstructor<Open> - { - public Open newInstance(Object described) - { - List l = (List) described; - - Open o = new Open(); - - if(l.size() <= 0) - { - throw new DecodeException("The container-id field cannot be omitted"); - } - - switch(10 - l.size()) - { - - case 0: - o.setProperties( (Map) l.get( 9 ) ); - case 1: - Object val1 = l.get( 8 ); - if( val1 == null || val1.getClass().isArray() ) - { - o.setDesiredCapabilities( (Symbol[]) val1 ); - } - else - { - o.setDesiredCapabilities( (Symbol) val1 ); - } - case 2: - Object val2 = l.get( 7 ); - if( val2 == null || val2.getClass().isArray() ) - { - o.setOfferedCapabilities( (Symbol[]) val2 ); - } - else - { - o.setOfferedCapabilities( (Symbol) val2 ); - } - case 3: - Object val3 = l.get( 6 ); - if( val3 == null || val3.getClass().isArray() ) - { - o.setIncomingLocales( (Symbol[]) val3 ); - } - else - { - o.setIncomingLocales( (Symbol) val3 ); - } - case 4: - Object val4 = l.get( 5 ); - if( val4 == null || val4.getClass().isArray() ) - { - o.setOutgoingLocales( (Symbol[]) val4 ); - } - else - { - o.setOutgoingLocales( (Symbol) val4 ); - } - case 5: - o.setIdleTimeOut( (UnsignedInteger) l.get( 4 ) ); - case 6: - UnsignedShort channelMax = (UnsignedShort) l.get(3); - o.setChannelMax(channelMax == null ? UnsignedShort.MAX_VALUE : channelMax); - case 7: - UnsignedInteger maxFrameSize = (UnsignedInteger) l.get(2); - o.setMaxFrameSize(maxFrameSize == null ? UnsignedInteger.MAX_VALUE : maxFrameSize); - case 8: - o.setHostname( (String) l.get( 1 ) ); - case 9: - o.setContainerId( (String) l.get( 0 ) ); - } - - - return o; - } - - public Class<Open> getTypeClass() - { - return Open.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleOpen(this, payload, context); - } - - - public static void register(Decoder decoder) - { - OpenConstructor constructor = new OpenConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } - - @Override - public String toString() - { - return "Open{" + - " containerId='" + _containerId + '\'' + - ", hostname='" + _hostname + '\'' + - ", maxFrameSize=" + _maxFrameSize + - ", channelMax=" + _channelMax + - ", idleTimeOut=" + _idleTimeOut + - ", outgoingLocales=" + (_outgoingLocales == null ? null : Arrays.asList(_outgoingLocales)) + - ", incomingLocales=" + (_incomingLocales == null ? null : Arrays.asList(_incomingLocales)) + - ", offeredCapabilities=" + (_offeredCapabilities == null ? null : Arrays.asList(_offeredCapabilities)) + - ", desiredCapabilities=" + (_desiredCapabilities == null ? null : Arrays.asList(_desiredCapabilities)) + - ", properties=" + _properties + - '}'; - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/ReceiverSettleMode.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/ReceiverSettleMode.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/ReceiverSettleMode.java deleted file mode 100644 index 6666464..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/ReceiverSettleMode.java +++ /dev/null @@ -1,34 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.type.*; - -public interface ReceiverSettleMode -{ - final static UnsignedByte FIRST = UnsignedByte.valueOf((byte) 0); - - final static UnsignedByte SECOND = UnsignedByte.valueOf((byte) 1); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Role.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Role.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Role.java deleted file mode 100644 index f5b3b84..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Role.java +++ /dev/null @@ -1,32 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -public interface Role -{ - final static boolean SENDER = false; - - final static boolean RECEIVER = true; - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/SenderSettleMode.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/SenderSettleMode.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/SenderSettleMode.java deleted file mode 100644 index d8a1264..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/SenderSettleMode.java +++ /dev/null @@ -1,36 +0,0 @@ - -/* -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*/ - - -package org.apache.qpid.proton.type.transport; - -import org.apache.qpid.proton.type.*; - -public interface SenderSettleMode -{ - final static UnsignedByte UNSETTLED = UnsignedByte.valueOf((byte) 0); - - final static UnsignedByte SETTLED = UnsignedByte.valueOf((byte) 1); - - final static UnsignedByte MIXED = UnsignedByte.valueOf((byte) 2); - -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
