1 23 package fr.dyade.aaa.jndi2.server; 24 25 import fr.dyade.aaa.agent.*; 26 import fr.dyade.aaa.jndi2.msg.*; 27 28 public class AgentRequestContext 29 extends RequestContext { 30 31 private JndiRequest request; 32 33 private AgentId from; 34 35 private boolean doReply; 36 37 public AgentRequestContext(JndiRequest request, 38 AgentId from, 39 boolean doReply) { 40 this.request = request; 41 this.from = from; 42 this.doReply = doReply; 43 } 44 45 public AgentId getFrom() { 46 return from; 47 } 48 49 public JndiRequest getRequest() { 50 return request; 51 } 52 53 public void reply(JndiReply reply) { 54 if (doReply) { 55 Channel.sendTo( 56 from, new JndiReplyNot(request, reply)); 57 } 58 } 59 } 60 | Popular Tags |