boolean isMatchAfter, String... servletNames);
/**
*
- * @return
+ * @return TODO
*/
public Collection<String> getServletNameMappings();
/**
*
- * @return
+ * @return TODO
*/
public Collection<String> getUrlPatternMappings();
*
* @param name
* @param value
- * @return
+ * @return TODO
* @throws IllegalArgumentException
* @throws IllegalStateException
*/
/**
*
* @param initParameters
- * @return
+ * @return TODO
* @throws IllegalArgumentException
* @throws IllegalStateException
*/
public int getMinorVersion();
/**
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public int getEffectiveMajorVersion();
/**
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
/**
* @param name
* @param value
- * @return
+ * @return TODO
* @throws IllegalStateException
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* @param servletName
* @param className
+ * @return TODO
* @throws IllegalStateException
* If the context has already been initialised
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* @param servletName
* @param servlet
+ * @return TODO
* @throws IllegalStateException
* If the context has already been initialised
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* @param servletName
* @param servletClass
+ * @return TODO
* @throws IllegalStateException
* If the context has already been initialised
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* @param c
- * @return
+ * @return TODO
* @throws ServletException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
/**
* @param servletName
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public ServletRegistration getServletRegistration(String servletName);
/**
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
/**
* @param filterName
* @param className
+ * @return TODO
* @throws IllegalStateException
* If the context has already been initialised
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* @param filterName
* @param filter
+ * @return TODO
* @throws IllegalStateException
* If the context has already been initialised
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* @param filterName
* @param filterClass
+ * @return TODO
* @throws IllegalStateException
* If the context has already been initialised
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* @param c
- * @return
+ * @return TODO
* @throws ServletException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
/**
* @param filterName
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public FilterRegistration getFilterRegistration(String filterName);
/**
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public Map<String, ? extends FilterRegistration> getFilterRegistrations();
/**
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
throws IllegalStateException, IllegalArgumentException;
/**
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public Set<SessionTrackingMode> getDefaultSessionTrackingModes();
/**
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public Set<SessionTrackingMode> getEffectiveSessionTrackingModes();
/**
* @param <T>
* @param t
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public <T extends EventListener> void addListener(T t);
/**
* @param <T>
* @param c
- * @return
+ * @return TODO
* @throws ServletException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public void declareRoles(String... roleNames);
/**
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @throws SecurityException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
public ClassLoader getClassLoader();
/**
- * @return
+ * @return TODO
* @throws UnsupportedOperationException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
/**
*
* @param urlPatterns
- * @return
+ * @return TODO
* @throws IllegalArgumentException if urlPattern is null or empty
* @throws IllegalStateException if the associated ServletContext has
* already been initialised
public int getLocalPort();
/**
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public ServletContext getServletContext();
/**
- * @return
+ * @return TODO
* @throws java.lang.IllegalStateException
* If async is not supported for this request
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* @param servletRequest
* @param servletResponse
- * @return
+ * @return TODO
* @throws java.lang.IllegalStateException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
ServletResponse servletResponse);
/**
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public boolean isAsyncStarted();
/**
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public boolean isAsyncSupported();
/**
- * @return
+ * @return TODO
* @throws java.lang.IllegalStateException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public AsyncContext getAsyncContext();
/**
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public DispatcherType getDispatcherType();
/**
* @param response
- * @return
+ * @return TODO
* @throws IOException
* @throws ServletException
* @since Servlet 3.0 TODO SERVLET3 - Add comments
/**
* Return a collection of all uploaded Parts.
*
- * @return
+ * @return A collection of all uploaded Parts.
* @throws IOException
* if an I/O error occurs
* @throws IllegalStateException
* of all Parts.
*
* @param name
- * @return
+ * @return The named Part or null if the Part does not exist
* @throws IOException
* if an I/O error occurs
* @throws IllegalStateException
public void setStatus(int sc, String sm);
/**
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public int getStatus();
/**
* @param name
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public String getHeader(String name);
/**
* @param name
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public Collection<String> getHeaders(String name);
/**
- * @return
+ * @return TODO
* @since Servlet 3.0 TODO SERVLET3 - Add comments
*/
public Collection<String> getHeaderNames();
/**
* Is this Context paused whilst it is reloaded?
- *
- * @return
*/
public boolean getPaused();
/**
* Returns true if the Host will attempt to create directories for appBase and xmlBase
* unless they already exist.
- * @return
*/
public boolean getCreateDirs() {
return createDirs;
* can be <code>null</code>
* @param separator
* can be <code>null</code>
- * @return
*/
protected static String substringBefore(String str, String separator) {
if (str == null || str.isEmpty() || separator == null) {
/**
* @param name
* @param manager
- * @return
+ * @return TODO
*/
public String getManagerName(String name, Manager manager) {
String clusterName = name ;
* @author Glenn L. Nielsen
* @author Peter Rossbach
* @version $Id$
-* @see ManagerServlet
+* @see org.apache.catalina.manager.ManagerServlet
*/
public final class HTMLHostManagerServlet extends HostManagerServlet {
/**
* Remove the specified host.
*
- * @param writer Writer to render results to
* @param name host name
*/
protected String remove(String name) {
/**
- * extract boolean value from checkbox with default
+ * Extract boolean value from checkbox with default.
* @param request
* @param parameter
* @param theDefault
* @param htmlMode
- * @return
*/
protected boolean booleanParameter(HttpServletRequest request,
String parameter, boolean theDefault, boolean htmlMode) {
* @param deployOnStartup Deploy on server startup?
* @param deployXML Should we deploy Context XML config files property?
* @param unpackWARs Should we unpack WARs when auto deploying?
- * @param xmlNamespaceAware Should we turn on/off XML namespace awareness?
- * @param xmlValidation Should we turn on/off XML validation?
*
* @exception Exception if an MBean cannot be created or registered
*/
* Service.
*
* @param service
- * @return
*/
public static String getDomain(Service service) {
* Container.
*
* @param container
- * @return
*/
public static String getDomain(Container container) {
*
* @exception NamingException if a directory server error occurs
*
- * @see #getUser(DirContext, String, int)
+ * @see #getUser(DirContext, String, String, int)
*/
protected User getUser(DirContext context, String username, String credentials)
throws NamingException {
*
* @param request The servlet request we are processing
* @param response The servlet response we are creating
- * @param resourceInfo File object
+ * @param resourceAttributes File object
* @return boolean true if the resource meets the specified condition,
* and false if the condition is not satisfied, in which case request
* processing is stopped
*
* @param request The servlet request we are processing
* @param response The servlet response we are creating
- * @param resourceInfo File object
+ * @param resourceAttributes File object
* @return boolean true if the resource meets the specified condition,
* and false if the condition is not satisfied, in which case request
* processing is stopped
*
* @param request The servlet request we are processing
* @param response The servlet response we are creating
- * @param resourceInfo File object
+ * @param resourceAttributes File object
* @return boolean true if the resource meets the specified condition,
* and false if the condition is not satisfied, in which case request
* processing is stopped
*
* @param request The servlet request we are processing
* @param response The servlet response we are creating
- * @param resourceInfo File object
+ * @param resourceAttributes File object
* @return boolean true if the resource meets the specified condition,
* and false if the condition is not satisfied, in which case request
* processing is stopped
* output stream, and ensure that both streams are closed before returning
* (even in the face of an exception).
*
- * @param resourceInfo The resource information
+ * @param cacheEntry The cache entry for the source resource
+ * @param is The input stream to read the source resource from
* @param ostream The output stream to write to
*
* @exception IOException if an input/output error occurs
* output stream, and ensure that both streams are closed before returning
* (even in the face of an exception).
*
- * @param resourceInfo The resource info
+ * @param cacheEntry The cache entry for the source resource
+ * @param is The input stream to read the source resource from
* @param writer The writer to write to
*
* @exception IOException if an input/output error occurs
* output stream, and ensure that both streams are closed before returning
* (even in the face of an exception).
*
- * @param resourceInfo The ResourceInfo object
+ * @param cacheEntry The cache entry for the source resource
* @param ostream The output stream to write to
* @param range Range the client wanted to retrieve
* @exception IOException if an input/output error occurs
* output stream, and ensure that both streams are closed before returning
* (even in the face of an exception).
*
- * @param resourceInfo The ResourceInfo object
+ * @param cacheEntry The cache entry for the source resource
* @param writer The writer to write to
* @param range Range the client wanted to retrieve
* @exception IOException if an input/output error occurs
* output stream, and ensure that both streams are closed before returning
* (even in the face of an exception).
*
- * @param resourceInfo The ResourceInfo object
+ * @param cacheEntry The cache entry for the source resource
* @param ostream The output stream to write to
* @param ranges Enumeration of the ranges the client wanted to retrieve
* @param contentType Content type of the resource
* output stream, and ensure that both streams are closed before returning
* (even in the face of an exception).
*
- * @param resourceInfo The ResourceInfo object
+ * @param cacheEntry The cache entry for the source resource
* @param writer The writer to write to
* @param ranges Enumeration of the ranges the client wanted to retrieve
* @param contentType Content type of the resource
* @param filename Name of the file (possibly with one or more leading path
* segments) to read
* @param path Location that filename is relative to
- * @return
*/
protected InputSource getWebXmlSource(String filename, String path) {
File file = new File(filename);
* To initiate a normal shutdown, call the <code>stop()</code> method of
* this object.
* <p>
- * @see org.apache.catalina.startup.Catalina#main For a complete example
+ * @see org.apache.catalina.startup.Bootstrap#main For a complete example
* of how Tomcat is set up and launched as an Embedded application.
*
* @author Craig R. McClanahan
* see setters for doc. It can be used for simple tests and
* demo.
*
- * @see TestTomcat for examples on how to use this
+ * @see <a href="http://svn.apache.org/repos/asf/tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java">TestTomcat</a>
* @author Costin Manolache
*/
public class Tomcat {
}
/**
- * @todo Fix to create an automatically growing buffer.
+ * TODO Fix to create an automatically growing buffer.
* @param data byte[]
* @return byte[]
* @throws IOException
* @throws IOException if an I/O error occurs. In particular, an
* <code>IOException</code> may be thrown if the output stream has
* been closed.
- * @todo Implement this java.io.OutputStream method
+ * TODO Implement this java.io.OutputStream method
*/
@Override
public void write(int b) throws IOException {
* Send buffer to cluster listener (callback).
* Is message complete receiver send message to callback?
*
- * @see org.apache.catalina.tribes.transport.ClusterReceiverBase#messageDataReceived(ChannelMessage)
+ * @see org.apache.catalina.tribes.transport.ReceiverBase#messageDataReceived(ChannelMessage)
* @see XByteBuffer#doesPackageExist()
* @see XByteBuffer#extractPackage(boolean)
*
/**
* Constructs a new XByteBuffer
* @param size - the initial size of the byte buffer
- * @todo use a pool of byte[] for performance
+ * TODO use a pool of byte[] for performance
*/
public XByteBuffer(int size, boolean discard) {
buf = new byte[size];
}
/**
- * @todo implement state transfer
+ * TODO implement state transfer
* @param msg Serializable
* @return Serializable - null if no reply should be sent
*/
*
* <br><br><b>REMBER TO CALL <code>breakdown()</code> or <code>finalize()</code> when you are done with the map to
* avoid memory leaks.<br><br>
- * @todo implement periodic sync/transfer thread
+ * TODO implement periodic sync/transfer thread
* @author Filip Hanik
* @version 1.0
*/
*
* <br><br><b>REMBER TO CALL <code>breakdown()</code> or <code>finalize()</code> when you are done with the map to
* avoid memory leaks.<br><br>
- * @todo implement periodic sync/transfer thread
+ * TODO implement periodic sync/transfer thread
* @author Filip Hanik
* @version 1.0
*
- * @todo memberDisappeared, should do nothing except change map membership
+ * TODO memberDisappeared, should do nothing except change map membership
* by default it relocates the primary objects
*/
public class ReplicatedMap extends AbstractReplicatedMap {
* connect
*
* @throws IOException
- * @todo Implement this org.apache.catalina.tribes.transport.DataSender method
+ * TODO Implement this org.apache.catalina.tribes.transport.DataSender method
*/
public abstract void connect() throws IOException;
/**
* disconnect
*
- * @todo Implement this org.apache.catalina.tribes.transport.DataSender method
+ * TODO Implement this org.apache.catalina.tribes.transport.DataSender method
*/
public abstract void disconnect();
* keepalive
*
* @return boolean
- * @todo Implement this org.apache.catalina.tribes.transport.DataSender method
+ * TODO Implement this org.apache.catalina.tribes.transport.DataSender method
*/
public boolean keepalive() {
boolean disconnect = false;
* getMessageListener
*
* @return MessageListener
- * @todo Implement this org.apache.catalina.tribes.ChannelReceiver method
+ * TODO Implement this org.apache.catalina.tribes.ChannelReceiver method
*/
public MessageListener getMessageListener() {
return listener;
/**
*
* @return The port
- * @todo Implement this org.apache.catalina.tribes.ChannelReceiver method
+ * TODO Implement this org.apache.catalina.tribes.ChannelReceiver method
*/
public int getPort() {
return port;
* setMessageListener
*
* @param listener MessageListener
- * @todo Implement this org.apache.catalina.tribes.ChannelReceiver method
+ * TODO Implement this org.apache.catalina.tribes.ChannelReceiver method
*/
public void setMessageListener(MessageListener listener) {
this.listener = listener;
* @param socket
* @param portstart
* @param retries
- * @return
+ * @return int
* @throws IOException
*/
protected int bindUdp(DatagramSocket socket, int portstart, int retries) throws IOException {
/**
* Send data to one member
- * @see org.apache.catalina.tribes.ClusterSender#sendMessage(org.apache.catalina.tribes.ClusterMessage, org.apache.catalina.tribes.Member)
+ * @see org.apache.catalina.tribes.ChannelSender#sendMessage(org.apache.catalina.tribes.ChannelMessage, org.apache.catalina.tribes.Member[])
*/
public void sendMessage(ChannelMessage message, Member[] destination) throws ChannelException {
MultiPointSender sender = getTransport();
/**
* start the sender and register transmitter mbean
*
- * @see org.apache.catalina.tribes.ClusterSender#start()
+ * @see org.apache.catalina.tribes.ChannelSender#start()
*/
public void start() throws java.io.IOException {
getTransport().connect();
}
- /*
+ /**
* stop the sender and deregister mbeans (transmitter, senders)
*
- * @see org.apache.catalina.tribes.ClusterSender#stop()
+ * @see org.apache.catalina.tribes.ChannelSender#stop()
*/
public synchronized void stop() {
getTransport().disconnect();
/**
* Call transmitter to check for sender socket status
*
- * @see SimpleTcpCluster#backgroundProcess()
+ * @see org.apache.catalina.ha.tcp.SimpleTcpCluster#backgroundProcess()
*/
-
+ @Override
public void heartbeat() {
if (getTransport()!=null) getTransport().keepalive();
}
* add new cluster member and create sender ( s. replicationMode) transfer
* current properties to sender
*
- * @see org.apache.catalina.tribes.ClusterSender#add(org.apache.catalina.tribes.Member)
+ * @see org.apache.catalina.tribes.ChannelSender#add(org.apache.catalina.tribes.Member)
*/
public synchronized void add(Member member) {
getTransport().add(member);
/**
* remove sender from transmitter. ( deregister mbean and disconnect sender )
*
- * @see org.apache.catalina.tribes.ClusterSender#remove(org.apache.catalina.tribes.Member)
+ * @see org.apache.catalina.tribes.ChannelSender#remove(org.apache.catalina.tribes.Member)
*/
public synchronized void remove(Member member) {
getTransport().remove(member);
/**
*
* @throws IOException
- * @todo Implement this org.apache.catalina.tribes.ChannelReceiver method
+ * TODO Implement this org.apache.catalina.tribes.ChannelReceiver method
*/
@Override
public void start() throws IOException {
/**
*
- * @todo Implement this org.apache.catalina.tribes.ChannelReceiver method
+ * TODO Implement this org.apache.catalina.tribes.ChannelReceiver method
*/
@Override
public void stop() {
/**
* send a reply-acknowledgment (6,2,3)
- * @param key
- * @param channel
+ * @param command
*/
protected void sendAck(byte[] command) {
try {
import org.apache.catalina.tribes.io.XByteBuffer;
import org.apache.catalina.tribes.transport.AbstractSender;
import org.apache.catalina.tribes.transport.Constants;
-import org.apache.catalina.tribes.transport.DataSender;
import org.apache.catalina.tribes.transport.SenderState;
import org.apache.catalina.tribes.util.StringManager;
/**
* Connect other cluster member receiver
- * @see org.apache.catalina.tribes.transport.IDataSender#connect()
+ * @see org.apache.catalina.tribes.transport.DataSender#connect()
*/
@Override
public void connect() throws IOException {
/**
* disconnect and close socket
*
- * @see IDataSender#disconnect()
+ * @see org.apache.catalina.tribes.transport.DataSender#disconnect()
*/
@Override
public void disconnect() {
}
/**
- * Send message
- *
- * @see org.apache.catalina.tribes.transport.IDataSender#sendMessage(,
- * ChannelMessage)
+ * Send message.
*/
public void sendMessage(byte[] data, boolean waitForAck) throws IOException {
IOException exception = null;
}
/**
- * close socket
+ * Close socket.
*
- * @see DataSender#disconnect()
- * @see DataSender#closeSocket()
+ * @see #disconnect()
*/
protected void closeSocket() {
if(isConnected()) {
*
* @see #closeSocket()
* @see #openSocket()
- * @see #writeData(ChannelMessage)
+ * @see #sendMessage(byte[], boolean)
*
* @param data
* data to send
}
/**
- * Wait for Acknowledgment from other server
+ * Wait for Acknowledgement from other server.
* FIXME Please, not wait only for three characters, better control that the wait ack message is correct.
- * @param timeout
* @throws java.io.IOException
* @throws java.net.SocketTimeoutException
*/
protected HashMap<Member, BioSender> bioSenders =
new HashMap<Member, BioSender>();
+ @Override
public synchronized void sendMessage(Member[] destination, ChannelMessage msg) throws ChannelException {
byte[] data = XByteBuffer.createDataPackage((ChannelData)msg);
BioSender[] senders = setupForSend(destination);
* getNewDataSender
*
* @return DataSender
- * @todo Implement this org.apache.catalina.tribes.transport.PooledSender
+ * TODO Implement this org.apache.catalina.tribes.transport.PooledSender
* method
*/
@Override
lock.setRemoveWaitTimeout(removeWaitTimeout);
}
- /**
- * get Max Queue length
- *
- * @see org.apache.catalina.tribes.util.IQueue#getMaxQueueLength()
- */
public int getMaxQueueLength() {
return maxQueueLength;
}
}
/**
- * Add new data to the queue
- * @see org.apache.catalina.tribes.util.IQueue#add(java.lang.String, java.lang.Object)
+ * Add new data to the queue.
+ *
* FIXME extract some method
*/
public boolean add(ChannelMessage msg, Member[] destination, InterceptorPayload payload) {
}
/**
- * remove the complete queued object list
- * @see org.apache.catalina.tribes.util.IQueue#remove()
+ * Remove the complete queued object list.
* FIXME extract some method
*/
public LinkObject remove() {
/**
* start cluster receiver
* @throws IOException
- * @see org.apache.catalina.tribes.ClusterReceiver#start()
+ * @see org.apache.catalina.tribes.ChannelReceiver#start()
*/
@Override
public void start() throws IOException {
/**
* Close Selector.
*
- * @see org.apache.catalina.tribes.transport.ClusterReceiverBase#stopListening()
+ * @see org.apache.catalina.tribes.transport.ReceiverBase#stop()
*/
protected void stopListening() {
setListen(false);
* connect - blocking in this operation
*
* @throws IOException
- * @todo Implement this org.apache.catalina.tribes.transport.IDataSender method
+ * TODO Implement this org.apache.catalina.tribes.transport.IDataSender method
*/
@Override
public synchronized void connect() throws IOException {
/**
* disconnect
*
- * @todo Implement this org.apache.catalina.tribes.transport.IDataSender method
+ * TODO Implement this org.apache.catalina.tribes.transport.IDataSender method
*/
@Override
public void disconnect() {
*
* @param data ChannelMessage
* @throws IOException
- * @todo Implement this org.apache.catalina.tribes.transport.IDataSender method
+ * TODO Implement this org.apache.catalina.tribes.transport.IDataSender method
*/
public synchronized void setMessage(byte[] data) throws IOException {
setMessage(data,0,data.length);
*/
public static final ActionCode ACTION_ASYNC_COMPLETE = new ActionCode(27);
/**
- * Callback for an async call to {@link javax.servlet.ServletRequest#setAsyncTimeout(long)}
+ * Callback for an async call to {@link javax.servlet.AsyncContext#setTimeout(long)}
*/
public static final ActionCode ACTION_ASYNC_SETTIMEOUT = new ActionCode(28);
public interface OutputBuffer {
- /** Write the response. The caller ( tomcat ) owns the chunks.
+ /**
+ * Write the response. The caller ( tomcat ) owns the chunks.
*
* @param chunk data to write
* @param response used to allow buffers that can be shared by multiple responses.
- * @return
* @throws IOException
*/
public int doWrite(ByteChunk chunk, Response response)
/**
* Set the socket buffer flag.
- * @Override
*/
@Override
public void setSocketBuffer(int socketBuffer) {
* @param flip boolean
* @return int
* @throws IOException
- * @todo Fix non blocking write properly
+ * TODO Fix non blocking write properly
*/
private synchronized int writeToSocket(ByteBuffer bytebuffer, boolean block, boolean flip) throws IOException {
if ( flip ) bytebuffer.flip();
}
}
- /**
- * @param obj
- * @param type
- * @return
- */
public final static Enum<?> coerceToEnum(final Object obj, Class type) {
if (obj == null || "".equals(obj)) {
return null;
byte.class, char.class, double.class, float.class, int.class,
long.class, short.class, Void.TYPE };
- /**
- *
- */
private ReflectionUtil() {
super();
}
/**
* Converts an array of Class names to Class types
* @param s
- * @return
* @throws ClassNotFoundException
*/
public static Class<?>[] toTypeArray(String[] s) throws ClassNotFoundException {
/**
* Converts an array of Class types to Class names
* @param c
- * @return
*/
public static String[] toTypeNameArray(Class<?>[] c) {
if (c == null)
return null;
}
- /**
- * @param base
- * @param property
- * @return
- * @throws ELException
- * @throws PropertyNotFoundException
- */
public static PropertyDescriptor getPropertyDescriptor(Object base,
Object property) throws ELException, PropertyNotFoundException {
String name = ELSupport.coerceToString(property);
* 'int[]' -> 'int[].class'
*
* @param type
- * @return
*/
public static String toJavaSourceTypeFromTld(String type) {
if (type == null || "void".equals(type)) {
*/
public interface Constants {
- /** One of the access flags for fields, methods, or classes.
- * @see #ACC_PUBLIC
+ /** One of the access flags for fields, methods, or classes.
*/
public final static short ACC_FINAL = 0x0010;
/** One of the access flags for fields, methods, or classes.
- * @see #ACC_PUBLIC
*/
public final static short ACC_INTERFACE = 0x0200;
/** One of the access flags for fields, methods, or classes.
- * @see #ACC_PUBLIC
*/
public final static short ACC_ABSTRACT = 0x0400;
/** One of the access flags for fields, methods, or classes.
- * @see #ACC_PUBLIC
*/
public final static short ACC_ENUM = 0x4000;
// Applies to classes compiled by new compilers only
/** One of the access flags for fields, methods, or classes.
- * @see #ACC_PUBLIC
*/
public final static short ACC_SUPER = 0x0020;
/** One of the access flags for fields, methods, or classes.
- * @see #ACC_PUBLIC
*/
public final static short MAX_ACC_FLAG = ACC_ENUM;
* @param file
* @param constant_pool
* @param isRuntimeVisible
- * @return
* @throws IOException
*/
public static AnnotationEntry read(DataInputStream file, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException {
@return The user-defined AttributeReader should take this data and use
it to construct an attribute. In the case of errors, a null can be
returned which will cause the parsing of the class file to fail.
-
- @see Attribute#addAttributeReader( String, AttributeReader )
*/
public Attribute createAttribute( int name_index, int length, java.io.DataInputStream file,
ConstantPool constant_pool );
* @param fields Class fields
* @param methods Class methods
* @param attributes Class attributes
- * @param source Read from file or generated in memory?
*/
public JavaClass(int class_name_index, int superclass_name_index, String file_name, int major,
int minor, int access_flags, ConstantPool constant_pool, int[] interfaces,
* @param bytes The byte array to search
* @param start The point to start searching from in the byte array
* @param end The point to stop searching in the byte array
- * @param c The list of bytes to search for
+ * @param b The list of bytes to search for
* @return The position of the first instance a byte that is not
* in the list of bytes to search for or -1 if no such byte
* is found.
* <code>multipart/form-data</code> POST request.
*
* <p> After retrieving an instance of this class from a {@link
- * org.apache.commons.fileupload.FileUpload FileUpload} instance (see
- * {@link org.apache.commons.fileupload.FileUpload
+ * org.apache.tomcat.util.http.fileupload.FileUpload FileUpload} instance (see
+ * {@link org.apache.tomcat.util.http.fileupload.FileUpload
* #parseRequest(javax.servlet.http.HttpServletRequest)}), you may
* either request all contents of the file at once using {@link #get()} or
* request an {@link java.io.InputStream InputStream} with
* <p>This class handles multiple files per single HTML widget, sent using
* <code>multipart/mixed</code> encoding type, as specified by
* <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Use {@link
- * #parseRequest(javax.servlet.http.HttpServletRequest)} to acquire a list
- * of {@link org.apache.commons.fileupload.FileItem FileItems} associated
+ * #parseRequest(RequestContext)} to acquire a list
+ * of {@link org.apache.tomcat.util.http.fileupload.FileItem FileItems} associated
* with a given HTML widget.</p>
*
* <p>How the data for individual parts is stored is determined by the factory
* <p>This class handles multiple files per single HTML widget, sent using
* <code>multipart/mixed</code> encoding type, as specified by
* <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Use {@link
- * #parseRequest(HttpServletRequest)} to acquire a list of {@link
- * org.apache.commons.fileupload.FileItem}s associated with a given HTML
+ * #parseRequest(RequestContext)} to acquire a list of {@link
+ * org.apache.tomcat.util.http.fileupload.FileItem}s associated with a given HTML
* widget.</p>
*
* <p>How the data for individual parts is stored is determined by the factory
* Extracts a map of name/value pairs from the given array of
* characters. Names are expected to be unique.
*
- * @param chars the array of characters that contains a sequence of
+ * @param inputChars the array of characters that contains a sequence of
* name/value pairs
* @param separator the name/value pairs separator
*
* Extracts a map of name/value pairs from the given array of
* characters. Names are expected to be unique.
*
- * @param chars the array of characters that contains a sequence of
+ * @param inputChars the array of characters that contains a sequence of
* name/value pairs
* @param offset - the initial offset.
* @param length - the length.
import org.apache.tomcat.util.http.fileupload.InvalidFileNameException;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.apache.tomcat.util.http.fileupload.ParameterParser;
+import org.apache.tomcat.util.http.fileupload.RequestContext;
import org.apache.tomcat.util.http.fileupload.util.Streams;
/**
* <p> The default implementation of the
- * {@link org.apache.commons.fileupload.FileItem FileItem} interface.
+ * {@link org.apache.tomcat.util.http.fileupload.FileItem FileItem} interface.
*
* <p> After retrieving an instance of this class from a {@link
- * org.apache.commons.fileupload.DiskFileUpload DiskFileUpload} instance (see
- * {@link org.apache.commons.fileupload.DiskFileUpload
- * #parseRequest(javax.servlet.http.HttpServletRequest)}), you may
+ * org.apache.tomcat.util.http.fileupload.FileUpload FileUpload} instance (see
+ * {@link org.apache.tomcat.util.http.fileupload.FileUpload
+ * #parseRequest(RequestContext)}), you may
* either request all contents of file at once using {@link #get()} or
* request an {@link java.io.InputStream InputStream} with
* {@link #getInputStream()} and process the file without attempting to load
*
* <p>Temporary files, which are created for file items, should be
* deleted later on. The best way to do this is using a
- * {@link FileCleaningTracker}, which you can set on the
+ * {@link org.apache.tomcat.util.http.fileupload.FileCleaningTracker
+ * FileCleaningTracker}, which you can set on the
* {@link DiskFileItemFactory}. However, if you do use such a tracker,
* then you must consider the following: Temporary files are automatically
* deleted as soon as they are no longer needed. (More precisely, when the
*
* @return The contents of the file, as a string.
*
- * @todo Consider making this method throw UnsupportedEncodingException.
+ * TODO Consider making this method throw UnsupportedEncodingException.
*/
public String getString() {
byte[] rawdata = get();
/**
- * <p>The default {@link org.apache.commons.fileupload.FileItemFactory}
+ * <p>The default {@link org.apache.tomcat.util.http.fileupload.FileItemFactory}
* implementation. This implementation creates
- * {@link org.apache.commons.fileupload.FileItem} instances which keep their
+ * {@link org.apache.tomcat.util.http.fileupload.FileItem} instances which keep
+ * their
* content either in memory, for smaller items, or in a temporary file on disk,
* for larger items. The size threshold, above which content will be stored on
* disk, is configurable, as is the directory in which temporary files will be
// --------------------------------------------------------- Public Methods
/**
- * Create a new {@link org.apache.tomcat.util.http.fileupload.disk.commons.fileupload.disk.DiskFileItem}
+ * Create a new {@link DiskFileItem}
* instance from the supplied parameters and the local factory
* configuration.
*
<!-- $Id$ -->
<html>
<head>
- <title>Overview of the org.apache.commons.fileupload component</title>
+ <title>
+ Overview of the org.apache.tomcat.util.http.fileupload component
+ </title>
</head>
<body>
<p><b>NOTE:</b> This code has been copied from commons-fileupload 1.2.1 and
While this package provides the generic functionality for file uploads,
these classes are not typically used directly. Instead, normal usage
involves one of the provided extensions of
- {@link org.apache.commons.fileupload.FileUpload FileUpload} such as
- {@link org.apache.commons.fileupload.servlet.ServletFileUpload ServletFileUpload}
- or
- {@link org.apache.commons.fileupload.portlet.PortletFileUpload PortletFileUpload},
+ {@link org.apache.tomcat.util.http.fileupload.FileUpload FileUpload} such as
+ {@link org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload ServletFileUpload}
together with a factory for
- {@link org.apache.commons.fileupload.FileItem FileItem} instances,
+ {@link org.apache.tomcat.util.http.fileupload.FileItem FileItem} instances,
such as
- {@link org.apache.commons.fileupload.disk.DiskFileItemFactory DiskFileItemFactory}.
+ {@link org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory DiskFileItemFactory}.
</p>
<p>
The following is a brief example of typical usage in a servlet, storing
* <code>multipart/mixed</code> encoding type, as specified by
* <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Use {@link
* #parseRequest(HttpServletRequest)} to acquire a list of {@link
- * org.apache.commons.fileupload.FileItem}s associated with a given HTML
+ * org.apache.tomcat.util.http.fileupload.FileItem}s associated with a given HTML
* widget.</p>
*
* <p>How the data for individual parts is stored is determined by the factory
/**
* This convenience method allows to read a
- * {@link org.apache.commons.fileupload.FileItemStream}'s
+ * {@link org.apache.tomcat.util.http.fileupload.FileItemStream}'s
* content into a string. The platform's default character encoding
* is used for converting bytes into characters.
* @param pStream The input stream to read.
/**
* This convenience method allows to read a
- * {@link org.apache.commons.fileupload.FileItemStream}'s
+ * {@link org.apache.tomcat.util.http.fileupload.FileItemStream}'s
* content into a string, using the given character encoding.
* @param pStream The input stream to read.
* @param pEncoding The character encoding, typically "UTF-8".
* Closes this channel.
*
* @throws IOException If an I/O error occurs
- * @todo Implement this java.nio.channels.Channel method
+ * TODO Implement this java.nio.channels.Channel method
*/
public void close() throws IOException {
getIOChannel().socket().close();
* Tells whether or not this channel is open.
*
* @return <tt>true</tt> if, and only if, this channel is open
- * @todo Implement this java.nio.channels.Channel method
+ * TODO Implement this java.nio.channels.Channel method
*/
public boolean isOpen() {
return sc.isOpen();
* @param src The buffer from which bytes are to be retrieved
* @return The number of bytes written, possibly zero
* @throws IOException If some other I/O error occurs
- * @todo Implement this java.nio.channels.WritableByteChannel method
+ * TODO Implement this java.nio.channels.WritableByteChannel method
*/
public int write(ByteBuffer src) throws IOException {
return sc.write(src);
* @param dst The buffer into which bytes are to be transferred
* @return The number of bytes read, possibly zero, or <tt>-1</tt> if the channel has reached end-of-stream
* @throws IOException If some other I/O error occurs
- * @todo Implement this java.nio.channels.ReadableByteChannel method
+ * TODO Implement this java.nio.channels.ReadableByteChannel method
*/
public int read(ByteBuffer dst) throws IOException {
return sc.read(dst);
* getBufHandler
*
* @return ApplicationBufferHandler
- * @todo Implement this org.apache.tomcat.util.net.SecureNioChannel method
+ * TODO Implement this org.apache.tomcat.util.net.SecureNioChannel method
*/
public ApplicationBufferHandler getBufHandler() {
return bufHandler;
* getIOChannel
*
* @return SocketChannel
- * @todo Implement this org.apache.tomcat.util.net.SecureNioChannel method
+ * TODO Implement this org.apache.tomcat.util.net.SecureNioChannel method
*/
public SocketChannel getIOChannel() {
return sc;
* isClosing
*
* @return boolean
- * @todo Implement this org.apache.tomcat.util.net.SecureNioChannel method
+ * TODO Implement this org.apache.tomcat.util.net.SecureNioChannel method
*/
public boolean isClosing() {
return false;
* isInitHandshakeComplete
*
* @return boolean
- * @todo Implement this org.apache.tomcat.util.net.SecureNioChannel method
+ * TODO Implement this org.apache.tomcat.util.net.SecureNioChannel method
*/
public boolean isInitHandshakeComplete() {
return true;
/**
* Return true if the buffer wrote data
- * @return
* @throws IOException
*/
public boolean flushOutbound() throws IOException {
protected AtomicInteger pollerRotater = new AtomicInteger(0);
/**
* Return an available poller in true round robin fashion
- * @return
*/
public Poller getPoller0() {
int idx = Math.abs(pollerRotater.incrementAndGet()) % pollers.length;
* </code></pre>
* @throws IOException if an I/O error occurs
* @throws IOException if there is data on the outgoing network buffer and we are unable to flush it
- * @todo Implement this java.io.Closeable method
+ * TODO Implement this java.io.Closeable method
*/
@Override
public void close() throws IOException {
* @return The number of bytes read, possibly zero, or <tt>-1</tt> if the channel has reached end-of-stream
* @throws IOException If some other I/O error occurs
* @throws IllegalArgumentException if the destination buffer is different than bufHandler.getReadBuffer()
- * @todo Implement this java.nio.channels.ReadableByteChannel method
+ * TODO Implement this java.nio.channels.ReadableByteChannel method
*/
@Override
public int read(ByteBuffer dst) throws IOException {
* @param src The buffer from which bytes are to be retrieved
* @return The number of bytes written, possibly zero
* @throws IOException If some other I/O error occurs
- * @todo Implement this java.nio.channels.WritableByteChannel method
+ * TODO Implement this java.nio.channels.WritableByteChannel method
*/
@Override
public int write(ByteBuffer src) throws IOException {
* @param callback The handler to process any JARs found
* @param jarsToSkip List of JARs to ignore. If this list is null, a
* default list will be read from the system property
- * defined by {@link #SKIP_JARS_PROPERTY}
+ * defined by {@link Constants#SKIP_JARS_PROPERTY}
*/
@Override
public void scan(ServletContext context, ClassLoader classloader,
*
* @param msg Serializable
* @param sender Member
- * @todo Implement this org.apache.catalina.tribes.tipis.RpcCallback
+ * TODO Implement this org.apache.catalina.tribes.tipis.RpcCallback
* method
*/
public void leftOver(Serializable msg, Member sender) {
* @param msg Serializable
* @param sender Member
* @return Serializable - null if no reply should be sent
- * @todo Implement this org.apache.catalina.tribes.tipis.RpcCallback
+ * TODO Implement this org.apache.catalina.tribes.tipis.RpcCallback
* method
*/
public Serializable replyRequest(Serializable msg, Member sender) {
* memberAdded
*
* @param member Member
- * @todo Implement this org.apache.catalina.tribes.MembershipListener
+ * TODO Implement this org.apache.catalina.tribes.MembershipListener
* method
*/
public void memberAdded(Member member) {
* memberDisappeared
*
* @param member Member
- * @todo Implement this org.apache.catalina.tribes.MembershipListener
+ * TODO Implement this org.apache.catalina.tribes.MembershipListener
* method
*/
public void memberDisappeared(Member member) {