1 /**********************************************************************
2 * BaseAdapter.java
3 * created on 01.08.2006 by netseeker
4 * $Id: BaseAdapter.java,v 1.7 2006/11/05 16:33:37 netseeker Exp $
5 * $Log: BaseAdapter.java,v $
6 * Revision 1.7 2006/11/05 16:33:37 netseeker
7 * changed adapter connection handling
8 * added support for JSON with different JSON-adapters (XStream,JSON-lib,MyJSON)
9 *
10 * Revision 1.6 2006/08/09 20:13:54 netseeker
11 * *** empty log message ***
12 *
13 * Revision 1.5 2006/08/07 19:53:12 netseeker
14 * *** empty log message ***
15 *
16 * Revision 1.4 2006/08/02 23:04:15 netseeker
17 * *** empty log message ***
18 *
19 * Revision 1.3 2006/07/31 23:31:15 netseeker
20 * *** empty log message ***
21 *
22 *
23 * ====================================================================
24 *
25 * Copyright 2005-2006 netseeker aka Michael Manske
26 *
27 * Licensed under the Apache License, Version 2.0 (the "License");
28 * you may not use this file except in compliance with the License.
29 * You may obtain a copy of the License at
30 *
31 * http://www.apache.org/licenses/LICENSE-2.0
32 *
33 * Unless required by applicable law or agreed to in writing, software
34 * distributed under the License is distributed on an "AS IS" BASIS,
35 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36 * See the License for the specific language governing permissions and
37 * limitations under the License.
38 * ====================================================================
39 *
40 * This file is part of the EJOE framework.
41 * For more information on the author, please see
42 * <http://www.manskes.de/>.
43 *
44 *********************************************************************/
45 package de.netseeker.ejoe.adapter;
46
47 import de.netseeker.ejoe.EJConstants;
48
49 /***
50 * Abstract base class for SerializeAdapter implementations. This class provides default settings for
51 * {@link SerializeAdapter#handleClassLoaderChange(ClassLoader)}, {@link SerializeAdapter#isSelfBuffered()} and
52 * {@link SerializeAdapter#requiresCustomEOFHandling()}
53 *
54 * @author netseeker
55 * @since 0.3.9.1
56 */
57 public abstract class BaseAdapter implements SerializeAdapter
58 {
59
60
61
62
63
64
65 public void handleClassLoaderChange( ClassLoader classLoader )
66 {
67 }
68
69
70
71
72
73
74 public boolean isSelfBuffered()
75 {
76 return false;
77 }
78
79
80
81
82
83
84 public boolean requiresCustomEOFHandling()
85 {
86 return false;
87 }
88
89
90
91
92 public String getContentType()
93 {
94 return EJConstants.HTTP_DEFAULT_CONTENTTYPE;
95 }
96 }