Package org.w3c.tools.resources

Examples of org.w3c.tools.resources.Resource


     * within context.
     * @deprecated since jsdk2.1
     */
    public Enumeration getServletNames() {
  try {
      Resource res = reference.lock();
      return ((ServletDirectoryFrame)res).getServletNames();
  } catch(InvalidResourceException ex) {
      ex.printStackTrace();
      return null;
  } finally {
View Full Code Here


     * ServletContext implementation - Get server informations.
     */

    public String getServerInfo() {
  try {
      Resource res = reference.lock();
      return ((ServletDirectoryFrame)res).getServerInfo();
  } catch(InvalidResourceException ex) {
      ex.printStackTrace();
      return null;
  } finally {
View Full Code Here

  Object attribute = attributes.get(name);
  if (attribute != null) {
      return attribute;
  } else {
      try {
    Resource res = reference.lock();
    return ((ServletDirectoryFrame)res).getAttribute(name);
      } catch(InvalidResourceException ex) {
    ex.printStackTrace();
    return null;
      } finally {
View Full Code Here

      r_target = null;
  }
  //then return its context
  if (r_target != null) {
      try {
    Resource target = r_target.lock();
    if (target instanceof FramedResource) {
        ServletDirectoryFrame frame = (ServletDirectoryFrame)
      ((FramedResource) target).
          getFrame("org.w3c.jigsaw.servlet.ServletDirectoryFrame");
        if (frame != null)
View Full Code Here

  this.loader     = new AutoReloadServletLoader(this);

  props.registerObserver(this);

  try {
      Resource res = reference.lock();
      if (! (res instanceof ServletDirectoryFrame)) {
    throw new IllegalArgumentException("This reference is not "+
              "pointing on a ServletDirectoryFrame.");
      } else {
    ServletDirectoryFrame sframe = (ServletDirectoryFrame)res;
View Full Code Here

      LookupResult  lr  = new LookupResult(root.getResourceReference());
      if (root.lookup(ls,lr)) {
    ResourceReference  target = lr.getTarget();
    if (target != null) {
        try {
      Resource res = target.lock();
      if (res instanceof CheckpointResource) {
          ((CheckpointResource) res).activate();
          errlog("Chekpointer started at: "+new Date()+".");
      } else {
          errlog("The chekpointer url ("+checkurl+
View Full Code Here

  if (! path.startsWith("/")) {
      String uri = null;
      try {
    ResourceReference rrp = rr.lock().getParent();
    try {
        Resource r = rrp.lock();
        uri = r.getURLPath();
    } catch (InvalidResourceException irex) {
        return null;
    } finally {
        rrp.unlock();
    }
View Full Code Here

    public Servlet getServlet(String name) {
  if (dresource != null) {
      ResourceReference rr = dresource.lookup(name);
      if (rr != null) {
    try {
        Resource resource = rr.lock();
        if (resource instanceof ServletWrapper)
      return ((ServletWrapper) resource).getServlet();
    } catch (InvalidResourceException ex) {
        return null;
    } finally {
View Full Code Here

    public boolean isServletLoaded(String name) {
  if (dresource != null) {
      ResourceReference rr = dresource.lookup(name);
      if (rr != null) {
    try {
        Resource resource = rr.lock();
        if (resource instanceof ServletWrapper)
      return ((ServletWrapper) resource).isServletLoaded();
    } catch (InvalidResourceException ex) {
        return false;
    } finally {
View Full Code Here

    protected void writeResource(Resource resource, OutputStream out)
  throws IOException, AdminProtocolException
    {
  try {
      Resource resources[] = { resource };
      Writer writer = new OutputStreamWriter( out, "UTF-8" );
      serializer.writeResourceDescriptions(resources, writer);
  } catch (SerializationException ex) {
      throw new AdminProtocolException("Unable to serialize resource :"+
               ex.getMessage());
View Full Code Here

TOP

Related Classes of org.w3c.tools.resources.Resource

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.