1 11 package org.eclipse.jdi.internal.spy; 12 13 import com.ibm.icu.text.MessageFormat; 14 15 16 public class JdwpConversation { 17 private int fId; 18 private JdwpCommandPacket fCommand; 19 private JdwpReplyPacket fReply; 20 21 JdwpConversation(int id) { 22 fId = id; 23 } 24 25 void setCommand(JdwpCommandPacket command) { 26 if (fCommand != null) { 27 throw new IllegalArgumentException (MessageFormat.format("Attempt to overwrite command with {0}", new String [] {command.toString()})); } 29 fCommand = command; 30 } 31 32 void setReply(JdwpReplyPacket reply) { 33 if (fReply != null) { 34 throw new IllegalArgumentException (MessageFormat.format("Attempt to overwrite reply with {0}", new String [] {reply.toString()})); } 36 fReply = reply; 37 } 38 39 public JdwpCommandPacket getCommand() { 40 return fCommand; 41 } 42 43 public JdwpReplyPacket getReply() { 44 return fReply; 45 } 46 47 public int getId() { 48 return fId; 49 } 50 } 51 | Popular Tags |