Tabnine Logo
ExtensionsRepository.getClassLoader
Code IndexAdd Tabnine to your IDE (free)

How to use
getClassLoader
method
in
net.java.btrace.api.extensions.ExtensionsRepository

Best Java code snippets using net.java.btrace.api.extensions.ExtensionsRepository.getClassLoader (Showing top 20 results out of 315)

origin: org.gridkit.3rd.btrace/core-api

/**
 * Repository's classloader
 * @return {@linkplain ClassLoader} used to load extensions from the repository
 */
final synchronized public ClassLoader getClassLoader() {
  if (cLoader == null) {
    cLoader = getClassLoader(pLoader);
  }
  return cLoader;
}

origin: jbachorik/btrace2

/**
 * Repository's classloader
 * @return {@linkplain ClassLoader} used to load extensions from the repository
 */
final synchronized public ClassLoader getClassLoader() {
  if (cLoader == null) {
    cLoader = getClassLoader(pLoader);
  }
  return cLoader;
}

origin: jbachorik/btrace2

/**
 * Loads an extension by name
 * @param className The extension class name
 * @return The class of a loaded extension or <b>NULL</b>
 */
final public Class loadExtension(String className) {
  try {
    return getClassLoader().loadClass(className.replace('/', '.'));
  } catch (ClassNotFoundException ex) {
  }
  return null;
}
/**
origin: org.gridkit.3rd.btrace/core-api

/**
 * Loads an extension by name
 * @param className The extension class name
 * @return The class of a loaded extension or <b>NULL</b>
 */
final public Class loadExtension(String className) {
  try {
    return getClassLoader().loadClass(className.replace('/', '.'));
  } catch (ClassNotFoundException ex) {
  }
  return null;
}
/**
origin: jbachorik/btrace2

private Iterable<MBeanDecoratorImpl> listDecorators() {
  final ServiceLoader<MBeanDecoratorImpl> decoratorLoader = ServiceLoader.load(MBeanDecoratorImpl.class, repository.getClassLoader(BTraceMBeanImpl.class.getClassLoader()));
  return new IterableServiceLoader<MBeanDecoratorImpl>(decoratorLoader);
}

origin: org.gridkit.3rd.btrace/core-api

/**
 * Lists all the extensions known to the repository
 * @return A FQN list of all extensions in the repository
 */
final public Collection<String> listExtensions() {
  if (extensionsLoaded.compareAndSet(false, true)) {
    for(String svcName : ServiceLocator.listServiceNames(BTraceExtension.class, getClassLoader())) {
      enabledExtensions.add(svcName);
    }
  }
  return Collections.unmodifiableSet(enabledExtensions);
}

origin: jbachorik/btrace2

/**
 * Lists all the extensions known to the repository
 * @return A FQN list of all extensions in the repository
 */
final public Collection<String> listExtensions() {
  if (extensionsLoaded.compareAndSet(false, true)) {
    for(String svcName : ServiceLocator.listServiceNames(BTraceExtension.class, getClassLoader())) {
      enabledExtensions.add(svcName);
    }
  }
  return Collections.unmodifiableSet(enabledExtensions);
}

origin: org.gridkit.3rd.btrace/runtime

private Iterable<MBeanDecoratorImpl> listDecorators() {
  final ServiceLoader<MBeanDecoratorImpl> decoratorLoader = ServiceLoader.load(MBeanDecoratorImpl.class, repository.getClassLoader(BTraceMBeanImpl.class.getClassLoader()));
  return new IterableServiceLoader<MBeanDecoratorImpl>(decoratorLoader);
}

origin: org.gridkit.3rd.btrace/client

  protected CommandFactory newCommandFactory() {
    return CommandFactory.getInstance(extRep.getClassLoader(getMyLoader()), Command.Target.CLIENT);
  }
}
origin: org.gridkit.3rd.btrace/btrace-boot

public Server(BlockingQueue<AbstractCommand> in, BlockingQueue<AbstractCommand> out, ExtensionsRepository extRep) {
  super(in, out);
  cFactory = CommandFactory.getInstance(extRep.getClassLoader(getMyLoader()), Command.Target.SERVER);
  init();
}
origin: org.gridkit.3rd.btrace/btrace-boot

public Client(BlockingQueue<AbstractCommand> in, BlockingQueue<AbstractCommand> out, ExtensionsRepository extRep) {
  super(in, out);
  cFactory = CommandFactory.getInstance(extRep.getClassLoader(getMyLoader()), Command.Target.SERVER);
  init();
}
origin: jbachorik/btrace2

public Client(BlockingQueue<AbstractCommand> in, BlockingQueue<AbstractCommand> out, ExtensionsRepository extRep) {
  super(in, out);
  cFactory = CommandFactory.getInstance(extRep.getClassLoader(getMyLoader()), Command.Target.SERVER);
  init();
}
origin: jbachorik/btrace2

