/** * narrow this invoker to a specific RemoteClientInvoker instance * * @return * @throws Exception */ public ClientInvoker narrow() throws Exception { return InvokerRegistry.createClientInvoker(this); }
/** * create a ServerInvoker instance, using the specific Invoker locator data and an implementation of the * ServerInvocationHandler interface. Will use the default configuration values for the transport. * * @param locator * @return * @throws Exception */ public static ServerInvoker createServerInvoker(InvokerLocator locator) throws Exception { return createServerInvoker(locator, null); }
/** * Called to destroy any cached RemoteClientInvoker copies inside the registry. This method * must be called when it is determined that a remote server (via the locator) is no * longer available. */ public static void destroyClientInvoker(InvokerLocator locator, Map configuration) { synchronized(clientLock) { if (trace) { log.trace("destroying client invoker " + locator + ", config " + configuration); } ClientInvoker invoker = decrementClientInvokerCounter(locator, configuration); if(invoker != null) { if (trace) { log.trace("disconnecting " + invoker); } invoker.disconnect(); invoker = null; } } }
ClientInvoker invoker = getRegisteredClientInvoker(locator, configuration); if(invoker != null) InvokerLocator l = invoker.getLocator(); addRegisteredClientInvoker(invoker, l, configuration); invoker = loadClientInvoker(protocol, locator, configuration); addRegisteredClientInvoker(invoker, l, configuration);
innerClientInvoker = InvokerRegistry.createClientInvoker(locator, configMap); InvokerRegistry.destroyClientInvoker(locator, configMap);
public void run() { log.trace("calling InvokerRegistry.destroyClientInvoker() for " + invoker); InvokerRegistry.destroyClientInvoker(invoker.getLocator(), configuration); } }
invoker.stop(); invoker.destroy(); InvokerRegistry.destroyServerInvoker(invoker); invoker = null;
ServerInvoker[] serverInvokers = InvokerRegistry.getServerInvokers(); if (serverInvokers != null && serverInvokers.length > 0)
public void run() { broadcaster.sendNotification(new NetworkNotification(objectName, NetworkNotification.DOMAIN_CHANGED, Identity.get(mBeanServer), InvokerRegistry.getRegisteredServerLocators())); } }.start();
private static ClientInvoker loadClientInvoker(String protocol, InvokerLocator locator, Map configuration) throws Exception { ClientInvoker clientInvoker = null; Class transportFactoryClass = getTransportClientFactory(protocol); if(transportFactoryClass != null) { ClientFactory transportFactory = (ClientFactory)transportFactoryClass.newInstance(); Method getClientInvokerMethod = transportFactoryClass.getMethod("createClientInvoker", new Class[] {InvokerLocator.class, Map.class}); clientInvoker = (ClientInvoker)getClientInvokerMethod.invoke(transportFactory, new Object[] {locator, configuration}); } else { throw new ClassNotFoundException("Could not find class " + transportFactoryClass); } return clientInvoker; }
private boolean doStop() { synchronized(lock) { if (stopped) return false; if (!listeners.isEmpty()) { listeners.clear(); } stopped = true; } if (clientInvoker != null) { InvokerRegistry.destroyClientInvoker(locator, configMap); } TimerUtil.unschedule(this); boolean result = super.cancel(); log.debug(this + " stopped, returning " + result); return result; }
/** * Destroys the connector. * * @jmx.managed-operation */ public void destroy() { if (isStarted) { stop(); } if (invoker != null) { invoker.stop(); invoker.destroy(); InvokerRegistry.destroyServerInvoker(invoker); invoker = null; } isCreated = false; }
ServerInvoker invokers[] = InvokerRegistry.getServerInvokers(); if(invokers == null || invokers.length <= 0)
InvokerLocator[] locators = InvokerRegistry.getRegisteredServerLocators(); Detection msg = createDetection(); String sId = id.getInstanceId();
try transportFactoryClass = getTransportClientFactory(transport); ClientFactory clientFactory = (ClientFactory)transportFactoryClass.newInstance(); Method meth = transportFactoryClass.getMethod("supportsSSL", new Class[]{});
/** * create a ClientInvoker instance, using the specific InvokerLocator, which is just a client-side * invoker to a remote server. Will use the default configuration values for the transport. * * @param locator * @return * @throws Exception */ public static ClientInvoker createClientInvoker(InvokerLocator locator) throws Exception { return createClientInvoker(locator, null); }
InvokerRegistry.destroyClientInvoker(invoker.getLocator(), configuration);
/** * Creates the connector. * * @jmx.managed-operation */ public void create() throws Exception { if (!isCreated) { try { init(); isCreated = true; } catch (Exception e) { // unwind create process if (invoker != null) { invoker.stop(); invoker.destroy(); InvokerRegistry.destroyServerInvoker(invoker); invoker = null; } isCreated = false; throw e; } } }
ServerInvoker[] invokers = InvokerRegistry.getServerInvokers(); if(invokers != null)
invoker = InvokerRegistry.createServerInvoker(locator, configuration); invoker.setMBeanServer(server);