Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Page 1   2   3   4   5  
examples.hellofilters.* (2)examples.helloworld.* (1)examples.indexes.* (4)
examples.injection.* (2)examples.inneractions.* (1)examples.ioc.* (4)
examples.jaxb.* (8)examples.lf5.* (8)  
examples.mixin.* (4)examples.multimethod.* (3)examples.nntp.* (5)
examples.ntp.* (2)examples.ojb.* (7)examples.omnidas.* (16)

example: Javadoc index of package example.


Package Samples:

examples.ojb.ejb
examples.omnidas
examples.jaxb.das
examples.jaxb
examples.jaxb.bsml
examples.jaxb.tequila
examples.jaxb.bsml2_2
examples.mixin
examples.multimethod
examples.indexes
examples.nntp
examples.ntp
examples.lf5.InitUsingDefaultConfigurator
examples.lf5.InitUsingLog4JProperties
examples.lf5.InitUsingMultipleAppenders
examples.lf5.InitUsingPropertiesFile
examples.lf5.InitUsingXMLPropertiesFile
examples.lf5.UsingLogMonitorAdapter
examples.lf5.UsingSocketAppenders

Classes:

NumberCruncherServer: A simple NumberCruncher implementation that logs its progress when factoring numbers. The purpose of the whole exercise is to show the use of nested diagnostic contexts in order to distinguish the log output from different client requests. Usage: java org.apache.log4j.examples.NumberCruncherServer configFile       where configFile is a log4j configuration file. We supply a simple config file factor.lcf for directing log output to the file factor.log . Try it yourself by starting a NumberCruncherServer and make queries from multiple NumberCruncherClients to factor numbers. ...
ParseTopicMap: Example command-line application which loads a topic map into a topic map provider and then prints out the topics that it contains. This example shows: 1) How different back-ends can be used without changing the source code 2) How to parse an XTM or LTM file from the local file system or from a URL 3) How to create an XTM 'consistent' topic map. This application can be invoked as follows: java [-Dbackend_option=value] examples.basic.ParseTopicMap input_address [ backend_class_name ] where: backend_option is any back-end configuration option that is supported by the back-end and value is the value ...
Trivial: View the source code of this a trivial usage example. Running java examples.Trivial should output something similar to: 0 INFO [main] examples.Trivial (Client #45890) - Awake awake. Put on thy strength. 15 DEBUG [main] examples.Trivial (Client #45890 DB) - Now king David was old. 278 INFO [main] examples.Trivial$InnerTrivial (Client #45890) - Entered foo. 293 INFO [main] examples.Trivial (Client #45890) - Exiting Trivial. The increasing numbers at the beginning of each line are the times elapsed since the start of the program. The string between the parentheses is the nested diagnostic context. ...
InitUsingMultipleAppenders: This example shows how to use LogFactor5 with other Log4J appenders (In this case the RollingFileAppender). The following lines can be added to the log4j.properties file or a standard Java properties file. # Two appenders are registered with the root of the Category tree. log4j.rootCategory=, A1, R # A1 is set to be a LF5Appender which outputs to a swing # logging console. log4j.appender.A1=org.apache.log4j.lf5.LF5Appender # R is the RollingFileAppender that outputs to a rolling log # file called rolling_log_file.log. log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=rolling_log_file.log ...
rlogin: This is an example program demonstrating how to use the RLoginClient class. This program connects to an rlogin daemon and begins to interactively read input from stdin (this will be line buffered on most systems, so don't expect character at a time interactivity), passing it to the remote login process and writing the remote stdout and stderr to local stdout. If you don't have .rhosts or hosts.equiv files set up, the rlogin daemon will prompt you for a password. On Unix systems you will not be able to use the rshell capability unless the process runs as root since only root can bind port addresses ...
ImageViewer: This example is a small application that stores and displays images held on a postgresql database. Before running this application, you need to create a database, and on the first time you run it, select "Initialise" in the "PostgreSQL" menu. Important note: You will notice we import the org.postgresql.largeobject package, but don't import the org.postgresql package. The reason for this is that importing postgresql can confuse javac (we have conflicting class names in org.postgresql.* and java.sql.*). This doesn't cause any problems, as long as no code imports org.postgresql. Under normal circumstances, ...
Sort: Example code for log4j to viewed in conjunction with the SortAlgo class. This program expects a configuration file name as its first argument, and the size of the array to sort as the second and last argument. See its source code for more details. Play around with different values in the configuration file and watch the changing behavior. Example configuration files can be found in sort1.properties , sort2.properties , sort3.properties and sort4.properties are supplied with the package. If you are also interested in logging performance, then have look at the org.apache.log4j.performance.Logging ...
strings: This is a test program demonstrating how to search an input stream with the jakarta-oro awk package regular expression classes. It performs a function similar to the Unix strings command, but is intended to show how matching on a stream is affected by its character encoding. The most important thing to remember is that AwkMatcher only matches on 8-bit values. If your input contains Java characters containing values greater than 255, the pattern matching process will result in an ArrayIndexOutOfBoundsException. Therefore, if you want to search a binary file containing arbitrary bytes, you have to ...
NumberCruncherClient: NumberCruncherClient is a simple client for factoring integers. A remote NumberCruncher is contacted and asked to factor an integer. The factors returned by the NumberCruncherServer are displayed on the screen. See source code of NumberCruncherClient for more details. Usage: java org.apache.log4j.examples.NumberCruncherClient HOST     where HOST is the machine where the NumberCruncherServer is running Note that class files for the example code is not included in any of the distributed log4j jar files. You will have to add the directory /dir-where-you-unpacked-log4j/classes to ...
WalkerExample: An example of using the WalkerHandler and WalkerFilter interfaces to process a topic map. This application first uses a WalkerHandler implementation to print out all of the objects in a topic map; then by inserting a WalkerFilter implementation into the processing chain, the application uses the same WalkerHandler implementation to print out just the Associations in the topic map. This application can be invoked from the command-line as follows: java examples.basic.WalkerExample [ topic_map ] where topic_map is the name of the XTM file to be processed. If this parameter is not specified, it will ...
AdapterClass: The metaclass AdapterClass supports classes implementing an adapter role of the Adapter pattern. The target's methods with same signatures as the adaptee's are automatically implemented into the adapter class. For example, the class VectorStack : public class VectorStack instantiates AdapterClass adapts Vector in v to Stack { Vector v; public VectorStack( Vector v ) { this.v = v; } public void push( Object o ) { v.addElement( o ); } public Object pop() { return v.removeElementAt( v.size() - 1 ); } } would be automatically implemented with the forwarding methods size(), isEmpty(), hashCode(), etc, ...
InitUsingLog4JProperties: This class is a simple example of how to use the LogFactor5 logging window. The LF5Appender is the primary class that enables logging to the LogFactor5 logging window. The simplest method of using this Appender is to add the following line to your log4j.properties file: log4j.appender.A1=org.apache.log4j.lf5.LF5Appender The log4j.properties file MUST be in you system classpath. If this file is in your system classpath, a static initializer in the Category class will load the file during class initialization. The LF5Appender will be added to the root category of the Category tree. Create a log4j.properties ...
IndexingExample: An example application showing how to use the indexing APIs of TM4J. This application parses a topic map and prints out the topic, association and occurrence types found in the map and the number of instances of each. This application should be invoked as follows: java examples.indexes.IndexingExample [ tm_file_name ] Where tm_file_name is the file name of the topic map to be parsed. The topic map file must be in XTM syntax. If this parameter is not defined, tm_file_name defaults to topicmaps/kings_and_queens.xtm which should be a valid topic map file name if this application is run from the examples ...
prefixExample: This is a test program demonstrating an application of the matchesPrefix() methods. This example program shows how you might tokenize a stream of input using whitespace as a token separator. Don't forget to use quotes around the input on the command line, e.g. java prefixExample "Test to see if 1.0 is real and 2 is an integer" If you don't need the power of a full blown lexer generator, you can easily use regular expressions to create your own tokenization and simple parsing classes using similar approaches. This example is rather sloppy. If you look at the equivalent example in the OROMatcher ...
rshell: This is an example program demonstrating how to use the RCommandClient class. This program connects to an rshell daemon and requests that the given command be executed on the server. It then reads input from stdin (this will be line buffered on most systems, so don't expect character at a time interactivity), passing it to the remote process and writes the process stdout and stderr to local stdout. On Unix systems you will not be able to use the rshell capability unless the process runs as root since only root can bind port addresses lower than 1024. Example: java rshell myhost localusername remoteusername ...
tftp: This is an example of a simple Java tftp client using NetComponents. Notice how all of the code is really just argument processing and error handling. Usage: tftp [options] hostname localfile remotefile hostname - The name of the remote host localfile - The name of the local file to send or the name to use for the received file remotefile - The name of the remote file to receive or the name for the remote server to use to name the local file being sent. options: (The default is to assume -r -b) -s Send a local file -r Receive a remote file -a Use ASCII transfer mode -b Use binary transfer mode
CustomIndexExample: This example shows how to create and use a customised index for a topic map. This example can be invoked from the command-line using the command: java examples.indexes.CustomIndexExample [ topic_map [ search_domain ] where topic_map is the name of an XTM topic map file which will be parsed and searched; and search_domain is the domain name which the index will be queried for. Default values are provided for both of these arguments. The default topic map will be loaded correctly if this application is invoked from the examples subdirectory of the TM4J installation.
blobtest: This test attempts to create a blob in the database, then to read it back. Important note: You will notice we import the org.postgresql.largeobject package, but don't import the org.postgresql package. The reason for this is that importing postgresql can confuse javac (we have conflicting class names in org.postgresql.* and java.sql.*). This doesn't cause any problems, as long as no code imports org.postgresql. Under normal circumstances, code using any jdbc driver only needs to import java.sql, so this isn't a problem. It's only if you use the non jdbc facilities, do you have to take this into ...
weatherTelnet: This is an example of a trivial use of the TelnetClient class. It connects to the weather server at the University of Michigan, um-weather.sprl.umich.edu port 3000, and allows the user to interact with the server via standard input. You could use this example to connect to any telnet server, but it is obviously not general purpose because it reads from standard input a line at a time, making it inconvenient for use with a remote interactive shell. The TelnetClient class used by itself is mostly intended for automating access to telnet resources rather than interactive use.
prefixExample: This is a test program demonstrating an application of the matchesPrefix() methods introduced in OROMatcher v1.0.6. This example program shows how you might tokenize a stream of input using whitespace as a token separator. Don't forget to use quotes around the input on the command line, e.g. java prefixExample "Test to see if 1.0 is real and 2 is an integer" If you don't need the power of a full blown lexer generator, you can easily use regular expressions to create your own tokenization and simple parsing classes using similar approaches.
OverrideCheckerClass: The metaclass OverloadCheckerClass provides classes with a facility of checking if a method overrides the method of its superclass. The class MyObject following is a use-case of this metaclass: class MyObject instantiates OverrideCheckerClass { public overriding tostring( Object[] arg ) { .. } } Here, you intend to override the method toString() surely. Compilation of this class shows warning that you do not override any method. This can help you to become aware of potential bugs.
NTPClient: This is an example program demonstrating how to use the NTPUDPClient class. This program sends a Datagram client request packet to a Network time Protocol (NTP) service port on a specified server, retrieves the time, and prints it to standard output along with the fields from the NTP message header (e.g. stratum level, reference id, poll interval, root delay, mode, ...) See the spec for details. Usage: NTPClient Example: NTPClient clock.psu.edu
AddressAction: A simple action that handles the display and editing of an addres record. This action works with both JSP and Velocity templates. The type of template to be used is defined in the Struts configuration file. The action support an action URL parameter. This URL parameter controls what this action class does. The following values are supported: list - list address record, this is the default if no action parameter is specified edit - edit address record save - save address record
IOUtil: This is a utility class providing a reader/writer capability required by the weatherTelnet, rexec, rshell, and rlogin example programs. The only point of the class is to hold the static method readWrite which spawns a reader thread and a writer thread. The reader thread reads from a local input source (presumably stdin) and writes the data to a remote output destination. The writer thread reads from a remote input source and writes to a local output destination. The threads terminate when the remote input source closes.
rexec: This is an example program demonstrating how to use the RExecClient class. This program connects to an rexec server and requests that the given command be executed on the server. It then reads input from stdin (this will be line buffered on most systems, so don't expect character at a time interactivity), passing it to the remote process and writes the process stdout and stderr to local stdout. Example: java rexec myhost myusername mypassword "ps -aux" Usage: rexec

Home | Contact Us | Privacy Policy | Terms of Service