KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > vfs > webdav > methods > OPTIONS


1 /* ========================================================================== *
2  * Copyright (C) 2004-2005 Pier Fumagalli <http://www.betaversion.org/~pier/> *
3  * All rights reserved. *
4  * ========================================================================== *
5  * *
6  * Licensed under the Apache License, Version 2.0 (the "License"). You may *
7  * not use this file except in compliance with the License. You may obtain a *
8  * copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>. *
9  * *
10  * Unless required by applicable law or agreed to in writing, software *
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT *
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the *
13  * License for the specific language governing permissions and limitations *
14  * under the License. *
15  * *
16  * ========================================================================== */

17 package com.sslexplorer.vfs.webdav.methods;
18
19 import java.io.IOException JavaDoc;
20
21 import com.sslexplorer.vfs.VFSResource;
22 import com.sslexplorer.vfs.webdav.DAVMethod;
23 import com.sslexplorer.vfs.webdav.DAVProcessor;
24 import com.sslexplorer.vfs.webdav.DAVTransaction;
25
26 /**
27  * <p><a HREF="http://www.rfc-editor.org/rfc/rfc2616.txt">HTTP</a>
28  * <code>OPTIONS</code> metohd implementation.</p>
29  *
30  * @author <a HREF="http://www.betaversion.org/~pier/">Pier Fumagalli</a>
31  */

32 public class OPTIONS implements DAVMethod {
33
34     /**
35      * <p>Create a new {@link OPTIONS} instance.</p>
36      */

37     public OPTIONS() {
38         super();
39     }
40
41     /**
42      * <p>Process the <code>OPTIONS</code> method.</p>
43      */

44     public void process(DAVTransaction transaction, VFSResource resource)
45     throws IOException JavaDoc {
46         transaction.setHeader("Allow", DAVProcessor.METHODS);
47         transaction.setHeader("DAV", "1");
48         transaction.setStatus(200);
49     }
50
51 }
52
Popular Tags