1 8 9 package mx4j.tools.remote.local; 10 11 import java.io.IOException ; 12 import java.util.Map ; 13 import javax.management.MBeanServer ; 14 import javax.security.auth.Subject ; 15 16 import mx4j.tools.remote.AbstractConnectionManager; 17 import mx4j.tools.remote.Connection; 18 19 22 class LocalConnectionManager extends AbstractConnectionManager 23 { 24 private final MBeanServer mbeanServer; 25 26 LocalConnectionManager(LocalConnectorServer server, Map environment) 27 { 28 super(server, environment); 29 this.mbeanServer = server.getMBeanServer(); 30 } 31 32 public String getProtocol() 33 { 34 return "local"; 35 } 36 37 public Connection doConnect(String connectionId, Subject subject) throws IOException 38 { 39 LocalConnection serverInvoker = new LocalServerInvoker(mbeanServer); 40 LocalConnection subjectInvoker = LocalSubjectInvoker.newInstance(serverInvoker, subject, getSecurityContext(), getEnvironment()); 41 return new LocalConnectionHandler(connectionId, this, subjectInvoker); 42 } 43 44 protected void doClose() throws IOException 45 { 46 } 48 49 protected void doCloseConnection(Connection connection) throws IOException 50 { 51 } 53 } 54 | Popular Tags |