KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > webdav > connector > WebDAVConnection


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 JavaDoc;
27 import javax.resource.cci.Connection JavaDoc;
28 import javax.resource.cci.ConnectionMetaData JavaDoc;
29 import javax.resource.cci.Interaction JavaDoc;
30 import javax.resource.cci.LocalTransaction JavaDoc;
31 import javax.resource.cci.ResultSetInfo JavaDoc;
32 import javax.resource.spi.ManagedConnection JavaDoc;
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 JavaDoc {
44
45     protected WebDAVManagedConnection mc;
46     
47     public WebDAVConnection(ManagedConnection JavaDoc 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 JavaDoc {
62         mc.close();
63     }
64
65     public Interaction JavaDoc createInteraction() throws ResourceException JavaDoc {
66         return null;
67     }
68
69     public LocalTransaction JavaDoc getLocalTransaction() throws ResourceException JavaDoc {
70         return (LocalTransaction JavaDoc)mc.getLocalTransaction();
71     }
72
73     public ConnectionMetaData JavaDoc getMetaData() throws ResourceException JavaDoc {
74         return null;
75     }
76
77     public ResultSetInfo JavaDoc getResultSetInfo() throws ResourceException JavaDoc {
78         return null;
79     }
80
81     void invalidate() {
82         mc = null;
83     }
84
85 }
86
Popular Tags