1 45 package org.exolab.jms.net.multiplexer; 46 47 import java.io.IOException ; 48 49 import org.apache.commons.logging.LogFactory; 50 import org.apache.commons.logging.Log; 51 52 import org.exolab.jms.net.connector.Caller; 53 import org.exolab.jms.net.connector.Invocation; 54 import org.exolab.jms.net.connector.Request; 55 import org.exolab.jms.net.connector.Response; 56 import org.exolab.jms.net.connector.InvocationHandler; 57 58 59 67 class ChannelInvocation implements Invocation { 68 69 72 private final Channel _channel; 73 74 77 private final Caller _caller; 78 79 82 private static final Log _log = LogFactory.getLog(ChannelInvocation.class); 83 84 85 91 public ChannelInvocation(Channel channel, Caller caller) { 92 _channel = channel; 93 _caller = caller; 94 } 95 96 102 public Request getRequest() throws IOException { 103 return _channel.readRequest(); 104 } 105 106 111 public Caller getCaller() { 112 return _caller; 113 } 114 115 120 public void setResponse(Response response) { 121 try { 122 _channel.writeResponse(response); 123 } catch (Exception exception) { 124 _log.debug(exception, exception); 125 } 126 } 127 128 } 129 | Popular Tags |