@Test public void testCopy() { Attach attach = new Attach(); attach.setName("test"); attach.setHandle(UnsignedInteger.ONE); attach.setRole(Role.RECEIVER); attach.setSndSettleMode(SenderSettleMode.MIXED); attach.setRcvSettleMode(ReceiverSettleMode.SECOND); attach.setSource(null); attach.setTarget(new org.apache.qpid.proton.amqp.messaging.Target()); attach.setUnsettled(null); attach.setIncompleteUnsettled(false); attach.setInitialDeliveryCount(UnsignedInteger.valueOf(42)); attach.setMaxMessageSize(UnsignedLong.valueOf(1024)); attach.setOfferedCapabilities(new Symbol[] { Symbol.valueOf("anonymous-relay") }); attach.setDesiredCapabilities(new Symbol[0]); final Attach copyOf = attach.copy(); assertEquals(attach.getName(), copyOf.getName()); assertArrayEquals(attach.getDesiredCapabilities(), copyOf.getDesiredCapabilities()); assertEquals(attach.getHandle(), copyOf.getHandle()); assertEquals(attach.getRole(), copyOf.getRole()); assertEquals(attach.getSndSettleMode(), copyOf.getSndSettleMode()); assertEquals(attach.getRcvSettleMode(), copyOf.getRcvSettleMode()); assertNull(copyOf.getSource()); assertNotNull(copyOf.getTarget()); assertEquals(attach.getUnsettled(), copyOf.getUnsettled()); assertEquals(attach.getIncompleteUnsettled(), copyOf.getIncompleteUnsettled()); assertEquals(attach.getMaxMessageSize(), copyOf.getMaxMessageSize()); assertEquals(attach.getInitialDeliveryCount(), copyOf.getInitialDeliveryCount()); assertArrayEquals(attach.getOfferedCapabilities(), copyOf.getOfferedCapabilities()); }
@Override public Attach copy() { return new Attach(this); }
Attach implements FrameBody { @Override public Attach copy() { return new Attach(this); } }
Attach implements FrameBody { @Override public Attach copy() { return new Attach(this); } Attach(); @SuppressWarnings("unchecked")  Attach(Attach other); }
Attach implements FrameBody { @Override public Attach copy() { return new Attach(this); } Attach(); @SuppressWarnings("unchecked")  Attach(Attach other); String getName(); void setName(String name); UnsignedInteger getHandle(); void setHandle(UnsignedInteger handle); Role getRole(); void setRole(Role role); SenderSettleMode getSndSettleMode(); void setSndSettleMode(SenderSettleMode sndSettleMode); ReceiverSettleMode getRcvSettleMode(); void setRcvSettleMode(ReceiverSettleMode rcvSettleMode); Source getSource(); void setSource(Source source); Target getTarget(); void setTarget(Target target); Map getUnsettled(); void setUnsettled(Map unsettled); boolean getIncompleteUnsettled(); void setIncompleteUnsettled(boolean incompleteUnsettled); UnsignedInteger getInitialDeliveryCount(); void setInitialDeliveryCount(UnsignedInteger initialDeliveryCount); UnsignedLong getMaxMessageSize(); void setMaxMessageSize(UnsignedLong maxMessageSize); Symbol[] getOfferedCapabilities(); void setOfferedCapabilities(Symbol... offeredCapabilities); Symbol[] getDesiredCapabilities(); void setDesiredCapabilities(Symbol... desiredCapabilities); Map getProperties(); void setProperties(Map properties); @Override void invoke(FrameBodyHandler<E> handler, Binary payload, E context); @Override String toString(); @Override Attach copy(); }
Attach implements FrameBody { @Override public Attach copy() { return new Attach(this); } Attach(); @SuppressWarnings("unchecked")  Attach(Attach other); String getName(); void setName(String name); UnsignedInteger getHandle(); void setHandle(UnsignedInteger handle); Role getRole(); void setRole(Role role); SenderSettleMode getSndSettleMode(); void setSndSettleMode(SenderSettleMode sndSettleMode); ReceiverSettleMode getRcvSettleMode(); void setRcvSettleMode(ReceiverSettleMode rcvSettleMode); Source getSource(); void setSource(Source source); Target getTarget(); void setTarget(Target target); Map getUnsettled(); void setUnsettled(Map unsettled); boolean getIncompleteUnsettled(); void setIncompleteUnsettled(boolean incompleteUnsettled); UnsignedInteger getInitialDeliveryCount(); void setInitialDeliveryCount(UnsignedInteger initialDeliveryCount); UnsignedLong getMaxMessageSize(); void setMaxMessageSize(UnsignedLong maxMessageSize); Symbol[] getOfferedCapabilities(); void setOfferedCapabilities(Symbol... offeredCapabilities); Symbol[] getDesiredCapabilities(); void setDesiredCapabilities(Symbol... desiredCapabilities); Map getProperties(); void setProperties(Map properties); @Override void invoke(FrameBodyHandler<E> handler, Binary payload, E context); @Override String toString(); @Override Attach copy();  }