1 23 package com.sun.enterprise.web.ara; 24 25 import com.sun.enterprise.web.connector.grizzly.KeepAliveStats; 26 import com.sun.enterprise.web.connector.grizzly.SelectorThread; 27 import com.sun.enterprise.web.connector.grizzly.Task; 28 import com.sun.enterprise.web.connector.grizzly.TaskListener; 29 30 import org.apache.coyote.RequestGroupInfo; 31 32 37 public abstract class TaskWrapper implements Task { 38 39 42 protected Task wrappedTask; 43 44 45 public TaskWrapper(){} 46 47 48 50 51 54 public abstract void doTask() throws java.io.IOException ; 55 56 57 60 public abstract Task wrap(Task task); 61 62 63 66 public abstract void execute(); 67 68 69 72 public abstract void run(); 73 74 75 78 public Task getWrappedTask(){ 79 return wrappedTask; 80 } 81 83 84 public void addTaskListener(TaskListener task) { 85 wrappedTask.addTaskListener(task); 86 } 87 88 public Object call() throws Exception { 89 return wrappedTask.call(); 90 } 91 92 public void cancelTask(String message, String httpCode) { 93 wrappedTask.cancelTask(message,httpCode); 94 } 95 96 public void clearTaskListeners() { 97 wrappedTask.clearTaskListeners(); 98 } 99 100 101 public KeepAliveStats getKeepAliveStats() { 102 return wrappedTask.getKeepAliveStats(); 103 } 104 105 public boolean getRecycle() { 106 return wrappedTask.getRecycle(); 107 } 108 109 public RequestGroupInfo getRequestGroupInfo() { 110 return wrappedTask.getRequestGroupInfo(); 111 } 112 113 public java.nio.channels.SelectionKey getSelectionKey() { 114 return wrappedTask.getSelectionKey(); 115 } 116 117 public SelectorThread getSelectorThread() { 118 return wrappedTask.getSelectorThread(); 119 } 120 121 public java.util.ArrayList getTaskListeners() { 122 return wrappedTask.getTaskListeners(); 123 } 124 125 public int getType() { 126 return wrappedTask.getType(); 127 } 128 129 public boolean isMonitoringEnabled() { 130 return wrappedTask.isMonitoringEnabled(); 131 } 132 133 public void recycle() { 134 wrappedTask.recycle(); 135 } 136 137 public void removeTaskListener(TaskListener task) { 138 wrappedTask.removeTaskListener(task); 139 } 140 141 142 public void setRecycle(boolean recycle) { 143 wrappedTask.setRecycle(recycle); 144 } 145 146 public void setSelectionKey(java.nio.channels.SelectionKey key) { 147 wrappedTask.setSelectionKey(key); 148 } 149 150 public void setSelectorThread(SelectorThread selectorThread) { 151 wrappedTask.setSelectorThread(selectorThread); 152 } 153 154 } 155 | Popular Tags |