public Server(BlockingQueue<AbstractCommand> in, BlockingQueue<AbstractCommand> out, ExtensionsRepository extRep) {
  super(in, out);
  cFactory = CommandFactory.getInstance(extRep.getClassLoader(getMyLoader()), Command.Target.SERVER);
  init();
}
origin: jbachorik/btrace2

public static Channel open(Socket skt, final ExtensionsRepository extRep) {
  try {
    ObjectInputStream ois = new ObjectInputStreamEx(skt.getInputStream(), extRep.getClassLoader());
    ObjectOutput  oos = new ObjectOutputStream(skt.getOutputStream());
    ServerChannel ch = new ServerChannel(ois, oos, extRep);
    if (!ch.handshake()) {
      try {
        ch.output.close();
        ch.input.close();
      } catch (IOException e) {
      }
      return null;
    }
    return ch;
  } catch (IOException e) {
  }
  return null;
}
origin: org.gridkit.3rd.btrace/btrace-boot

public static Channel open(Socket skt, final ExtensionsRepository extRep) {
  try {
    ObjectInputStream ois = new ObjectInputStreamEx(skt.getInputStream(), extRep.getClassLoader());
    ObjectOutput  oos = new ObjectOutputStream(skt.getOutputStream());
    ServerChannel ch = new ServerChannel(ois, oos, extRep);
    if (!ch.handshake()) {
      try {
        ch.output.close();
        ch.input.close();
      } catch (IOException e) {
      }
      return null;
    }
    return ch;
  } catch (IOException e) {
  }
  return null;
}
origin: org.gridkit.3rd.btrace/client

public static Channel open(Socket skt, ExtensionsRepository extRep) {
  try {
    ObjectOutput  oos = new ObjectOutputStream(skt.getOutputStream());
    ObjectInputStream ois = new ObjectInputStreamEx(skt.getInputStream(), extRep.getClassLoader());
    
    ClientChannel ch = new ClientChannel(ois, oos, extRep);
    if (!ch.handshake()) {
      try {
        ch.output.close();
        ch.input.close();
      } catch (IOException e) {
      }
      return null;
    }
    return ch;
  } catch (IOException e) {
  }
  return null;
}
origin: jbachorik/btrace2

public static Channel open(Socket skt, ExtensionsRepository extRep) {
  try {
    ObjectOutput  oos = new ObjectOutputStream(skt.getOutputStream());
    ObjectInputStream ois = new ObjectInputStreamEx(skt.getInputStream(), extRep.getClassLoader());
    
    ClientChannel ch = new ClientChannel(ois, oos, extRep);
    if (!ch.handshake()) {
      try {
        ch.output.close();
        ch.input.close();
      } catch (IOException e) {
      }
      return null;
    }
    return ch;
  } catch (IOException e) {
  }
  return null;
}
origin: org.gridkit.3rd.btrace/client

public Client setExtRepository(ExtensionsRepository extRepository) {
  if (state.get() != State.OFFLINE) {
    BTraceLogger.debugPrint("Can not change client parameters when already attached");
    return this;
  }
  if (extRepository != this.extRepository) {
    this.extRepository = extRepository != null ? extRepository : DEFAULT_REPOSITORY;
    if (vFormatter != null) {
      commandCtx.remove(vFormatter);
    }
    vFormatter = new ValueFormatter(extRepository.getClassLoader());
    commandCtx.add(vFormatter);
  }
  return this;
}
origin: jbachorik/btrace2

public Client setExtRepository(ExtensionsRepository extRepository) {
  if (state.get() != State.OFFLINE) {
    BTraceLogger.debugPrint("Can not change client parameters when already attached");
    return this;
  }
  if (extRepository != this.extRepository) {
    this.extRepository = extRepository != null ? extRepository : DEFAULT_REPOSITORY;
    if (vFormatter != null) {
      commandCtx.remove(vFormatter);
    }
    vFormatter = new ValueFormatter(extRepository.getClassLoader());
    commandCtx.add(vFormatter);
  }
  return this;
}
origin: org.gridkit.3rd.btrace/btrace-boot

  mapper[i] = cmdClz;
CommandFactory cf = CommandFactory.getInstance(mapper, extRep.getClassLoader(getMyLoader()), Command.Target.SERVER);
List<Class<? extends AbstractCommand>> cmds  = cf.listSupportedCommands();
output.writeInt(cmds.size() - commandCnt);
net.java.btrace.api.extensionsExtensionsRepositorygetClassLoader

Javadoc

Repository's classloader

Popular methods of ExtensionsRepository

  • getClassPath
    Calculated class-path for the extension repository
  • getExtensionsPath
    Repository definition path
  • collectJars
  • getExtensionFiles
  • getExtensionURLs
    Lists the URLs of all the extensions known to the repository
  • getLocation
  • getRequestedPrivileges
  • isExtensionAvailable
    Checks for an extension availability
  • listExtensions
    Lists all the extensions known to the repository
  • loadExtension
    Loads an extension by name

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • Menu (java.awt)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now