1 /* 2 * $Header: /home/cvs/jakarta-slide/webdavclient/connector/src/java/org/apache/webdav/connector/WebDAVConnection.java,v 1.2 2004/07/15 12:37:36 ozeigermann Exp $ 3 * $Revision: 1.2 $ 4 * $Date: 2004/07/15 12:37:36 $ 5 * 6 * ==================================================================== 7 * 8 * Copyright 2004 The Apache Software Foundation 9 * 10 * Licensed under the Apache License, Version 2.0 (the "License"); 11 * you may not use this file except in compliance with the License. 12 * You may obtain a copy of the License at 13 * 14 * http://www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * See the License for the specific language governing permissions and 20 * limitations under the License. 21 * 22 */ 23 24 package org.apache.webdav.connector; 25 26 import javax.resource.ResourceException; 27 import javax.resource.cci.Connection; 28 import javax.resource.cci.ConnectionMetaData; 29 import javax.resource.cci.Interaction; 30 import javax.resource.cci.LocalTransaction; 31 import javax.resource.cci.ResultSetInfo; 32 import javax.resource.spi.ManagedConnection; 33 34 import org.apache.webdav.lib.WebdavResource; 35 36 /** 37 * Abstraction of a connection to a Slide (WebDAV) server. All actual requests are made via the 38 * {@link WebdavResource} the user gets with {@link #getWebdavResource()}. 39 * 40 * @version $Revision: 1.2 $ 41 * 42 */ 43 public class WebDAVConnection implements Connection { 44 45 protected WebDAVManagedConnection mc; 46 47 public WebDAVConnection(ManagedConnection mc) { 48 this.mc = (WebDAVManagedConnection) mc; 49 } 50 51 /** 52 * Returns the {@link WebdavResource} that has been associated to this WebDAV connection. All actual requests 53 * to the WebDAV server are done with this{@link WebdavResource}. 54 * 55 * @return the {@link WebdavResource} associated to this connection 56 */ 57 public WebdavResource getWebdavResource() { 58 return mc.getWebdavResource(); 59 } 60 61 public void close() throws ResourceException { 62 mc.close(); 63 } 64 65 public Interaction createInteraction() throws ResourceException { 66 return null; 67 } 68 69 public LocalTransaction getLocalTransaction() throws ResourceException { 70 return (LocalTransaction)mc.getLocalTransaction(); 71 } 72 73 public ConnectionMetaData getMetaData() throws ResourceException { 74 return null; 75 } 76 77 public ResultSetInfo getResultSetInfo() throws ResourceException { 78 return null; 79 } 80 81 void invalidate() { 82 mc = null; 83 } 84 85 } 86