org.jboss.virtual.VFS类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中org.jboss.virtual.VFS类的一些代码示例,展示了VFS类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VFS类的具体详情如下:
包路径:org.jboss.virtual.VFS
类名称:VFS

VFS介绍

暂无

代码示例

代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata

/**
* Get the virtual file.
* Create file from root url and path if it doesn't exist yet.
*
* @return virtual file root
* @throws IOException for any error
*/
@SuppressWarnings("deprecation")
protected VirtualFile getFile() throws IOException
{
 if (file == null)
 {
   VirtualFile root = VFS.getRoot(rootUrl);
   file = root.findChild(path);
 }
 return file;
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-jbossas-remote-51

private void initDeploymentManager() throws Exception 
{
 String profileName = configuration.getProfileName();
 InitialContext ctx = new InitialContext();
 ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
 deploymentManager = ps.getDeploymentManager();
 ProfileKey defaultKey = new ProfileKey(profileName);
 deploymentManager.loadProfile(defaultKey);
 VFS.init();
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss500Beta4

private org.jboss.deployers.client.spi.Deployment createDeploymentContext(URL warURL) throws Exception
  {
   VirtualFile file = VFS.getRoot(warURL);
   return VFSDeploymentFactory.getInstance().createVFSDeployment(file);
  }
}

代码示例来源:origin: arquillian/arquillian_deprecated

private void initDeploymentManager() throws Exception 
{
 String profileName = configuration.getProfileName();
 InitialContext ctx = createContext();
 profileService = (ProfileService) ctx.lookup("ProfileService");
 deploymentManager = profileService.getDeploymentManager();
 ProfileKey defaultKey = new ProfileKey(profileName);
 deploymentManager.loadProfile(defaultKey);
 VFS.init();
}

代码示例来源:origin: org.graniteds/granite-server

VirtualFile top = VFS.getRoot(vfsurl);
top = top.getChild(relative);
while (parentDepth > 0) {

代码示例来源:origin: arquillian/arquillian_deprecated

private void initDeploymentManager() throws Exception 
{
 String profileName = configuration.getProfileName();
 InitialContext ctx = createContext();
 profileService = (ProfileService) ctx.lookup("ProfileService");
 deploymentManager = profileService.getDeploymentManager();
 ProfileKey defaultKey = new ProfileKey(profileName);
 deploymentManager.loadProfile(defaultKey, false);
 VFS.init();
}

代码示例来源:origin: org.jboss.jsfunit/jboss-jsfunit-microdeployer

private void addClasspaths(VFSDeploymentUnit unit) throws MalformedURLException
{
 if (classpathUrls == null) return;
 
 for (String testUrl : classpathUrls)
 {
   testUrl = StringPropertyReplacer.replaceProperties(testUrl);
   URL url = new URL(testUrl);
      try
   {
    VirtualFile vFile = VFS.getRoot(url);
    unit.addClassPath(vFile);
    
    // add jar files if url is a directory
    if (!vFile.isLeaf())
    { 
      for (VirtualFile jarFile : vFile.getChildrenRecursively(JAR_FILTER))
      {
       unit.addClassPath(jarFile);
      }
    }
   }
   catch (IOException e)
   {
    log.warn("Unable to add URL to classpath: " + url.toString());
   }
 }
}

代码示例来源:origin: org.jboss.microcontainer/jboss-deployers-vfs

@Override
protected ProtectionDomain getProtectionDomain(String className, String path)
{
 VirtualFile clazz = findChild(path);
 if (clazz == null)
 {
   log.trace("Unable to determine class file for " + className);
   return null;
 }
 try
 {
   VirtualFile root = clazz.getVFS().getRoot();
   URL codeSourceURL = root.toURL();
   Certificate[] certs = null; // TODO JBMICROCONT-182 determine certificates
   CodeSource cs = new CodeSource(codeSourceURL, certs);
   PermissionCollection permissions = Policy.getPolicy().getPermissions(cs);
   return new ProtectionDomain(cs, permissions);
 }
 catch (Exception e)
 {
   throw new Error("Error determining protection domain for " + clazz, e);
 }
}

代码示例来源:origin: org.graniteds/granite-server

VirtualFile markerFile = VFS.getRoot(markerUrl);
markerItem = new VFSFileScannedItem(this, null, markerFile, markerFile);
for (ScannedItemHandler handler : handlers) {

代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata

private void writeObject(ObjectOutputStream out) throws IOException, URISyntaxException
{
 URL url = rootUrl;
 if (url == null)
 {
   VFS vfs = getFile().getVFS();
   url = vfs.getRoot().toURL();
 }
 String pathName = path;
 if (pathName == null)
   pathName = getFile().getPathName();
 ObjectOutputStream.PutField fields = out.putFields();
 fields.put("rootUrl", url);
 fields.put("path", pathName);
 out.writeFields();
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510

uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));

代码示例来源:origin: org.jboss.ws/jbossws-jboss600M2

uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));

相关文章