Package mx4j.tools.remote

Examples of mx4j.tools.remote.Connection


   protected Connection doConnect(String connectionId, Subject subject) throws IOException
   {
      RemoteNotificationServerHandler notificationHandler = new DefaultRemoteNotificationServerHandler(getEnvironment());
      HTTPConnection invoker = new HTTPServerInvoker(mbeanServerConnection, notificationHandler);
      HTTPConnection subjectInvoker = HTTPSubjectInvoker.newInstance(invoker, subject, getSecurityContext(), getEnvironment());
      Connection handler = new HTTPConnectionHandler(subjectInvoker, this, connectionId);
      return handler;
   }
View Full Code Here


      // Lookup the ConnectionManager
      ConnectionManager connectionManager = HTTPConnectorServer.find(address);
      if (connectionManager == null) throw new IOException("Could not find ConnectionManager. Make sure a HTTPConnectorServer is in classloader scope and bound at this address " + address);

      Connection connection = connectionManager.connect(credentials);
      addConnection(connection);
      return connection.getConnectionId();
   }
View Full Code Here

   protected Connection findConnection() throws IOException
   {
      String connectionId = findConnectionId();
      synchronized (this)
      {
         Connection connection = (Connection)connections.get(connectionId);
         if (connection != null) return connection;

         Logger logger = getLogger();
         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Unknown connection '" + connectionId + "', known connections are " + connections.keySet());
         throw new IOException("Connection ID '" + connectionId + "' unknown");
View Full Code Here

   protected abstract String findConnectionId();

   public void close() throws IOException
   {
      Connection connection = findConnection();
      removeConnection(connection);
      connection.close();
   }
View Full Code Here

      connection.close();
   }

   public String getConnectionId() throws IOException
   {
      Connection connection = findConnection();
      return connection.getConnectionId();
   }
View Full Code Here

TOP

Related Classes of mx4j.tools.remote.Connection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.