366:8c0b6bccfe47 | 368:0989ad8c0860 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this | 7 * published by the Free Software Foundation. Oracle designates this |
46 ctxt = new MessageContextImpl(packet); | 46 ctxt = new MessageContextImpl(packet); |
47 this.packet = packet; | 47 this.packet = packet; |
48 } | 48 } |
49 | 49 |
50 /** | 50 /** |
51 * Fill a {@link Packet} with values of this {@link MessageContext}. | |
52 */ | |
53 private void fill(Packet packet) { | |
54 ctxt.fill(packet); | |
55 } | |
56 /** | |
57 * Updates Message in the packet with user modifications | 51 * Updates Message in the packet with user modifications |
58 */ | 52 */ |
59 abstract void updateMessage(); | 53 abstract void updateMessage(); |
60 | 54 |
61 /** | 55 /** |
77 * Updates the complete packet with user modfications to the message and | 71 * Updates the complete packet with user modfications to the message and |
78 * properties cahnges in MessageContext | 72 * properties cahnges in MessageContext |
79 */ | 73 */ |
80 public final void updatePacket() { | 74 public final void updatePacket() { |
81 updateMessage(); | 75 updateMessage(); |
82 fill(packet); | |
83 } | 76 } |
84 | 77 |
85 MessageContextImpl getMessageContext() { | 78 MessageContextImpl getMessageContext() { |
86 return ctxt; | 79 return ctxt; |
87 } | 80 } |