1 2 3 27 package org.apache.tomcat.util.handler; 28 29 import java.io.*; 30 import java.util.*; 31 import java.security.*; 32 33 34 49 public abstract class TcHandler { 50 public static final int OK=0; 51 public static final int LAST=1; 52 public static final int ERROR=2; 53 54 protected Hashtable attributes=new Hashtable(); 55 protected TcHandler next; 56 protected String name; 57 protected int id; 58 59 61 64 public void setName(String s ) { 65 name=s; 66 } 67 68 public String getName() { 69 return name; 70 } 71 72 75 public void setId( int id ) { 76 this.id=id; 77 } 78 79 public int getId() { 80 return id; 81 } 82 83 86 public void setNext( TcHandler h ) { 87 next=h; 88 } 89 90 91 95 public void setAttribute( String name, Object value ) { 96 attributes.put( name, value ); 97 } 98 99 102 public Object getAttribute( String name ) { 103 return attributes.get(name) ; 104 } 105 106 108 111 public void init() throws IOException { 112 } 113 114 116 public void destroy() throws IOException { 117 } 118 119 public void start() throws IOException { 120 } 121 122 public void stop() throws IOException { 123 } 124 125 127 135 public abstract int invoke(TcHandlerCtx tcCtx) throws IOException; 136 137 138 139 } 140 | Popular Tags |