Example:
<port-component-name>EmployeeService
</port-component-name>
-
-
-
+
+
]]>
</xsd:documentation>
</xsd:annotation>
package org.apache.catalina;
-
-
/**
* Interface defining a listener for significant Container generated events.
* Note that "container start" and "container stop" events are normally
package org.apache.catalina;
-
-
/**
* Interface defining a listener for significant events (including "component
* start" and "component stop" generated by a component that implements the
package org.apache.catalina;
-
-
/**
* Interface defining a listener for significant Session generated events.
*
attribute, realValue));
return null;
}
-
/**
// ------------------------------------------------------ Protected Methods
-
-
/**
* Associate the specified single sign on identifier with the
* specified Session.
isCharacterEncodingSet = true;
}
-
-
+
/**
* Set the Locale that is appropriate for this response, including
* setting the appropriate character encoding.
* Wrapped application context.
*/
private ApplicationContext context = null;
-
// ------------------------------------------------- ServletContext Methods
*/
private static Class<?>[] classTypeUsedInEvent =
new Class[] { CometEvent.class };
-
-
+
// ---------------------------------------------------- FilterChain Methods
// -------------------------------------------------------- Package Methods
-
/**
* Add a filter to the set of filters that will be executed in this chain.
*
public void setListener(AsyncListener listener) {
this.listener = listener;
}
-
-
+
}
sb.append(']');
return sb.toString();
}
-
-
-
+
+
// ------------------------------------------------------- Pipeline Methods
public StandardThreadExecutor() {
//empty constructor for the digester
}
-
-
+
// ---------------------------------------------- Public Methods
@Override
}
-
@Override
public boolean resizePool(int corePoolSize, int maximumPoolSize) {
if (executor == null)
}
-
@Override
public boolean resizeQueue(int capacity) {
return false;
private URL uRL = null;
public void setURL(URL url) { this.uRL = url; }
public URL getURL() { return uRL; }
-
-
-
+
+
@Override
public String toString() {
StringBuilder buf = new StringBuilder(32);
digester.addSetNext(prefix + "Manager",
"setManagerTemplate",
"org.apache.catalina.ha.ClusterManager");
-
digester.addObjectCreate(prefix + "Channel",
* @param primarySession Flag value
*/
public void setPrimarySession(boolean primarySession);
-
-
+
}
}
-
/**
* Save any currently active sessions in the appropriate persistence
actions.addLast(info);
}//for
}
-
public void writeExternal(java.io.ObjectOutput out ) throws java.io.IOException {
// ----------------------------------------------HttpSession Public Methods
-
/**
* Remove the object bound with the specified name from this session. If the
* session does not have an object bound with this name, this method does
// -------------------------------------------------------- Private Methods
-
/**
* Return the value of an attribute without a check for validity.
}
-
-
/**
* The set of roles associated with this user.
*/
// --------------------------------------------------------- Public Methods
-
-
/**
* Return a String representation of this object, which exposes only
* information that should be public.
* @return the session ID for the session
*/
public String getSessionID();
-
}//SessionMessage
}
-
-
// ------------------------------------------------------------- deprecated
/**
}
}
-
-
// ------------------------------------------------------- Static Variables
return (name);
}
-
-
-
+
+
/**
* Create an <code>ObjectName</code> for this
* <code>Engine</code> object.
}
-
-
/**
* Deregister the MBeans for the specified Connector and its nested
* components.
}
-
-
/**
* Process a property change event on a Container.
*
</operation>
-
-
<operation name="createStandardManager"
description="Create a new StandardManager"
impact="ACTION"
this.roleNested = roleNested;
}
-
/**
}
-
/**
* Check whether the credentials presented by the user match those
* retrieved from the directory.
}
-
/**
* Check credentials by binding to the directory as the user
*
}
-
/**
* Add values of a specified attribute to a list
*
// --------------------------------------------------------- Public Methods
-
/**
* Add a property change listener to this component.
*
}
-
/**
* Return the Principal associated with the specified chain of X509
* client certificates. If there is none, return <code>null</code>.
}
-
/**
* Prints out important Servlet API and container information
*
out.println("<hr>");
-
}
-
/**
* Provides CGI Gateway service -- delegates to <code>doGet</code>
*
}
-
/**
* Provides CGI Gateway service
*
}
-
/**
* Uses the ServletContext to set some CGI variables
*
}
-
/**
* Uses the HttpServletRequest to set most CGI variables
*
}
-
/**
* Gets derived command string
*
}
-
/**
* Gets derived CGI working directory
*
}
-
/**
* Gets derived CGI environment
*
}
-
/**
* Gets derived CGI query parameters
*
}
-
/**
* Gets validity status
*
}
-
/**
* Converts null strings to blank strings ("")
*
}
-
/**
* Converts null strings to another string
*
}
-
/**
* Converts blank strings to another string
*
}
-
} //class CGIEnvironment
-
-
-
-
/**
* Encapsulates the knowledge of how to run a CGI script, given the
* script's desired environment and (optionally) input/output streams
private boolean readyToRun = false;
-
-
/**
* Creates a CGIRunner and initializes its environment, working
* directory, and query parameters.
}
-
/**
* Checks & sets ready status
*/
}
-
/**
* Gets ready status
*
}
-
/**
* Sets HttpServletResponse object used to set headers and send
* output to
}
-
/**
* Sets standard input to be passed on to the invoked cgi script
*
}
-
/**
* Converts a Hashtable to a String array by converting each
* key/value pair in the Hashtable to a String in the form
}
-
/**
* Executes a CGI script with the desired environment, current working
* directory, and input/output streams
// ------------------------------------------------------------- Properties
-
-
-
/**
* Indicates how many seconds old a session can get, after its last use in a
}
-
/**
* Indicates whether sessions are saved when the Manager is shut down
* properly. This requires the unload() method to be called.
}
-
/**
* Bind an object to this session, using the specified name. If an object
* of the same name is already bound to this session, the object is
((StandardContext) context).fireContainerEvent(type, data);
}
}
-
/**
}
-
}
digester.addSetNext("Server/Service/Connector",
"addConnector",
"org.apache.catalina.connector.Connector");
-
-
digester.addObjectCreate("Server/Service/Connector/Listener",
return ctx;
}
-
-
-
// ---------- Helper methods and classes -------------------
/**
*
*/
public interface ChannelMessage extends Serializable {
-
-
-
-
+
+
/**
* Get the address that this message originated from.
* Almost always <code>Channel.getLocalMember(boolean)</code><br>
super();
}
-
-
+
public static void absoluteOrder(Member[] members) {
if ( members == null || members.length == 0 ) return;
Arrays.sort(members,comp);
public void setRpcId(byte[] rpcId) {
this.rpcId = rpcId;
}
-
/**
super.heartbeat();
}
-
public int getMaxSize() {
return maxSize;
return (System.currentTimeMillis()-received)>expire;
}
-
-
+
}
public static class FragKey {
//============================================================================================================
// HELPER CLASSES FOR COORDINATION
//============================================================================================================
-
-
-
-
+
+
public static class CoordinationMessage {
//X{A-ldr, A-src, mbrs-A,B,C,D}
protected XByteBuffer buf;
}
}
-
-
-
}
\ No newline at end of file
import org.apache.catalina.tribes.io.XByteBuffer;
-
/**
*
* The order interceptor guarantees that messages are received in the same order they were
public int getMsgNr() {
return msgNr;
}
-
-
-
+
+
}
public void setExpire(long expire) {
public ChannelData(boolean generateUUID) {
if ( generateUUID ) generateUUID();
}
-
-
-
+
+
/**
* Creates a new channel data object with data
* @param uniqueId - unique message id
byte[] result = new byte[length];
return createDataPackage(data,0,data.length,result,0);
}
-
-
+
// public static void fillDataPackage(byte[] data, int doff, int dlength, XByteBuffer buf) {
// int pkglen = getDataPackageLength(dlength);
socket.setTimeToLive(mcastTTL);
}
}
-
-
+
/**
* Start the service
*/
public class LazyReplicatedMap extends AbstractReplicatedMap {
private static final Log log = LogFactory.getLog(LazyReplicatedMap.class);
-
-
+
//------------------------------------------------------------------------------
// CONSTRUCTORS / DESTRUCTORS
//------------------------------------------------------------------------------
}
-
-
-
//------------------------------------------------------------------------------
// METHODS TO OVERRIDE
//------------------------------------------------------------------------------
} while ( !success && (firstIdx!=nextIdx));
return backup;
}
-
-
-
}
\ No newline at end of file
* @param version long
*/
public void setVersion(long version);
-
-
-
-
+
+
}
\ No newline at end of file
import org.apache.catalina.tribes.io.ListenCallback;
-
-
/**
* @author Filip Hanik
* @version $Id$
notinuse.clear();
inuse.clear();
notify();
-
}
*/
protected static final StringManager sm = StringManager.getManager(Constants.Package);
-
public ReplicationTransmitter() {
}
// ------------------------------------------------------------- protected
-
}
super.stop();
}
-
-
-
+
protected void bind() throws IOException {
// allocate an unbound server socket channel
serverSocket = new ServerSocket();
//serverSocket.bind(new InetSocketAddress(getBind(), getTcpListenPort()));
bind(serverSocket,getPort(),getAutoBind());
}
-
-
-
+
+
public void run() {
try {
listen();
}
-
-
/**
* send a reply-acknowledgment (6,2,3)
* @param command
}
-
-
-
/**
* send a reply-acknowledgement (6,2,3), sends it doing a busy write, the ACK is so small
* that it should always go to the buffer
return result;
}
-
-
+
public static byte[] convert(String s) {
try {
return s.getBytes("ISO-8859-1");
}
-
-
-
}
\ No newline at end of file
}
};
-
public final static ThreadLocal<DateFormat> rfc1036Format = new ThreadLocal<DateFormat>() {
@Override
* write date and time, in Common Log Format - %t
*/
protected class DateAndTimeElement implements AccessLogElement {
-
-
public void addElement(StringBuilder buf, Date date, Request request,
}
-
-
/**
* parse pattern string and create the array of AccessLogElement
*/
output = null;
return SocketState.CLOSED;
}
-
-
-
-
+
+
}
// ----------------------------------------------------- ActionHook Methods
protected String localName = null;
-
/**
* Local port to which the socket is connected
*/
}
return "off";
}
-
-
-
/**
* General use method
}
-
}
// ----------------------------------------------------------- Constructors
-
-
// -------------------------------------------------------------- Variables
this.swallowInput = swallowInput;
}
-
-
// --------------------------------------------------------- Public Methods
protected int pos;
-
/**
* Filter library.
* Note: Filter[0] is always the "chunked" filter.
// ------------------------------------------------------------- Properties
-
-
-
/**
* Add an output filter to the filter library.
*/
}
-
-
// --------------------------------------------------- OutputBuffer Methods
}
}
-
/**
}
-
}
log.info(sm.getString("http11protocol.start", getName()));
}
-
// -------------------- Properties--------------------
}
}
-
-
}
}
// ------------------------------------------------------------- Properties
-
-
/**
* Name of the socket factory.
*/
* Selector pool, for blocking reads and blocking writes
*/
protected NioSelectorPool pool;
-
// ------------------------------------------------------------- Properties
// Reading the header name
// Header name is always US-ASCII
//
-
-
+
while (headerParsePos == HeaderParsePosition.HEADER_NAME) {
}
-
-
// ------------------------------------------------------ Protected Methods
/**
protected NioSelectorPool pool;
-
-
// ------------------------------------------------------------- Properties
}
-
// ------------------------------------------------------ Protected Methods
}
}
-
-
// --------------------------------------------------------- Public Methods
}
-
-
-
/**
* Recycle the output buffer. This should be called when closing the
* connection.
}
-
// ------------------------------------------------------ Protected Methods
}
-
-
/**
* Callback to write data from the buffer.
*/
} // isValidName(String):boolean
-
-
-
// encodings
/**
import java.util.logging.LogManager;
-
/**
* Modified LogFactory: removed all discovery, hardcode a specific implementation
* If you like a different logging implementation - use either the discovery-based
}
-
-
-
// ------------------------------------------------------- Static Variables
-
// --------------------------------------------------------- Static Methods
"void", "array", "object", "unknown", "address"
};
-
/**
* Number of byte code operands for each opcode, i.e., number of bytes after the tag byte
ILLEGAL_OPCODE, "impdep1", "impdep2"
};
-
-
-
/** Attributes and their corresponding names.
*/
default_value = defaultValue;
}
-
@Override
public Attribute copy(ConstantPool _constant_pool)
return c.getBytes();
}
-
-
-
-
-
-
-
/**
* @return Tag of attribute, i.e., its type. Value may not be altered, thus
return tag;
}
-
-
-
/**
* Use copy() if you want to have a deep copy(), i.e., with all references
this.idx = idx;
}
-
-
-
@Override
public String stringifyValue()
}
-
-
-
-
-
-
/**
* Parse the given Java class file and return an object that represents
* the contained data, i.e., constants, methods, fields and commands.
private Attribute[] attributes; // or LocalVariable
-
-
-
/**
* @param name_index Index pointing to the name <em>Code</em>
* @param length Content length in bytes
}
-
-
-
-
-
-
/**
* @return LocalVariableTable of Code, if it has one
*/
}
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return the internal length of this code attribute (minus the first 6 bytes)
* and excluding all its attributes
}
-
-
-
-
-
-
/**
* @return String representation of code chunk.
*/
*/
-
-
-
/**
* Construct object from file stream.
* @param file Input stream
}
-
-
-
/**
* Dump code exception to file stream in binary format.
*
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return String representation.
*/
}
-
-
-
/**
* @return deep copy of this object
*/
}
-
-
-
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
-
-
-
-
-
-
/**
* Return value as defined by given BCELComparator strategy.
* By default two Constant objects are said to be equal when
protected int class_index, name_and_type_index;
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
-
-
-
-
-
-
/**
* @return String representation.
*/
private int name_index; // Identical to ConstantString except for the name
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
-
-
-
-
-
-
/**
* @return String representation.
*/
}
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
/**
* @return String representation.
*/
}
-
}
*/
public final class ConstantFieldref extends ConstantCP {
-
-
private static final long serialVersionUID = -8062332095934294437L;
}
-
}
}
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
/**
* @return String representation.
*/
}
-
}
}
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
/**
* @return String representation.
*/
}
-
}
*/
public final class ConstantInterfaceMethodref extends ConstantCP {
-
-
private static final long serialVersionUID = -8587605570227841891L;
}
-
}
}
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
/**
* @return String representation.
*/
}
-
}
*/
public final class ConstantMethodref extends ConstantCP {
-
-
private static final long serialVersionUID = -7857009620954576086L;
}
-
}
private int signature_index; // and its signature.
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
/**
* @return Index in constant pool of field/method signature.
*/
}
-
-
-
-
-
-
-
-
-
/**
* @return String representation
*/
private Constant[] constant_pool;
-
-
-
/**
* Read constants from given file stream.
*
}
-
-
-
/**
* Resolve constant to a string representation.
*
}
-
-
-
/**
* Get constant from constant pool.
*
}
-
-
-
/**
* Get string from constant pool and bypass the indirection of
* `ConstantClass' and `ConstantString' objects. I.e. these classes have
}
-
}
private int string_index; // Identical to ConstantClass except for this name
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
/**
* @return String representation.
*/
}
-
-
-
-
}
private String bytes;
-
-
-
/**
* Initialize instance from file data.
*
}
-
-
-
/**
* Dump String in Utf8 format to file stream.
*
}
-
-
-
/**
* @return String representation
*/
private int constantvalue_index;
-
-
-
/**
* Construct object from file stream.
* @param name_index Name index in constant pool
}
-
-
-
-
-
-
/**
* @return String representation of constant value.
*/
private byte[] bytes;
-
-
-
/**
* @param name_index Index in constant pool to CONSTANT_Utf8
* @param length Content length in bytes
}
-
-
-
-
-
-
/**
* @return attribute name
*/
this.cpool = cpool;
}
-
public abstract String stringifyValue();
private int[] exception_index_table; // constant pool
-
-
-
/**
* @param name_index Index in constant pool
* @param length Content length in bytes
}
-
-
-
-
-
-
-
-
-
/**
* @param exception_index_table the list of exception indexes
* Also redefines number_of_exceptions according to table length.
};
-
-
-
/**
* Construct object from file stream.
* @param file Input stream
}
-
-
-
-
-
-
/**
* @return constant value associated with this field (may be null)
*/
}
-
-
-
-
-
-
-
-
-
-
-
-
/**
* Return value as defined by given BCELComparator strategy.
* By default two Field objects are said to be equal when
private int inner_access_flags;
-
-
-
/**
* Construct object from file stream.
* @param file Input stream
}
-
-
-
/**
* Dump inner class attribute to file stream in binary format.
*
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return String representation.
*/
private int number_of_classes;
-
-
-
/**
* @param name_index Index in constant pool to CONSTANT_Utf8
* @param length Content length in bytes
}
-
-
-
/**
* @param inner_classes the array of inner classes
*/
private Method[] methods; // methods defined in the class
private Attribute[] attributes; // attributes defined in the class
private AnnotationEntry[] annotations; // annotations defined on the class
-
-
-
-
-
-
+
+
// Annotations are collected from certain attributes, don't do it more than necessary!
private boolean annotationsOutOfDate = true;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return Attributes of the class.
*/
}
-
-
-
public final boolean isSuper() {
return (access_flags & Constants.ACC_SUPER) != 0;
}
private int line_number; // number in source file
-
-
-
/**
* Construct object from file stream.
* @param file Input stream
}
-
-
-
/**
* Dump line number/pc pair to file stream in binary format.
*
}
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return String representation
*/
private LineNumber[] line_number_table; // Table of line/numbers pairs
-
-
-
/*
* @param name_index Index of name
* @param length Content length in bytes
}
-
-
-
/**
* @param line_number_table the line number entries for this table
*/
}
-
-
-
/**
* @return deep copy of this attribute
*/
}
-
}
private ConstantPool constant_pool;
-
-
-
/**
* Construct object from file stream.
* @param file Input stream
}
-
-
-
/**
* Dump local variable to file stream in binary format.
*
}
-
-
-
-
-
-
/**
* @return Variable name.
*/
}
-
-
-
/**
* @return Signature.
*/
}
-
-
-
/**
* @return index of register where variable is stored
*/
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return string representation.
*/
private LocalVariable[] local_variable_table; // variables
-
-
-
/**
* @param name_index Index in constant pool to `LocalVariableTable'
* @param length Content length in bytes
}
-
-
-
/**
*
* @param index the variable slot
}
-
}
}
-
-
-
/**
* Construct object from file stream.
* @param file Input stream
}
-
-
-
-
-
-
/**
* @return Code attribute of method, if any
*/
}
-
-
-
/**
* Return string representation close to declaration format,
* `public static void main(String[] args) throws IOException', e.g.
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* Return value as defined by given BCELComparator strategy.
* By default two method objects are said to be equal when
private int pmg_class_index, pmg_index;
-
-
-
/**
* Construct object from file stream.
* @param name_index Index in constant pool to CONSTANT_Utf8
}
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return PMG name.
*/
private int signature_index;
-
-
-
/**
* Construct object from file stream.
* @param name_index Index in constant pool to CONSTANT_Utf8
}
-
-
-
-
-
-
/**
* @return GJ signature.
*/
private int sourcefile_index;
-
-
-
/**
* Construct object from file stream.
* @param name_index Index in constant pool to CONSTANT_Utf8
}
-
-
-
-
-
-
/**
* @return Source file name.
*/
}
-
-
-
/**
* @param map Array of stack map entries
*/
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return deep copy of this object
*/
}
-
-
-
-
-
-
-
}
}
-
-
-
/**
* @param map Array of stack map entries
*/
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/**
* @return deep copy of this object
*/
}
-
-
-
-
-
-
-
}
}
-
-
-
public void setIndex( int t ) {
index = t;
}
}
-
-
-
-
-
-
/**
* @param constant_pool Constant pool to be used for this object.
*/
private byte[] bytes;
-
-
-
/**
* @param name_index Index in constant pool to CONSTANT_Utf8, which
* should represent the string "Synthetic".
}
-
-
-
-
-
-
/**
* @return String representation.
*/
private static final Map unknown_attributes = new HashMap();
-
-
-
-
-
-
/**
* Create a non-standard attribute.
*
}
-
-
-
/**
* @return name of attribute.
*/
}
-
-
-
/**
* @return String representation.
*/
}
-
-
-
/**
* Disassemble a stream of byte codes and return the
* string representation.
}
-
-
-
/**
* Shorten long class names, <em>java/lang/String</em> becomes
* <em>String</em>.
}
-
-
-
-
-
}
}
-
-
private static final class ByteArrayStream extends ByteArrayInputStream {
ByteArrayStream(byte[] bytes) {
}
}
-
// -------------------- Hash code --------------------
@Override
import org.xml.sax.helpers.DefaultHandler;
-
-
/**
* <p>A <strong>Digester</strong> processes an XML input stream by matching a
* series of element nesting patterns to execute Rules that have been added
protected boolean validating = false;
-
/**
* Warn on missing attributes and elements.
*/
if (value==null || value.length() < 2) return false;
return (value.charAt(0)=='\"' && value.charAt(value.length()-1)=='\"');
}
-
-
+
// ------------------------------------------------------------- Constructor
private CookieSupport() {
// Utility class. Don't allow instances to be created.
( addHeader hook )
*/
-
/**
}
}
-
/**
* Cleans a directory without deleting it.
}
-
-
/**
* Returns a string representation of this object.
*
}
-
-
/**
* Send a <code>Notification</code> to all registered listeners as a
* <code>jmx.modelmbean.general</code> notification.
}
-
-
// ---------------------------------------- NotificationBroadcaster Methods
public void postDeregister() {
}
-
-
-
+
// -------------------- DEPRECATED METHODS --------------------
// May still be used in tomcat
// Never part of an official release
public int getThreadPriority() { return threadPriority; }
-
/**
* Generic properties, introspected
*/
allowUnsafeLegacyRenegotiation = s;
}
-
-
+
private String sslEnabledProtocols=null; //"TLSv1,SSLv3,SSLv2Hello"
private String[] sslEnabledProtocolsarr = new String[0];
public String[] getSslEnabledProtocolsArray() { return this.sslEnabledProtocolsarr;}
// ------------------------------------------------------ Protected Methods
-
/**
* Process the specified connection.
*/
}
-
/**
* Allocate a new poller of the specified size.
*/
// ----------------------------------------------------- Worker Inner Class
-
-
// ----------------------------------------------- SendfileData Inner Class
}
-
// ---------------------------------------------- SocketProcessor Inner Class
public ServerSocketFactory getServerSocketFactory() { return serverSocketFactory; }
-
-
-
// ------------------------------------------------ Handler Inner Interface
}
}
-
-
+
// -------------------- Public methods --------------------
initialized = false ;
}
-
-
/**
* Set the options for the current socket.
}
};
-
// ------------------------------------------------------------- Properties
}
-
/**
* Priority of the acceptor threads.
*/
public int getPollerThreadPriority() { return pollerThreadPriority; }
-
/**
* Handling of accepted sockets.
*/
public Handler getHandler() { return handler; }
-
-
-
-
/**
* Allow comet request handling.
*/
public int getAcceptorThreadCount() { return acceptorThreadCount; }
-
/**
* Poller thread count.
*/
}
-
-
public void setSelectorPool(NioSelectorPool selectorPool) {
this.selectorPool = selectorPool;
}
}
-
-
/**
* Return the state of the endpoint.
*
}
-
-
-
/**
* Process the specified connection.
*/
}
-
// ---------------------------------------------- SocketProcessor Inner Class
/**
* This class is the equivalent of the Worker, but will simply use in an
public void setUnlockTimeout(int unlockTimeout) {
this.unlockTimeout = unlockTimeout;
}
-
-
+
}
}
-
-
-
/**
* Create a URL object from the specified components. The default port
* number for the specified protocol will be used.
});
-
-
function subscribe(box, symbol) {
if (box.checked) {
dojox.cometd.subscribe("/stock/"+symbol, onMsgEvent);
if (poolProperties == null) throw new NullPointerException("PoolConfiguration can not be null.");
this.poolProperties = poolProperties;
}
-
public boolean isWrapperFor(Class<?> iface) throws SQLException {
}
-
-
/*-----------------------------------------------------------------------*/
// PROPERTIES WHEN NOT USED WITH FACTORY
/*------------------------------------------------------------------------*/
result = result || (timer && getMinEvictableIdleTimeMillis()>0);
return result;
}
-
-
-
+
+
public static class InterceptorDefinition {
protected String className;
protected Map<String,InterceptorProperty> properties = new HashMap<String,InterceptorProperty>();
this.timestamp = timestamp;
setSuspect(false);
}
-
-
-
+
public boolean isSuspect() {
return suspect;
}
return result;
}
-
-
+
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
public void setMaxQueries(int maxQueries) {
this.maxQueries = maxQueries;
}
-
-
-
+
+
@Override
protected String reportFailedQuery(String query, Object[] args, String name, long start, Throwable t) {
String sql = super.reportFailedQuery(query, args, name, start, t);
if (log.isDebugEnabled()) log.debug("Removing slow query, capacity reached:"+sql);
}
}
-
-
-
+
@Override
public void reset(ConnectionPool parent, PooledConnection con) {
queries = SlowQueryReport.perPoolStats.get(parent.getName());
}
-
-
-
@Override
public void setProperties(Map<String, InterceptorProperty> properties) {
}
-
-
-
/**
*
* @author fhanik
}
-
-
+
//==============================JMX STUFF========================
protected String poolName = null;
}
-
@Override
public void poolClosed(ConnectionPool pool) {
this.poolName = pool.getName();
public String getPoolName() {
return poolName;
}
-
-
-
+
+
public boolean isNotifyPool() {
return notifyPool;
}
}
}
-
-
+
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
boolean process = process(this.types, method, false);
if (process && args.length>0 && args[0] instanceof String) {
public static final String SLOW_QUERY_NOTIFICATION = "SLOW QUERY";
public static final String FAILED_QUERY_NOTIFICATION = "FAILED QUERY";
public static final String SUSPECT_ABANDONED_NOTIFICATION = "SUSPECT CONNETION ABANDONED";
-
-
-
-
+
+
public MBeanNotificationInfo[] getNotificationInfo() {
MBeanNotificationInfo[] pres = super.getNotificationInfo();
MBeanNotificationInfo[] loc = getDefaultNotificationInfo();
//=========================================================
// PROPERTIES / CONFIGURATION
//=========================================================
-
-
-
+
+
public String getConnectionProperties() {
return getPoolProperties().getConnectionProperties();
}
instancecount.incrementAndGet();
super.setProperties(properties);
}
-
-
-
+
+
}
}
con.close();
}
-
-
-
-
+
+
}
protected long complete = Long.getLong("complete",20000);
protected boolean printthread = Boolean.getBoolean("printthread");
CountDownLatch latch = null;
-
-
-
+
+
@Override
public org.apache.tomcat.jdbc.pool.DataSource createDefaultDataSource() {
// TODO Auto-generated method stub
ds.getPoolProperties().setMaxActive(10);
return ds;
}
-
-
+
@Override
protected void tearDown() throws Exception {
}
-
protected void printThreadResults(TestThread[] threads, String name, int active, int expected) {
long minfetch = Long.MAX_VALUE, maxfetch = Long.MIN_VALUE, totalfetch = 0;
long maxwait = 0, minwait = Long.MAX_VALUE, averagewait = 0, totalwait = 0;
c1 = d1.getConnection();
assertEquals("Catalog should be information_schema",c1.getCatalog(),"information_schema");
}
-
-
}
this.datasource.close();
assertTrue("Pool should have been closed.",TestInterceptor.poolclosed);
}
-
-
+
}
}
-
-
private void config(boolean cachePrepared, boolean cacheCallable, int max) {
datasource.getPoolProperties().setJdbcInterceptors(TestStatementCacheInterceptor.class.getName()+
"(prepared="+cachePrepared+",callable="+cacheCallable+",max="+max+")");
}catch (Exception x) {
assertTrue("Connection c2 should be working",false);
}
-
-
+
}
}
addWrapper(contextMapElement, path, wrapper, jspWildCard);
}
-
/**
* Remove a wrapper from the context associated with this wrapper.
}
}
-
/**
* Updates chunked, contentLength, remaining - based
}
}
}
-
-
-
+
+
private void flushToNext(IOBuffer body, IOBuffer out) throws IOException {
synchronized (this) {
public String getStatus() {
return getResponse().getStatus() + " " + getResponse().getMessage();
}
-
-
-
+
+
public String getTarget() {
if (target == null) {
return ":0"; // server mode ?
}
-
/*
The field-content does not include any leading or trailing LWS:
linear white space occurring before the first non-whitespace
con = hcon;
}
}
-
-
-
+
// we got a connection - make sure we're connected
http11ConnectOrSend(httpCh, target, con, ssl);
throws UnsupportedEncodingException {
this.charEncoding = enc;
}
-
-
+
public void recycle() {
commited = false;
public Map<String, Object> attributes() {
return attributes;
}
-
-
-
+
+
public CBuffer method() {
return methodMB;
}
}
-
/**
* Frame received. Must consume all data for the frame.
*
}
-
-
/**
* Compares the message bytes to the specified String object.
*
}
-
/**
* Append a string to the buffer
*/
}
hasDataLock.waitSignal(timeMs);
}
-
-
+
public boolean isAppendClosed() {
return closeQueued;
}
}
}
-
// ------ More utilities - for parsing request ( later )-------
// public final int skipBlank(ByteBuffer bb, int start) {
return i;
}
-
-
+
/**
* Just send the chars to the byte[], without flushing down.
*
}
-
public void acceptor(NioChannelCallback cstate,
int port,
InetAddress inet,
}
}
}
-
-
-
+
+
protected boolean isSelectorThread() {
return Thread.currentThread() == selectorThread;
}
}
-
// TODO: suspendAccept(boolean)
}
public static final void releaseReadableBuffer(ByteBuffer bb, BBucket bucket) {
bucket.position(bb.position());
}
-
-
-
+
+
public void readInterest(boolean b) throws IOException {
ch.readInterest(b);
}
}
-
// SSL handshake require slow tasks - that will need to be executed in a
// thread anyways. Better to keep it simple ( the code is very complex ) -
// and do the initial handshake in a thread, not in the IO thread.
}
-
-
+
public static class SocksServerConnection implements IOConnector.DataReceivedCallback, IOConnector.ConnectedCallback {
protected SocksServer server;
return ctx;
}
-
-
-
// ---------- Helper methods and classes -------------------
/**
responseTest("HTTP/1.1 200", "HTTP/1.1", "200", "");
responseTest("HTTP/1.1", "HTTP/1.1", "", "");
}
-
-
+
}
dec.urlEncode(uri, cc, enc);
return cc.toString();
}
-
-
+
}
*/
-
-
for (int hi = 0; hi<rcvVectorOfCookies.size(); hi++) {
String cookieValue = (String)rcvVectorOfCookies.elementAt(hi) ;
System.out.println("Exception : " +e );
return null;
}
-
-
}
import java.util.Vector;
-
public class WatchdogHttpClient {
private static final String CRLF = "\r\n";
private static final int LINE_FEED = 10;
return sb.toString().getBytes();
}
-
-
+
/**
* Read a line from the specified servlet input stream, and strip off
* the trailing carriage return and newline (if any). Return the remaining
return headers;
}
-
-
+
/**
* Private utility method to 'massage' a request string that
* may or may not have replacement markers for the request parameters.
client.requestURL = new URL( "http", client.host, client.port, addressString );
}
-
-
+
/**
* <code>CRBufferedInputStream</code> is a modified version of
* the java.io.BufferedInputStream class. The fill code is
import org.apache.catalina.tribes.util.Arrays;
-
public class CoordinationDemo {
static int CHANNEL_COUNT = 5;
static int SCREEN_WIDTH = 120;
statusLine.delete(0,statusLine.length());
statusLine.append(status);
}
-
-
-
+
+
public static void setEvents(String events) {
java.util.Arrays.fill(VIEW_EVENTS,false);
StringTokenizer t = new StringTokenizer(events,",");
"\n\tMBytes/second:"+(size*cnt/time/1024f/1024f));
}
-
-
+
public LoadTest(ManagedChannel channel,
boolean send,
int msgCount,
this.statsInterval = stats;
this.breakonChannelException = breakOnEx;
}
-
-
-
+
+
public void run() {
long counter = 0;
endTest();
}
-
/**
* memberAdded
System.out.println("} size:"+data.length);
}
-
-
+
public static class LoadMessage extends ByteMessage {
public static byte[] outdata = new byte[size];
suite.addTestSuite(TestNonBlockingCoordinator.class);
suite.run(new TestResult());
}
-
-
-
-
+
}
assertEquals("\\$", evaluateExpression("${'\\\\$'}"));
assertEquals("\\\\$", evaluateExpression("${'\\\\\\\\$'}"));
-
-
-
+
+
// Can use ''' inside '"' when quoting with '"' and vice versa without
// escaping
assertEquals("\\\"", evaluateExpression("${'\\\\\"'}"));
}
-
// ************************************************************************
private String evaluateExpression(String expression) {
</p>
-
</section>
<section name="Configuration Example">
</section>
-
-
-
-
<section name="Monitoring your Cluster with JMX">
<p>Monitoring is a very important question when you use a cluster. Some of the cluster objects are JMX MBeans </p>
<p>Add the following parameter to your startup script with Java 5:
</attribute>
-
</attributes>
</subsection>
public AsyncStockServlet() {
System.out.println("AsyncStockServlet created");
}
-
-
+
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp)
}
-
@Override
public void tick(Stock stock) {
ticks.add((Stock)stock.clone());
}
-
@Override
public void onStartAsync(AsyncEvent event) throws IOException {
// NOOP