jaminid-0.99a/0000755000175000017500000000000011217365120011665 5ustar railrailjaminid-0.99a/.classpath0000644000175000017500000000034210166250235013651 0ustar railrail jaminid-0.99a/LICENSE0000755000175000017500000006363711217365120012714 0ustar railrail GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! jaminid-0.99a/config/0000755000175000017500000000000011217365116013137 5ustar railrailjaminid-0.99a/config/MIME.XML0000644000175000017500000000122610166321245014246 0ustar railrail JAMINID MIMETYPES These are the default MIME types for the jaminid daemon. If you had a modified but invalid MIME file here, it may have been reverted to this. image/jpeg text/plain image/gif text/html text/css text/html audio/mp3 image/jpeg image/png jaminid-0.99a/.settings/0000755000175000017500000000000011217365120013603 5ustar railrailjaminid-0.99a/.settings/org.eclipse.jdt.core.prefs0000644000175000017500000000050310166250235020565 0ustar railrail#Mon Jan 03 11:54:52 EET 2005 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 jaminid-0.99a/README.TXT0000644000175000017500000000211210445140067013222 0ustar railrailJaminid Readme file -------------------s To the java developer: Important classes: com.prolixtech.jaminid.Daemon - The HTTP Daemon com.prolixtech.jaminid.ContentOracle - The class you have to extend in your application Not so important but useful: com.prolixtech.jaminid.Protocol - Captures some important information about HTTP Examples of Usage: ------------------------------------------------------ look in com.prolixtech.jaminid_examples. - com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer ------------------------------------------------------ The most complete example; includes some templating code, some ajax routines (javascript and oracle functions) as well as a neat design! Also look at the documentation in /doc. Running the example: ------------------------------------------------------ From the main (Jaminid) directory, run: java -cp src/ com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer Comments and Feedback: ------------------------------------------------------ Send these to the contacts on jaminid.sourceforge.net. Thanks for using Jaminid. jaminid-0.99a/bin/0000755000175000017500000000000011217365120012435 5ustar railrailjaminid-0.99a/.project0000644000175000017500000000055610166250235013344 0ustar railrail Jaminid org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature jaminid-0.99a/doc/0000755000175000017500000000000011217365120012432 5ustar railrailjaminid-0.99a/doc/overview-frame.html0000644000175000017500000000267110422252526016266 0ustar railrail Overview
All Classes

Packages
com.prolixtech.jaminid
com.prolixtech.jaminid_examples
com.prolixtech.jaminid_examples.ajax
com.prolixtech.utils

  jaminid-0.99a/doc/jaminid.css0000644000175000017500000000007010166321245014556 0ustar railrailbody { font-family: Arial, Helvetica, sans-serif; } jaminid-0.99a/doc/package-list0000644000175000017500000000016110422252526014721 0ustar railrailcom.prolixtech.jaminid com.prolixtech.jaminid_examples com.prolixtech.jaminid_examples.ajax com.prolixtech.utils jaminid-0.99a/doc/deprecated-list.html0000644000175000017500000001156410422252526016402 0ustar railrail Deprecated List


Deprecated API


Contents


jaminid-0.99a/doc/jaminid.gif0000644000175000017500000000707510166321245014547 0ustar railrailGIF89aR4GBS]ljxxˮO`ŠһQZ`6AG^glyltxCNS=)>*R@_NeUpaqbwiw# $%')*+,/125!6"8$<)?,@-C0O=RA^NfWl^m_n`vhyl{ny~¼ľ~~~xxxssskkk___,RH*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JT(G']t#Ҥ?QJS `@e֭]9>hZoÚt ܌cm ݊Rp]bݙ/Z  &RHd @h}ї ]2lP} $8ЀvJč Σ.zQ#B-[g2N~"s"1M\8hu"'Tӂw?$!E -P](p@ =o9aCօ 4ȶ 8!\}AAt@yER46ls 4ΈҌ4cC%5I @8Yw V%!\EPZ (Љo1Acи)5$sL61"+hSBIĤBЁD@5@֥BlRvm)\%*B*GP'Ȣ *rK-IJ$d -لP)R$DeNZf:զЪ ]y|#- '(b&(#0C#& 1[P hE dg:`1p0`N6Ħ\z)g<%Ԫ| 颺L7 *R #L&H"( Bt }ZZI t\AkPHy@'BDn$ %py|BH(|b2uDSVA`lo:ndY-kAX-qB\E ELW +J UdӋD)BRD"r0E/ ]A} fv [Zgp% (ab xJ3h0/qG|"P)M@b@!DAJhD'.´"Kg 20LoB S! PwJ F B@#b ܠD,^E @A '|IBPE,ʈ3N$iq!\gxX %bxǁ(xH gE+ސ &8Rx+0Bܡ %v=o?\:"|HKzo@̅ @dyaE2t 3DVD$b1\H <w/>R}H)"6 Îw!K ': BE _+i_T ^KWj?Q^nPBD(RA: b#(fMp2NDTN e LG%Zqi,O˹ǟ_R #NL,^q\!dAFbt)]huw0 DEN g`Bx&61 ;z`.A QE2d}9AԐvF8~ަA>`yD4BqEp(j H%$QV8@$(N _*<8d{ 2Si`Z ZD2`1-BT0xыKL-! Y5`fU<zwz s!w.'{ P  b PY)?5XϷiXp}Gmǀ;* 8w0 Ġ ` : p ǐ n$G)K\3Hiv>ǃd(0qqT4} à [yT_ T\0i%68Y x}ep:8 PDp&FxB6p` s |A}^PhCX9}q"`XX'811OpĘ-}Q!ЈiP}!x%!$ .haHS9؎@$X,J؏A#<X FM0ِ1W;By`>87mMB0"ِ)A0e5@(pf0":<ٓ>@B9DYFyHJL;jaminid-0.99a/doc/resources/0000755000175000017500000000000011217365117014452 5ustar railrailjaminid-0.99a/doc/resources/inherit.gif0000644000175000017500000000007110422252526016575 0ustar railrailGIF89a, DrjԐ;߀Q@N;jaminid-0.99a/doc/overview-summary.html0000644000175000017500000001353210422252526016667 0ustar railrail Overview

Jaminid User Documentation (javadoc)

Packages
com.prolixtech.jaminid  
com.prolixtech.jaminid_examples  
com.prolixtech.jaminid_examples.ajax  
com.prolixtech.utils  

 



jaminid-0.99a/doc/overview-tree.html0000644000175000017500000002215110422252526016126 0ustar railrail Class Hierarchy

Hierarchy For All Packages

Package Hierarchies:
com.prolixtech.jaminid, com.prolixtech.jaminid_examples, com.prolixtech.jaminid_examples.ajax, com.prolixtech.utils

Class Hierarchy

Interface Hierarchy

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)


jaminid-0.99a/doc/javadoc/0000755000175000017500000000000011217365117014047 5ustar railrailjaminid-0.99a/doc/javadoc/overview-frame.html0000644000175000017500000000237010166321245017671 0ustar railrail Overview
All Classes

Packages
com.prolixtech.jaminid
com.prolixtech.jaminid_examples
com.prolixtech.utils

  jaminid-0.99a/doc/javadoc/package-list0000644000175000017500000000011710166321245016331 0ustar railrailcom.prolixtech.jaminid com.prolixtech.jaminid_examples com.prolixtech.utils jaminid-0.99a/doc/javadoc/deprecated-list.html0000644000175000017500000001156110166321245020006 0ustar railrail Deprecated List


Deprecated API


Contents


jaminid-0.99a/doc/javadoc/resources/0000755000175000017500000000000011217365117016061 5ustar railrailjaminid-0.99a/doc/javadoc/resources/inherit.gif0000644000175000017500000000007110166321245020204 0ustar railrailGIF89a, DrjԐ;߀Q@N;jaminid-0.99a/doc/javadoc/overview-summary.html0000644000175000017500000001314310166321245020274 0ustar railrail Overview

jaminid JavaDoc

Packages
com.prolixtech.jaminid  
com.prolixtech.jaminid_examples  
com.prolixtech.utils  

 



jaminid-0.99a/doc/javadoc/overview-tree.html0000644000175000017500000002145610166321245017544 0ustar railrail Class Hierarchy

Hierarchy For All Packages

Package Hierarchies:
com.prolixtech.jaminid, com.prolixtech.jaminid_examples, com.prolixtech.utils

Class Hierarchy

Interface Hierarchy

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)


jaminid-0.99a/doc/javadoc/allclasses-frame.html0000644000175000017500000000604510166321245020154 0ustar railrail All Classes All Classes
Client
Connection
ContentOracle
Daemon
HelloWorldServer
JavaLogger
MboxLogger
MusicStream
NullLogger
Protocol
ProtocolResponseHeader
Request
Response
SimpleServer
SingleLineFormatter
SingletonLogger
StreamBundle
StreamingOracle
Suspender
jaminid-0.99a/doc/javadoc/index.html0000644000175000017500000000247510166321245016050 0ustar railrail Generated Documentation (Untitled) <H2> Frame Alert</H2> <P> This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. <BR> Link to<A HREF="overview-summary.html">Non-frame version.</A> jaminid-0.99a/doc/javadoc/help-doc.html0000644000175000017500000002262110166321245016427 0ustar railrail API Help

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Overview

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Enums
  • Exceptions
  • Errors
  • Annotation Types

Class/Interface

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Annotation Type

Each annotation type has its own separate page with the following sections:

  • Annotation Type declaration
  • Annotation Type description
  • Required Element Summary
  • Optional Element Summary
  • Element Detail

Enum

Each enum has its own separate page with the following sections:

  • Enum declaration
  • Enum description
  • Enum Constant Summary
  • Enum Constant Detail

Use

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

Constant Field Values

The Constant Field Values page lists the static final fields and their values.

This help file applies to API documentation generated using the standard doclet.



jaminid-0.99a/doc/javadoc/constant-values.html0000644000175000017500000005577010166321245020075 0ustar railrail Constant Field Values

Constant Field Values


Contents
com.prolixtech.*

com.prolixtech.jaminid.Daemon
public static final java.lang.String VERSION "0.2a"

com.prolixtech.jaminid.Protocol
public static final int ACCEPTED 202
public static final int BAD_GATEWAY 502
public static final int BAD_REQUEST 400
public static final int CONFLICT 409
public static final int CONTINUE 100
public static final int CREATED 201
public static final int EXPECTATION_FAILED 417
public static final int FORBIDDEN 403
public static final int GATEWAY_TIMEOUT 504
public static final int GONE 410
public static final java.lang.String HQ_IFMODSINCE "If-Modified-Since"
public static final java.lang.String HTTP_VERSION "HTTP/1.1"
public static final int HTTP_VERSION_NOT_SUPPORTED 505
public static final int INTERNAL_SERVER_ERROR 500
public static final int LENGTH_REQUIRED 411
public static final java.lang.String MIMEFILE "config/MIME.XML"
public static final int MOVED_PERMANENTLY 301
public static final int MOVED_TEMPORARILY 302
public static final int MULTIPLE_CHOICE 300
public static final int NO_CONTENT 204
public static final int NONE_ACCEPTABLE 406
public static final int NOT_ALLOWED 405
public static final int NOT_FOUND 404
public static final int NOT_IMPLEMENTED 501
public static final int NOT_MODIFIED 304
public static final int OK 200
public static final int PARTIAL_CONTENT 206
public static final int PAYMENT_REQUIRED 402
public static final int PRECONDITION_FAILED 412
public static final int PROVISIONAL_INFORMATION 203
public static final int PROXY_AUTH_REQUIRED 407
public static final int REQUEST_ENTITY_TOO_LARGE 413
public static final int REQUEST_TIMEOUT 408
public static final int REQUEST_URI_TOO_LONG 414
public static final int REQUESTED_RANGE_NOT_SATISFIABLE 416
public static final int RESET_CONTENT 205
public static final int SEE_OTHER 303
public static final int SERVICE_UNAVAILABLE 503
public static final int SWITCHING 101
public static final int UNAUTHORIZED 401
public static final int UNSUPPORTED_MEDIA_TYPE 415
public static final int USE_PROXY 305

com.prolixtech.jaminid.StreamingOracle
public static final java.lang.String PATH_START "/streams/"

com.prolixtech.jaminid_examples.HelloWorldServer
public static final int PORT 80



jaminid-0.99a/doc/javadoc/index-files/0000755000175000017500000000000011217365117016256 5ustar railrailjaminid-0.99a/doc/javadoc/index-files/index-9.html0000644000175000017500000002256410166321245020426 0ustar railrail I-Index
A B C D E F G H I J L M N O P R S T U V W

I

info(String) - Method in class com.prolixtech.utils.JavaLogger
Shortcut to submit a log message at the level INFO
info(String) - Method in interface com.prolixtech.utils.MboxLogger
Shortcut to submit a log message at the level INFO
info(String) - Method in class com.prolixtech.utils.NullLogger
 
Instance() - Static method in class com.prolixtech.jaminid.ContentOracle
pertains to the singleton DESIGN PATTERN
Instance() - Static method in class com.prolixtech.jaminid.Protocol
 
Instance() - Static method in class com.prolixtech.jaminid.StreamingOracle
 
Instance() - Static method in class com.prolixtech.utils.JavaLogger
Pertains to the Singleton DESIGN PATTERN.
Instance() - Static method in class com.prolixtech.utils.NullLogger
 
Instance() - Static method in class com.prolixtech.utils.SingletonLogger
 
INTERNAL_SERVER_ERROR - Static variable in class com.prolixtech.jaminid.Protocol
 
isRequestBad() - Method in class com.prolixtech.jaminid.Request
 
isRunning() - Method in class com.prolixtech.jaminid.Daemon
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-12.html0000644000175000017500000002154610166321245020477 0ustar railrail M-Index
A B C D E F G H I J L M N O P R S T U V W

M

main(String[]) - Static method in class com.prolixtech.jaminid.Daemon
 
main(String[]) - Static method in class com.prolixtech.jaminid_examples.HelloWorldServer
 
main(String[]) - Static method in class com.prolixtech.jaminid_examples.SimpleServer
 
makeNewMIME() - Static method in class com.prolixtech.jaminid.Protocol
Creates a new mime file with the bare basic defaults
MboxLogger - Interface in com.prolixtech.utils
 
MIMEFILE - Static variable in class com.prolixtech.jaminid.Protocol
 
MOVED_PERMANENTLY - Static variable in class com.prolixtech.jaminid.Protocol
 
MOVED_TEMPORARILY - Static variable in class com.prolixtech.jaminid.Protocol
 
MULTIPLE_CHOICE - Static variable in class com.prolixtech.jaminid.Protocol
 
MusicStream - Interface in com.prolixtech.jaminid
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-10.html0000644000175000017500000001535010166321245020471 0ustar railrail J-Index
A B C D E F G H I J L M N O P R S T U V W

J

JavaLogger - Class in com.prolixtech.utils
This class provides a single logging utility used for debugging purposes.
JavaLogger() - Constructor for class com.prolixtech.utils.JavaLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-6.html0000644000175000017500000001704510166321245020421 0ustar railrail F-Index
A B C D E F G H I J L M N O P R S T U V W

F

fine(String) - Method in class com.prolixtech.utils.JavaLogger
Shortcut to submit a log message at the level FINE
fine(String) - Method in interface com.prolixtech.utils.MboxLogger
 
fine(String) - Method in class com.prolixtech.utils.NullLogger
 
FORBIDDEN - Static variable in class com.prolixtech.jaminid.Protocol
 
format(LogRecord) - Method in class com.prolixtech.utils.SingleLineFormatter
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-3.html0000644000175000017500000002427010166321245020414 0ustar railrail C-Index
A B C D E F G H I J L M N O P R S T U V W

C

checkParam(String, String) - Method in class com.prolixtech.jaminid.Request
 
Client - Class in com.prolixtech.jaminid
 
Client() - Constructor for class com.prolixtech.jaminid.Client
 
clone() - Method in interface com.prolixtech.jaminid.MusicStream
 
com.prolixtech.jaminid - package com.prolixtech.jaminid
 
com.prolixtech.jaminid_examples - package com.prolixtech.jaminid_examples
 
com.prolixtech.utils - package com.prolixtech.utils
 
CONFLICT - Static variable in class com.prolixtech.jaminid.Protocol
 
Connection - Class in com.prolixtech.jaminid
The connection is a thread-of-service spanwed by the Daemon.
Connection(Socket, Daemon) - Constructor for class com.prolixtech.jaminid.Connection
default constructor to create a Connection
ContentOracle - Class in com.prolixtech.jaminid
The content oracle is a very special class.
ContentOracle() - Constructor for class com.prolixtech.jaminid.ContentOracle
 
CONTINUE - Static variable in class com.prolixtech.jaminid.Protocol
 
CREATED - Static variable in class com.prolixtech.jaminid.Protocol
 
cRep - Variable in class com.prolixtech.jaminid.ContentOracle
 
cReq - Variable in class com.prolixtech.jaminid.ContentOracle
 
CRLF() - Method in class com.prolixtech.jaminid.Response
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-18.html0000644000175000017500000001635410166321245020506 0ustar railrail T-Index
A B C D E F G H I J L M N O P R S T U V W

T

tearDown() - Method in class com.prolixtech.jaminid.Daemon
tears down server
tearDownAndWait() - Method in class com.prolixtech.jaminid.Daemon
Tears down server and waits for it to tear down
theInstance - Static variable in class com.prolixtech.jaminid.ContentOracle
 
toString() - Method in class com.prolixtech.jaminid.Daemon
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-13.html0000644000175000017500000002024710166321245020475 0ustar railrail N-Index
A B C D E F G H I J L M N O P R S T U V W

N

NO_CONTENT - Static variable in class com.prolixtech.jaminid.Protocol
 
NONE_ACCEPTABLE - Static variable in class com.prolixtech.jaminid.Protocol
 
NOT_ALLOWED - Static variable in class com.prolixtech.jaminid.Protocol
 
NOT_FOUND - Static variable in class com.prolixtech.jaminid.Protocol
 
NOT_IMPLEMENTED - Static variable in class com.prolixtech.jaminid.Protocol
 
NOT_MODIFIED - Static variable in class com.prolixtech.jaminid.Protocol
 
NullLogger - Class in com.prolixtech.utils
 
NullLogger() - Constructor for class com.prolixtech.utils.NullLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-17.html0000644000175000017500000003716210166321245020505 0ustar railrail S-Index
A B C D E F G H I J L M N O P R S T U V W

S

SEE_OTHER - Static variable in class com.prolixtech.jaminid.Protocol
 
sendCookie15DG(String, String) - Method in class com.prolixtech.jaminid.Response
sets a fifteen day cookie
sendFile(File) - Method in class com.prolixtech.jaminid.Response
sends a file to the client.
sendString(Object) - Method in class com.prolixtech.jaminid.Connection
Sends a string to the client
sendString(byte[]) - Method in class com.prolixtech.jaminid.Connection
 
SERVICE_UNAVAILABLE - Static variable in class com.prolixtech.jaminid.Protocol
 
setCookie(String, String, String, Date) - Method in class com.prolixtech.jaminid.Response
sets a cookie
setFullPath(String) - Method in interface com.prolixtech.jaminid.StreamBundle
 
setHeaderLine(ProtocolResponseHeader, String) - Method in class com.prolixtech.jaminid.Response
sets one particular header line
setLog(boolean) - Static method in class com.prolixtech.utils.SingletonLogger
 
setMethodLine(String) - Method in class com.prolixtech.jaminid.Request
 
setStatus(int) - Method in class com.prolixtech.jaminid.Response
sets the status of the response to a certain HTTP status code
severe(String) - Method in class com.prolixtech.utils.JavaLogger
Shortcut to submit a log message at the level SEVERE
severe(String) - Method in interface com.prolixtech.utils.MboxLogger
Shortcut to submit a log message at the level SEVERE
severe(String) - Method in class com.prolixtech.utils.NullLogger
 
SimpleServer - Class in com.prolixtech.jaminid_examples
 
SimpleServer() - Constructor for class com.prolixtech.jaminid_examples.SimpleServer
 
SingleLineFormatter - Class in com.prolixtech.utils
 
SingleLineFormatter() - Constructor for class com.prolixtech.utils.SingleLineFormatter
 
SingletonLogger - Class in com.prolixtech.utils
This class provides a single logging utility used for debugging purposes.
SingletonLogger() - Constructor for class com.prolixtech.utils.SingletonLogger
 
sql(String) - Method in class com.prolixtech.utils.JavaLogger
Specialized submit for SQL messages
sql(String) - Method in interface com.prolixtech.utils.MboxLogger
 
sql(String) - Method in class com.prolixtech.utils.NullLogger
 
StreamBundle - Interface in com.prolixtech.jaminid
 
StreamingOracle - Class in com.prolixtech.jaminid
 
StreamingOracle() - Constructor for class com.prolixtech.jaminid.StreamingOracle
 
streamOut - Variable in class com.prolixtech.jaminid.ContentOracle
 
Suspender - Class in com.prolixtech.utils
 
Suspender() - Constructor for class com.prolixtech.utils.Suspender
 
suspendMillis(long) - Static method in class com.prolixtech.utils.Suspender
 
suspendSeconds(int) - Static method in class com.prolixtech.utils.Suspender
 
SWITCHING - Static variable in class com.prolixtech.jaminid.Protocol
 
switchToBody() - Method in class com.prolixtech.jaminid.Request
 
switchToCompleted() - Method in class com.prolixtech.jaminid.Request
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-15.html0000644000175000017500000002271710166321245020503 0ustar railrail P-Index
A B C D E F G H I J L M N O P R S T U V W

P

PARTIAL_CONTENT - Static variable in class com.prolixtech.jaminid.Protocol
 
PATH_START - Static variable in class com.prolixtech.jaminid.StreamingOracle
 
PAYMENT_REQUIRED - Static variable in class com.prolixtech.jaminid.Protocol
 
PORT - Static variable in class com.prolixtech.jaminid_examples.HelloWorldServer
 
PRECONDITION_FAILED - Static variable in class com.prolixtech.jaminid.Protocol
 
printlog(String) - Method in class com.prolixtech.jaminid.Daemon
 
Protocol - Class in com.prolixtech.jaminid
This class captures the essential messages in the HTTP protocol.
ProtocolResponseHeader - Enum in com.prolixtech.jaminid
 
PROVISIONAL_INFORMATION - Static variable in class com.prolixtech.jaminid.Protocol
 
PROXY_AUTH_REQUIRED - Static variable in class com.prolixtech.jaminid.Protocol
 
publishHeader() - Method in class com.prolixtech.jaminid.Response
Sends the header to the client.
publishStream(StreamBundle, String) - Method in class com.prolixtech.jaminid.StreamingOracle
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-19.html0000644000175000017500000001574410166321245020511 0ustar railrail U-Index
A B C D E F G H I J L M N O P R S T U V W

U

UNAUTHORIZED - Static variable in class com.prolixtech.jaminid.Protocol
 
UNSUPPORTED_MEDIA_TYPE - Static variable in class com.prolixtech.jaminid.Protocol
 
USE_PROXY - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-1.html0000644000175000017500000001572610166321245020420 0ustar railrail A-Index
A B C D E F G H I J L M N O P R S T U V W

A

ACCEPTED - Static variable in class com.prolixtech.jaminid.Protocol
 
addRequestLines(String) - Method in class com.prolixtech.jaminid.Request
Method Adds Request Lines
appendToBody(String) - Method in class com.prolixtech.jaminid.Request
appends more stuff to body of request

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-7.html0000644000175000017500000003441210166321245020417 0ustar railrail G-Index
A B C D E F G H I J L M N O P R S T U V W

G

GATEWAY_TIMEOUT - Static variable in class com.prolixtech.jaminid.Protocol
 
getBody() - Method in class com.prolixtech.jaminid.Request
Used in POST to return the body of the request
getByteSizeForTime(int) - Method in interface com.prolixtech.jaminid.MusicStream
 
getContent(String, int, String) - Method in class com.prolixtech.jaminid.Client
 
getContent(String, int, Request) - Method in class com.prolixtech.jaminid.Client
 
getDaemon() - Method in class com.prolixtech.jaminid.Request
Returns the master daemon
getDelegatedOracle(Request) - Method in class com.prolixtech.jaminid.ContentOracle
 
getGMTString(Date) - Static method in class com.prolixtech.jaminid.Connection
 
getHeader() - Method in class com.prolixtech.jaminid.Request
Returns header
getHeaderResponseStatus(int) - Static method in class com.prolixtech.jaminid.Protocol
gets a String description of the status code e.g (200 OK) or (404 FnF)
getIPAddressString() - Method in class com.prolixtech.jaminid.Connection
 
getIPAddressString() - Method in class com.prolixtech.jaminid.Request
 
getLocation() - Method in class com.prolixtech.jaminid.Request
Return the location sought
getLogger() - Method in class com.prolixtech.utils.JavaLogger
For manual submission directly to the logger
getLogger() - Method in class com.prolixtech.utils.NullLogger
 
getMessage() - Method in class com.prolixtech.jaminid.Request
Returns the entire request message
getMIME(String) - Static method in class com.prolixtech.jaminid.Protocol
MIME type accessor.
getNextBatch(Request, Response) - Method in class com.prolixtech.jaminid.StreamingOracle
 
getOracle() - Method in class com.prolixtech.jaminid.Daemon
 
getParam(String) - Method in class com.prolixtech.jaminid.Request
 
getParamMap() - Method in class com.prolixtech.jaminid.Request
 
getParamOrNull(String) - Method in class com.prolixtech.jaminid.Request
 
getParamString() - Method in class com.prolixtech.jaminid.Request
 
getPos() - Method in interface com.prolixtech.jaminid.MusicStream
 
getProtocol() - Method in class com.prolixtech.jaminid.Daemon
 
getServerPort() - Method in class com.prolixtech.jaminid.Daemon
returns the server port
getStream(Request) - Method in interface com.prolixtech.jaminid.StreamBundle
 
getStreamInterval() - Method in class com.prolixtech.jaminid.StreamingOracle
 
getURI() - Method in class com.prolixtech.jaminid.Request
Returns the Uniform Resource Identifier
GONE - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-16.html0000644000175000017500000002357510166321245020507 0ustar railrail R-Index
A B C D E F G H I J L M N O P R S T U V W

R

readNext(int) - Method in interface com.prolixtech.jaminid.MusicStream
 
Request - Class in com.prolixtech.jaminid
The request class encapsulates an HTTP request.
Request(Daemon, Connection) - Constructor for class com.prolixtech.jaminid.Request
Creates a new request object
REQUEST_ENTITY_TOO_LARGE - Static variable in class com.prolixtech.jaminid.Protocol
 
REQUEST_TIMEOUT - Static variable in class com.prolixtech.jaminid.Protocol
 
REQUEST_URI_TOO_LONG - Static variable in class com.prolixtech.jaminid.Protocol
 
REQUESTED_RANGE_NOT_SATISFIABLE - Static variable in class com.prolixtech.jaminid.Protocol
 
requestHeaderExists(String) - Static method in class com.prolixtech.jaminid.Protocol
checks if a request header exists in the protocol
RESET_CONTENT - Static variable in class com.prolixtech.jaminid.Protocol
 
Response - Class in com.prolixtech.jaminid
The response class encapsulates an HTTP response.
Response(int, Protocol, OutputStream, Request) - Constructor for class com.prolixtech.jaminid.Response
 
run() - Method in class com.prolixtech.jaminid.Connection
The thread runs here.
run() - Method in class com.prolixtech.jaminid.Daemon
Handles listening for new connections and launching client threads

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-4.html0000644000175000017500000002273310166321245020417 0ustar railrail D-Index
A B C D E F G H I J L M N O P R S T U V W

D

Daemon - Class in com.prolixtech.jaminid
As in most HTTP implementations, the Daemon opens a port, listens for incoming connections, and then spawns the connections to serve that connection.
Daemon(int, ContentOracle) - Constructor for class com.prolixtech.jaminid.Daemon
creates a new daemon and opens on specific port
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid.ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request.
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid.StreamingOracle
 
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid_examples.HelloWorldServer
 
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid_examples.SimpleServer
 
disableBaloons() - Method in class com.prolixtech.utils.JavaLogger
 
disableBaloons() - Method in interface com.prolixtech.utils.MboxLogger
 
disableBaloons() - Method in class com.prolixtech.utils.NullLogger
 
disbandStream(Request) - Method in interface com.prolixtech.jaminid.StreamBundle
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-5.html0000644000175000017500000002050010166321245020406 0ustar railrail E-Index
A B C D E F G H I J L M N O P R S T U V W

E

exception(Level, String, Exception) - Method in class com.prolixtech.utils.JavaLogger
 
exception(String, Exception) - Method in class com.prolixtech.utils.JavaLogger
 
exception(Level, String, Exception) - Method in interface com.prolixtech.utils.MboxLogger
 
exception(String, Exception) - Method in interface com.prolixtech.utils.MboxLogger
 
exception(Level, String, Exception) - Method in class com.prolixtech.utils.NullLogger
 
exception(String, Exception) - Method in class com.prolixtech.utils.NullLogger
 
EXPECTATION_FAILED - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-14.html0000644000175000017500000001470210166321245020475 0ustar railrail O-Index
A B C D E F G H I J L M N O P R S T U V W

O

OK - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-2.html0000644000175000017500000001705110166321245020412 0ustar railrail B-Index
A B C D E F G H I J L M N O P R S T U V W

B

BAD_GATEWAY - Static variable in class com.prolixtech.jaminid.Protocol
 
BAD_REQUEST - Static variable in class com.prolixtech.jaminid.Protocol
 
baloon(String, String) - Method in class com.prolixtech.utils.JavaLogger
 
baloon(String, String) - Method in interface com.prolixtech.utils.MboxLogger
 
baloon(String, String) - Method in class com.prolixtech.utils.NullLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-21.html0000644000175000017500000001600510166321245020471 0ustar railrail W-Index
A B C D E F G H I J L M N O P R S T U V W

W

warning(String) - Method in class com.prolixtech.utils.JavaLogger
Shortcut to submit a log message at the level WARNING
warning(String) - Method in interface com.prolixtech.utils.MboxLogger
Shortcut to submit a log message at the level WARNING
warning(String) - Method in class com.prolixtech.utils.NullLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-20.html0000644000175000017500000001625010166321245020472 0ustar railrail V-Index
A B C D E F G H I J L M N O P R S T U V W

V

valueOf(String) - Static method in enum com.prolixtech.jaminid.ProtocolResponseHeader
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.prolixtech.jaminid.ProtocolResponseHeader
Returns an array containing the constants of this enum type, in the order they're declared.
VERSION - Static variable in class com.prolixtech.jaminid.Daemon
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-11.html0000644000175000017500000001667110166321245020501 0ustar railrail L-Index
A B C D E F G H I J L M N O P R S T U V W

L

LENGTH_REQUIRED - Static variable in class com.prolixtech.jaminid.Protocol
 
log(Level, String) - Method in class com.prolixtech.utils.JavaLogger
The main logging function is set by default to output to the console.
log(Level, String) - Method in interface com.prolixtech.utils.MboxLogger
The main logging function is set by default to output to the console.
log(Level, String) - Method in class com.prolixtech.utils.NullLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/index-files/index-8.html0000644000175000017500000002145110166321245020417 0ustar railrail H-Index
A B C D E F G H I J L M N O P R S T U V W

H

HELLO - Static variable in class com.prolixtech.jaminid_examples.HelloWorldServer
 
HelloWorldServer - Class in com.prolixtech.jaminid_examples
 
HelloWorldServer() - Constructor for class com.prolixtech.jaminid_examples.HelloWorldServer
 
HQ_IFMODSINCE - Static variable in class com.prolixtech.jaminid.Protocol
 
http(Request, String) - Method in class com.prolixtech.utils.JavaLogger
Specialized submit for HTTP messages
http(Request, String) - Method in interface com.prolixtech.utils.MboxLogger
Specialized submit for HTTP messages
http(Request, String) - Method in class com.prolixtech.utils.NullLogger
 
HTTP_VERSION - Static variable in class com.prolixtech.jaminid.Protocol
 
HTTP_VERSION_NOT_SUPPORTED - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/javadoc/com/0000755000175000017500000000000011217365117014625 5ustar railrailjaminid-0.99a/doc/javadoc/com/prolixtech/0000755000175000017500000000000011217365117017006 5ustar railrailjaminid-0.99a/doc/javadoc/com/prolixtech/utils/0000755000175000017500000000000011217365117020146 5ustar railrailjaminid-0.99a/doc/javadoc/com/prolixtech/utils/SingletonLogger.html0000644000175000017500000003110310166321245024130 0ustar railrail SingletonLogger

com.prolixtech.utils
Class SingletonLogger

java.lang.Object
  extended by com.prolixtech.utils.NullLogger
      extended by com.prolixtech.utils.SingletonLogger
All Implemented Interfaces:
MboxLogger

public class SingletonLogger
extends NullLogger

This class provides a single logging utility used for debugging purposes. It delegates most of its work to the java logging system, however it is made a singleton here so that it can be used throughout the application.

Author:
Constantinos Michael

Constructor Summary
SingletonLogger()
           
 
Method Summary
static MboxLogger Instance()
           
static void setLog(boolean x)
           
 
Methods inherited from class com.prolixtech.utils.NullLogger
baloon, disableBaloons, exception, exception, fine, getLogger, http, info, log, severe, sql, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonLogger

public SingletonLogger()
Method Detail

setLog

public static void setLog(boolean x)

Instance

public static MboxLogger Instance()


jaminid-0.99a/doc/javadoc/com/prolixtech/utils/JavaLogger.html0000644000175000017500000005417310166321245023063 0ustar railrail JavaLogger

com.prolixtech.utils
Class JavaLogger

java.lang.Object
  extended by com.prolixtech.utils.JavaLogger
All Implemented Interfaces:
MboxLogger

public class JavaLogger
extends java.lang.Object
implements MboxLogger

This class provides a single logging utility used for debugging purposes. It delegates most of its work to the java logging system, however it is made a singleton here so that it can be used throughout the application.

Author:
Constantinos Michael

Constructor Summary
protected JavaLogger()
           
 
Method Summary
 void baloon(java.lang.String msg, java.lang.String title)
           
 void disableBaloons()
           
 void exception(java.util.logging.Level x, java.lang.String msg, java.lang.Exception e)
           
 void exception(java.lang.String msg, java.lang.Exception e)
           
 void fine(java.lang.String msg)
          Shortcut to submit a log message at the level FINE
 java.util.logging.Logger getLogger()
          For manual submission directly to the logger
 void http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 void info(java.lang.String msg)
          Shortcut to submit a log message at the level INFO
static MboxLogger Instance()
          Pertains to the Singleton DESIGN PATTERN.
 void log(java.util.logging.Level vel, java.lang.String msg)
          The main logging function is set by default to output to the console.
 void severe(java.lang.String msg)
          Shortcut to submit a log message at the level SEVERE
 void sql(java.lang.String msg)
          Specialized submit for SQL messages
 void warning(java.lang.String msg)
          Shortcut to submit a log message at the level WARNING
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaLogger

protected JavaLogger()
Method Detail

Instance

public static MboxLogger Instance()
Pertains to the Singleton DESIGN PATTERN.

Returns:
the singleton instance

getLogger

public java.util.logging.Logger getLogger()
For manual submission directly to the logger

Returns:
the logger of this singleton

log

public void log(java.util.logging.Level vel,
                java.lang.String msg)
The main logging function is set by default to output to the console. If we require better logging in the future, perhaps a number of streams will be made. The default operation prints the last function called (gets it through a stacktrace) the message, the time.

Specified by:
log in interface MboxLogger
Parameters:
vel - the level of the message to log.
msg - the message to log.
See Also:
Level

fine

public void fine(java.lang.String msg)
Shortcut to submit a log message at the level FINE

Specified by:
fine in interface MboxLogger
Parameters:
msg - the message to submit

severe

public void severe(java.lang.String msg)
Shortcut to submit a log message at the level SEVERE

Specified by:
severe in interface MboxLogger
Parameters:
msg - the message to submit

warning

public void warning(java.lang.String msg)
Shortcut to submit a log message at the level WARNING

Specified by:
warning in interface MboxLogger
Parameters:
msg - the message to submit

info

public void info(java.lang.String msg)
Shortcut to submit a log message at the level INFO

Specified by:
info in interface MboxLogger
Parameters:
msg - the message to submit

sql

public void sql(java.lang.String msg)
Specialized submit for SQL messages

Specified by:
sql in interface MboxLogger
Parameters:
msg - the message to submit

http

public void http(Request req,
                 java.lang.String msg)
Specialized submit for HTTP messages

Specified by:
http in interface MboxLogger
Parameters:
msg - the message to submit

disableBaloons

public void disableBaloons()
Specified by:
disableBaloons in interface MboxLogger

exception

public void exception(java.util.logging.Level x,
                      java.lang.String msg,
                      java.lang.Exception e)
Specified by:
exception in interface MboxLogger

exception

public void exception(java.lang.String msg,
                      java.lang.Exception e)
Specified by:
exception in interface MboxLogger

baloon

public void baloon(java.lang.String msg,
                   java.lang.String title)
Specified by:
baloon in interface MboxLogger


jaminid-0.99a/doc/javadoc/com/prolixtech/utils/NullLogger.html0000644000175000017500000005476610166321245023124 0ustar railrail NullLogger

com.prolixtech.utils
Class NullLogger

java.lang.Object
  extended by com.prolixtech.utils.NullLogger
All Implemented Interfaces:
MboxLogger
Direct Known Subclasses:
SingletonLogger

public class NullLogger
extends java.lang.Object
implements MboxLogger

Author:
Constantinos Michael

Constructor Summary
NullLogger()
           
 
Method Summary
 void baloon(java.lang.String msg, java.lang.String title)
           
 void disableBaloons()
           
 void exception(java.util.logging.Level x, java.lang.String msg, java.lang.Exception e)
           
 void exception(java.lang.String msg, java.lang.Exception e)
           
 void fine(java.lang.String msg)
           
 java.util.logging.Logger getLogger()
           
 void http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 void info(java.lang.String msg)
          Shortcut to submit a log message at the level INFO
static MboxLogger Instance()
           
 void log(java.util.logging.Level vel, java.lang.String msg)
          The main logging function is set by default to output to the console.
 void severe(java.lang.String msg)
          Shortcut to submit a log message at the level SEVERE
 void sql(java.lang.String msg)
           
 void warning(java.lang.String msg)
          Shortcut to submit a log message at the level WARNING
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullLogger

public NullLogger()
Method Detail

baloon

public void baloon(java.lang.String msg,
                   java.lang.String title)
Specified by:
baloon in interface MboxLogger

getLogger

public java.util.logging.Logger getLogger()

log

public void log(java.util.logging.Level vel,
                java.lang.String msg)
Description copied from interface: MboxLogger
The main logging function is set by default to output to the console. If we require better logging in the future, perhaps a number of streams will be made. The default operation prints the last function called (gets it through a stacktrace) the message, the time.

Specified by:
log in interface MboxLogger
Parameters:
vel - the level of the message to log.
msg - the message to log.
See Also:
Level

fine

public void fine(java.lang.String msg)
Specified by:
fine in interface MboxLogger

severe

public void severe(java.lang.String msg)
Description copied from interface: MboxLogger
Shortcut to submit a log message at the level SEVERE

Specified by:
severe in interface MboxLogger
Parameters:
msg - the message to submit

warning

public void warning(java.lang.String msg)
Description copied from interface: MboxLogger
Shortcut to submit a log message at the level WARNING

Specified by:
warning in interface MboxLogger
Parameters:
msg - the message to submit

info

public void info(java.lang.String msg)
Description copied from interface: MboxLogger
Shortcut to submit a log message at the level INFO

Specified by:
info in interface MboxLogger
Parameters:
msg - the message to submit

sql

public void sql(java.lang.String msg)
Specified by:
sql in interface MboxLogger

http

public void http(Request req,
                 java.lang.String msg)
Description copied from interface: MboxLogger
Specialized submit for HTTP messages

Specified by:
http in interface MboxLogger
msg - the message to submit

disableBaloons

public void disableBaloons()
Specified by:
disableBaloons in interface MboxLogger

exception

public void exception(java.util.logging.Level x,
                      java.lang.String msg,
                      java.lang.Exception e)
Specified by:
exception in interface MboxLogger

exception

public void exception(java.lang.String msg,
                      java.lang.Exception e)
Specified by:
exception in interface MboxLogger

Instance

public static MboxLogger Instance()
Returns:
the a new instance of the logger.


jaminid-0.99a/doc/javadoc/com/prolixtech/utils/package-summary.html0000644000175000017500000001631710166321245024126 0ustar railrail com.prolixtech.utils

Package com.prolixtech.utils

Interface Summary
MboxLogger  
 

Class Summary
JavaLogger This class provides a single logging utility used for debugging purposes.
NullLogger  
SingleLineFormatter  
SingletonLogger This class provides a single logging utility used for debugging purposes.
Suspender  
 



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/package-use.html0000644000175000017500000001507410166321245023224 0ustar railrail Uses of Package com.prolixtech.utils

Uses of Package
com.prolixtech.utils

Packages that use com.prolixtech.utils
com.prolixtech.utils   
 

Classes in com.prolixtech.utils used by com.prolixtech.utils
MboxLogger
           
NullLogger
           
 



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/package-frame.html0000644000175000017500000000312710166321245023516 0ustar railrail com.prolixtech.utils com.prolixtech.utils
Interfaces 
MboxLogger
Classes 
JavaLogger
NullLogger
SingleLineFormatter
SingletonLogger
Suspender
jaminid-0.99a/doc/javadoc/com/prolixtech/utils/MboxLogger.html0000644000175000017500000003641310166321245023104 0ustar railrail MboxLogger

com.prolixtech.utils
Interface MboxLogger

All Known Implementing Classes:
JavaLogger, NullLogger, SingletonLogger

public interface MboxLogger

Author:
Constantinos Michael

Method Summary
 void baloon(java.lang.String msg, java.lang.String title)
           
 void disableBaloons()
           
 void exception(java.util.logging.Level x, java.lang.String msg, java.lang.Exception e)
           
 void exception(java.lang.String msg, java.lang.Exception e)
           
 void fine(java.lang.String msg)
           
 void http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 void info(java.lang.String msg)
          Shortcut to submit a log message at the level INFO
 void log(java.util.logging.Level vel, java.lang.String msg)
          The main logging function is set by default to output to the console.
 void severe(java.lang.String msg)
          Shortcut to submit a log message at the level SEVERE
 void sql(java.lang.String msg)
           
 void warning(java.lang.String msg)
          Shortcut to submit a log message at the level WARNING
 

Method Detail

baloon

void baloon(java.lang.String msg,
            java.lang.String title)

log

void log(java.util.logging.Level vel,
         java.lang.String msg)
The main logging function is set by default to output to the console. If we require better logging in the future, perhaps a number of streams will be made. The default operation prints the last function called (gets it through a stacktrace) the message, the time.

Parameters:
vel - the level of the message to log.
msg - the message to log.
See Also:
Level

fine

void fine(java.lang.String msg)

severe

void severe(java.lang.String msg)
Shortcut to submit a log message at the level SEVERE

Parameters:
msg - the message to submit

warning

void warning(java.lang.String msg)
Shortcut to submit a log message at the level WARNING

Parameters:
msg - the message to submit

info

void info(java.lang.String msg)
Shortcut to submit a log message at the level INFO

Parameters:
msg - the message to submit

sql

void sql(java.lang.String msg)

http

void http(Request req,
          java.lang.String msg)
Specialized submit for HTTP messages

Parameters:
msg - the message to submit

disableBaloons

void disableBaloons()

exception

void exception(java.util.logging.Level x,
               java.lang.String msg,
               java.lang.Exception e)

exception

void exception(java.lang.String msg,
               java.lang.Exception e)


jaminid-0.99a/doc/javadoc/com/prolixtech/utils/class-use/0000755000175000017500000000000011217365117022045 5ustar railrailjaminid-0.99a/doc/javadoc/com/prolixtech/utils/class-use/SingletonLogger.html0000644000175000017500000001315010166321245026031 0ustar railrail Uses of Class com.prolixtech.utils.SingletonLogger

Uses of Class
com.prolixtech.utils.SingletonLogger

No usage of com.prolixtech.utils.SingletonLogger



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/class-use/JavaLogger.html0000644000175000017500000001306610166321245024756 0ustar railrail Uses of Class com.prolixtech.utils.JavaLogger

Uses of Class
com.prolixtech.utils.JavaLogger

No usage of com.prolixtech.utils.JavaLogger



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/class-use/NullLogger.html0000644000175000017500000001641210166321245025005 0ustar railrail Uses of Class com.prolixtech.utils.NullLogger

Uses of Class
com.prolixtech.utils.NullLogger

Packages that use NullLogger
com.prolixtech.utils   
 

Uses of NullLogger in com.prolixtech.utils
 

Subclasses of NullLogger in com.prolixtech.utils
 class SingletonLogger
          This class provides a single logging utility used for debugging purposes.
 



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/class-use/MboxLogger.html0000644000175000017500000002361610166321245025004 0ustar railrail Uses of Interface com.prolixtech.utils.MboxLogger

Uses of Interface
com.prolixtech.utils.MboxLogger

Packages that use MboxLogger
com.prolixtech.utils   
 

Uses of MboxLogger in com.prolixtech.utils
 

Classes in com.prolixtech.utils that implement MboxLogger
 class JavaLogger
          This class provides a single logging utility used for debugging purposes.
 class NullLogger
           
 class SingletonLogger
          This class provides a single logging utility used for debugging purposes.
 

Methods in com.prolixtech.utils that return MboxLogger
static MboxLogger SingletonLogger.Instance()
           
static MboxLogger NullLogger.Instance()
           
static MboxLogger JavaLogger.Instance()
          Pertains to the Singleton DESIGN PATTERN.
 



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/class-use/Suspender.html0000644000175000017500000001305410166321245024702 0ustar railrail Uses of Class com.prolixtech.utils.Suspender

Uses of Class
com.prolixtech.utils.Suspender

No usage of com.prolixtech.utils.Suspender



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/class-use/SingleLineFormatter.html0000644000175000017500000001322010166321245026642 0ustar railrail Uses of Class com.prolixtech.utils.SingleLineFormatter

Uses of Class
com.prolixtech.utils.SingleLineFormatter

No usage of com.prolixtech.utils.SingleLineFormatter



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/Suspender.html0000644000175000017500000002343110166321245023003 0ustar railrail Suspender

com.prolixtech.utils
Class Suspender

java.lang.Object
  extended by com.prolixtech.utils.Suspender

public class Suspender
extends java.lang.Object

Author:
Constantinos Michael

Constructor Summary
Suspender()
           
 
Method Summary
static void suspendMillis(long milliseconds)
           
static void suspendSeconds(int seconds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Suspender

public Suspender()
Method Detail

suspendSeconds

public static void suspendSeconds(int seconds)

suspendMillis

public static void suspendMillis(long milliseconds)


jaminid-0.99a/doc/javadoc/com/prolixtech/utils/package-tree.html0000644000175000017500000001554610166321245023373 0ustar railrail com.prolixtech.utils Class Hierarchy

Hierarchy For Package com.prolixtech.utils

Package Hierarchies:
All Packages

Class Hierarchy

Interface Hierarchy



jaminid-0.99a/doc/javadoc/com/prolixtech/utils/SingleLineFormatter.html0000644000175000017500000002456510166321245024761 0ustar railrail SingleLineFormatter

com.prolixtech.utils
Class SingleLineFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by java.util.logging.SimpleFormatter
          extended by com.prolixtech.utils.SingleLineFormatter

public class SingleLineFormatter
extends java.util.logging.SimpleFormatter


Constructor Summary
SingleLineFormatter()
           
 
Method Summary
 java.lang.String format(java.util.logging.LogRecord record)
           
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleLineFormatter

public SingleLineFormatter()
Method Detail

format

public java.lang.String format(java.util.logging.LogRecord record)
Overrides:
format in class java.util.logging.SimpleFormatter


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/0000755000175000017500000000000011217365117020421 5ustar railrailjaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/StreamingOracle.html0000644000175000017500000004227310166321245024372 0ustar railrail StreamingOracle

com.prolixtech.jaminid
Class StreamingOracle

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
      extended by com.prolixtech.jaminid.StreamingOracle

public class StreamingOracle
extends ContentOracle

Author:
Constantinos Michael

Field Summary
static java.lang.String PATH_START
           
 
Fields inherited from class com.prolixtech.jaminid.ContentOracle
cRep, cReq, streamOut, theInstance
 
Constructor Summary
StreamingOracle()
           
 
Method Summary
 java.lang.String demultiplex(Request cReqL, Response cRepL)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
 byte[] getNextBatch(Request cReqL, Response cRepL)
           
 int getStreamInterval()
           
static ContentOracle Instance()
           
 java.lang.String publishStream(StreamBundle a, java.lang.String path)
           
 
Methods inherited from class com.prolixtech.jaminid.ContentOracle
getDelegatedOracle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_START

public static final java.lang.String PATH_START
See Also:
Constant Field Values
Constructor Detail

StreamingOracle

public StreamingOracle()
Method Detail

publishStream

public java.lang.String publishStream(StreamBundle a,
                                      java.lang.String path)

Instance

public static ContentOracle Instance()

demultiplex

public java.lang.String demultiplex(Request cReqL,
                                    Response cRepL)
Description copied from class: ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Overrides:
demultiplex in class ContentOracle
Returns:
the output

getStreamInterval

public int getStreamInterval()

getNextBatch

public byte[] getNextBatch(Request cReqL,
                           Response cRepL)


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/Response.html0000644000175000017500000003721210166321245023106 0ustar railrail Response

com.prolixtech.jaminid
Class Response

java.lang.Object
  extended by com.prolixtech.jaminid.Response

public class Response
extends java.lang.Object

The response class encapsulates an HTTP response. It contains the response data (headers, etc) as well as functions to publish cookies, send files, etc.

Author:
Constantinos Michael TODO

Constructor Summary
Response(int statusCode, Protocol protocol, java.io.OutputStream out, Request masterRequest)
           
 
Method Summary
 byte[] CRLF()
           
 void publishHeader()
          Sends the header to the client.
 void sendCookie15DG(java.lang.String name, java.lang.String value)
          sets a fifteen day cookie
 void sendFile(java.io.File cFile)
          sends a file to the client.
 void setCookie(java.lang.String name, java.lang.String value, java.lang.String path, java.util.Date expires)
          sets a cookie
 void setHeaderLine(ProtocolResponseHeader header, java.lang.String value)
          sets one particular header line
 void setStatus(int statusCode)
          sets the status of the response to a certain HTTP status code
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Response

public Response(int statusCode,
                Protocol protocol,
                java.io.OutputStream out,
                Request masterRequest)
Method Detail

setStatus

public void setStatus(int statusCode)
sets the status of the response to a certain HTTP status code

Parameters:
statusCode - the code to set the status to

sendCookie15DG

public void sendCookie15DG(java.lang.String name,
                           java.lang.String value)
sets a fifteen day cookie

Parameters:
name - the field name
value - the field value

setCookie

public void setCookie(java.lang.String name,
                      java.lang.String value,
                      java.lang.String path,
                      java.util.Date expires)
sets a cookie

Parameters:
name - the field name
value - the field vaLUE
path - the relevant path
expires - the cookie activation day

publishHeader

public void publishHeader()
                   throws java.io.IOException
Sends the header to the client. After this, no more headers can be set, no more cookies can be send

Throws:
java.io.IOException

setHeaderLine

public void setHeaderLine(ProtocolResponseHeader header,
                          java.lang.String value)
sets one particular header line

Parameters:
header -
value -

CRLF

public byte[] CRLF()

sendFile

public void sendFile(java.io.File cFile)
              throws java.lang.Exception
sends a file to the client. Sets the MIME type accordingly

Parameters:
cFile - the file to send
Throws:
java.io.IOException
java.lang.Exception


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/package-summary.html0000644000175000017500000002131410166321245024372 0ustar railrail com.prolixtech.jaminid

Package com.prolixtech.jaminid

Interface Summary
MusicStream  
StreamBundle  
 

Class Summary
Client  
Connection The connection is a thread-of-service spanwed by the Daemon.
ContentOracle The content oracle is a very special class.
Daemon As in most HTTP implementations, the Daemon opens a port, listens for incoming connections, and then spawns the connections to serve that connection.
Protocol This class captures the essential messages in the HTTP protocol.
Request The request class encapsulates an HTTP request.
Response The response class encapsulates an HTTP response.
StreamingOracle  
 

Enum Summary
ProtocolResponseHeader  
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/Client.html0000644000175000017500000002472010166321245022526 0ustar railrail Client

com.prolixtech.jaminid
Class Client

java.lang.Object
  extended by com.prolixtech.jaminid.Client

public class Client
extends java.lang.Object

Author:
Constantinos Michael

Constructor Summary
Client()
           
 
Method Summary
 java.lang.String getContent(java.lang.String ip, int port, Request serviceRequest)
           
 java.lang.String getContent(java.lang.String ip, int port, java.lang.String location)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client()
Method Detail

getContent

public java.lang.String getContent(java.lang.String ip,
                                   int port,
                                   java.lang.String location)

getContent

public java.lang.String getContent(java.lang.String ip,
                                   int port,
                                   Request serviceRequest)


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/package-use.html0000644000175000017500000002606710166321245023503 0ustar railrail Uses of Package com.prolixtech.jaminid

Uses of Package
com.prolixtech.jaminid

Packages that use com.prolixtech.jaminid
com.prolixtech.jaminid   
com.prolixtech.jaminid_examples   
com.prolixtech.utils   
 

Classes in com.prolixtech.jaminid used by com.prolixtech.jaminid
Connection
          The connection is a thread-of-service spanwed by the Daemon.
ContentOracle
          The content oracle is a very special class.
Daemon
          As in most HTTP implementations, the Daemon opens a port, listens for incoming connections, and then spawns the connections to serve that connection.
MusicStream
           
Protocol
          This class captures the essential messages in the HTTP protocol.
ProtocolResponseHeader
           
Request
          The request class encapsulates an HTTP request.
Response
          The response class encapsulates an HTTP response.
StreamBundle
           
 

Classes in com.prolixtech.jaminid used by com.prolixtech.jaminid_examples
ContentOracle
          The content oracle is a very special class.
Request
          The request class encapsulates an HTTP request.
Response
          The response class encapsulates an HTTP response.
 

Classes in com.prolixtech.jaminid used by com.prolixtech.utils
Request
          The request class encapsulates an HTTP request.
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/package-frame.html0000644000175000017500000000445710166321245024000 0ustar railrail com.prolixtech.jaminid com.prolixtech.jaminid
Interfaces 
MusicStream
StreamBundle
Classes 
Client
Connection
ContentOracle
Daemon
Protocol
Request
Response
StreamingOracle
Enums 
ProtocolResponseHeader
jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/MusicStream.html0000644000175000017500000002251410166321245023543 0ustar railrail MusicStream

com.prolixtech.jaminid
Interface MusicStream


public interface MusicStream

Author:
Constantinos Michael

Method Summary
 java.lang.Object clone()
           
 int getByteSizeForTime(int streamInterval)
           
 long getPos()
           
 byte[] readNext(int len)
           
 

Method Detail

readNext

byte[] readNext(int len)

getPos

long getPos()
Returns:
the position of the stream

clone

java.lang.Object clone()

getByteSizeForTime

int getByteSizeForTime(int streamInterval)
Parameters:
streamInterval -
Returns:
the a stream segment


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/0000755000175000017500000000000011217365117022320 5ustar railrailjaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/StreamingOracle.html0000644000175000017500000001317410166321245026267 0ustar railrail Uses of Class com.prolixtech.jaminid.StreamingOracle

Uses of Class
com.prolixtech.jaminid.StreamingOracle

No usage of com.prolixtech.jaminid.StreamingOracle



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/Response.html0000644000175000017500000003057410166321245025011 0ustar railrail Uses of Class com.prolixtech.jaminid.Response

Uses of Class
com.prolixtech.jaminid.Response

Packages that use Response
com.prolixtech.jaminid   
com.prolixtech.jaminid_examples   
 

Uses of Response in com.prolixtech.jaminid
 

Fields in com.prolixtech.jaminid declared as Response
protected  Response ContentOracle.cRep
           
 

Methods in com.prolixtech.jaminid with parameters of type Response
 java.lang.String StreamingOracle.demultiplex(Request cReqL, Response cRepL)
           
 java.lang.String ContentOracle.demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
 byte[] StreamingOracle.getNextBatch(Request cReqL, Response cRepL)
           
 

Uses of Response in com.prolixtech.jaminid_examples
 

Methods in com.prolixtech.jaminid_examples with parameters of type Response
 java.lang.String SimpleServer.demultiplex(Request connRequest, Response connResponse)
           
 java.lang.String HelloWorldServer.demultiplex(Request connRequest, Response connResponse)
           
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/Client.html0000644000175000017500000001304210166321245024420 0ustar railrail Uses of Class com.prolixtech.jaminid.Client

Uses of Class
com.prolixtech.jaminid.Client

No usage of com.prolixtech.jaminid.Client



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/MusicStream.html0000644000175000017500000001704510166321245025445 0ustar railrail Uses of Interface com.prolixtech.jaminid.MusicStream

Uses of Interface
com.prolixtech.jaminid.MusicStream

Packages that use MusicStream
com.prolixtech.jaminid   
 

Uses of MusicStream in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid that return MusicStream
 MusicStream StreamBundle.getStream(Request req)
           
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/Daemon.html0000644000175000017500000002141010166321245024403 0ustar railrail Uses of Class com.prolixtech.jaminid.Daemon

Uses of Class
com.prolixtech.jaminid.Daemon

Packages that use Daemon
com.prolixtech.jaminid   
 

Uses of Daemon in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid that return Daemon
 Daemon Request.getDaemon()
          Returns the master daemon
 

Constructors in com.prolixtech.jaminid with parameters of type Daemon
Connection(java.net.Socket activeSocket, Daemon masterDaemon)
          default constructor to create a Connection
Request(Daemon activeDaemon, Connection connx)
          Creates a new request object
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/Request.html0000644000175000017500000004463710166321245024650 0ustar railrail Uses of Class com.prolixtech.jaminid.Request

Uses of Class
com.prolixtech.jaminid.Request

Packages that use Request
com.prolixtech.jaminid   
com.prolixtech.jaminid_examples   
com.prolixtech.utils   
 

Uses of Request in com.prolixtech.jaminid
 

Fields in com.prolixtech.jaminid declared as Request
protected  Request ContentOracle.cReq
           
 

Methods in com.prolixtech.jaminid with parameters of type Request
 java.lang.String StreamingOracle.demultiplex(Request cReqL, Response cRepL)
           
 java.lang.String ContentOracle.demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
 void StreamBundle.disbandStream(Request req)
           
 java.lang.String Client.getContent(java.lang.String ip, int port, Request serviceRequest)
           
 ContentOracle ContentOracle.getDelegatedOracle(Request serviceRequest)
           
 byte[] StreamingOracle.getNextBatch(Request cReqL, Response cRepL)
           
 MusicStream StreamBundle.getStream(Request req)
           
 

Constructors in com.prolixtech.jaminid with parameters of type Request
Response(int statusCode, Protocol protocol, java.io.OutputStream out, Request masterRequest)
           
 

Uses of Request in com.prolixtech.jaminid_examples
 

Methods in com.prolixtech.jaminid_examples with parameters of type Request
 java.lang.String SimpleServer.demultiplex(Request connRequest, Response connResponse)
           
 java.lang.String HelloWorldServer.demultiplex(Request connRequest, Response connResponse)
           
 

Uses of Request in com.prolixtech.utils
 

Methods in com.prolixtech.utils with parameters of type Request
 void NullLogger.http(Request req, java.lang.String msg)
           
 void MboxLogger.http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 void JavaLogger.http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/ContentOracle.html0000644000175000017500000003266310166321245025754 0ustar railrail Uses of Class com.prolixtech.jaminid.ContentOracle

Uses of Class
com.prolixtech.jaminid.ContentOracle

Packages that use ContentOracle
com.prolixtech.jaminid   
com.prolixtech.jaminid_examples   
 

Uses of ContentOracle in com.prolixtech.jaminid
 

Subclasses of ContentOracle in com.prolixtech.jaminid
 class StreamingOracle
           
 

Fields in com.prolixtech.jaminid declared as ContentOracle
protected static ContentOracle ContentOracle.theInstance
           
 

Methods in com.prolixtech.jaminid that return ContentOracle
 ContentOracle ContentOracle.getDelegatedOracle(Request serviceRequest)
           
 ContentOracle Daemon.getOracle()
           
static ContentOracle StreamingOracle.Instance()
           
static ContentOracle ContentOracle.Instance()
          pertains to the singleton DESIGN PATTERN
 

Constructors in com.prolixtech.jaminid with parameters of type ContentOracle
Daemon(int serverPort, ContentOracle cOra)
          creates a new daemon and opens on specific port
 

Uses of ContentOracle in com.prolixtech.jaminid_examples
 

Subclasses of ContentOracle in com.prolixtech.jaminid_examples
 class HelloWorldServer
           
 class SimpleServer
           
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/StreamBundle.html0000644000175000017500000001706210166321245025575 0ustar railrail Uses of Interface com.prolixtech.jaminid.StreamBundle

Uses of Interface
com.prolixtech.jaminid.StreamBundle

Packages that use StreamBundle
com.prolixtech.jaminid   
 

Uses of StreamBundle in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid with parameters of type StreamBundle
 java.lang.String StreamingOracle.publishStream(StreamBundle a, java.lang.String path)
           
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/Protocol.html0000644000175000017500000002151210166321245025004 0ustar railrail Uses of Class com.prolixtech.jaminid.Protocol

Uses of Class
com.prolixtech.jaminid.Protocol

Packages that use Protocol
com.prolixtech.jaminid   
 

Uses of Protocol in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid that return Protocol
 Protocol Daemon.getProtocol()
           
static Protocol Protocol.Instance()
           
 

Constructors in com.prolixtech.jaminid with parameters of type Protocol
Response(int statusCode, Protocol protocol, java.io.OutputStream out, Request masterRequest)
           
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/ProtocolResponseHeader.html0000644000175000017500000002247510166321245027645 0ustar railrail Uses of Class com.prolixtech.jaminid.ProtocolResponseHeader

Uses of Class
com.prolixtech.jaminid.ProtocolResponseHeader

Packages that use ProtocolResponseHeader
com.prolixtech.jaminid   
 

Uses of ProtocolResponseHeader in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid that return ProtocolResponseHeader
static ProtocolResponseHeader ProtocolResponseHeader.valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ProtocolResponseHeader[] ProtocolResponseHeader.values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 

Methods in com.prolixtech.jaminid with parameters of type ProtocolResponseHeader
 void Response.setHeaderLine(ProtocolResponseHeader header, java.lang.String value)
          sets one particular header line
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/class-use/Connection.html0000644000175000017500000001673510166321245025315 0ustar railrail Uses of Class com.prolixtech.jaminid.Connection

Uses of Class
com.prolixtech.jaminid.Connection

Packages that use Connection
com.prolixtech.jaminid   
 

Uses of Connection in com.prolixtech.jaminid
 

Constructors in com.prolixtech.jaminid with parameters of type Connection
Request(Daemon activeDaemon, Connection connx)
          Creates a new request object
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/Daemon.html0000644000175000017500000004761410166321245022522 0ustar railrail Daemon

com.prolixtech.jaminid
Class Daemon

java.lang.Object
  extended by java.lang.Thread
      extended by com.prolixtech.jaminid.Daemon
All Implemented Interfaces:
java.lang.Runnable

public class Daemon
extends java.lang.Thread

As in most HTTP implementations, the Daemon opens a port, listens for incoming connections, and then spawns the connections to serve that connection. Sometimes this is called the server, we already have plenty of things in the works that will be called servers, so we're going for the what was the original name of the process before Marketting got to it. We're going for a no frills implementation that handles all the law level stuff and delegates the production of content to what we call a ContentOracle. This is a nice clean design that makes this code reusable. On the subject of why an HTTP server vs a JSP implementation, we find this to be a better approach. Less messy, makes the whole thing easier to install, more controllable, faster - this is no frills. The code is centralized, almost all of it in the server itself.

Author:
Constantinos Michael TODO

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static java.lang.String VERSION
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Daemon(int serverPort, ContentOracle cOra)
          creates a new daemon and opens on specific port
 
Method Summary
 ContentOracle getOracle()
           
 Protocol getProtocol()
           
 int getServerPort()
          returns the server port
 boolean isRunning()
           
static void main(java.lang.String[] args)
           
 void printlog(java.lang.String message)
           
 void run()
          Handles listening for new connections and launching client threads
 void tearDown()
          tears down server
 void tearDownAndWait()
          Tears down server and waits for it to tear down
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

Daemon

public Daemon(int serverPort,
              ContentOracle cOra)
creates a new daemon and opens on specific port

Parameters:
serverPort - the port to open on
cOra - the content oracle to use
Method Detail

getServerPort

public int getServerPort()
returns the server port

Returns:
the server port

getProtocol

public Protocol getProtocol()
Returns:
the protocol instance

getOracle

public ContentOracle getOracle()
Returns:
the oracle instance

run

public void run()
Handles listening for new connections and launching client threads

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Thread

main

public static void main(java.lang.String[] args)

printlog

public void printlog(java.lang.String message)

isRunning

public boolean isRunning()
Returns:
true if the server is up

tearDown

public void tearDown()
tears down server


tearDownAndWait

public void tearDownAndWait()
Tears down server and waits for it to tear down



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/Request.html0000644000175000017500000005152410166321245022742 0ustar railrail Request

com.prolixtech.jaminid
Class Request

java.lang.Object
  extended by com.prolixtech.jaminid.Request

public class Request
extends java.lang.Object

The request class encapsulates an HTTP request. It is responsible for splitting up the query, processing POST forms, splitting to URI and URL, and once it is created, it is essentially a data struct for all this information.

Author:
Constantinos Michael TODO

Constructor Summary
Request(Daemon activeDaemon, Connection connx)
          Creates a new request object
 
Method Summary
 void addRequestLines(java.lang.String requestMessage)
          Method Adds Request Lines
 void appendToBody(java.lang.String body)
          appends more stuff to body of request
 boolean checkParam(java.lang.String param, java.lang.String possvalue)
           
 java.lang.String getBody()
          Used in POST to return the body of the request
 Daemon getDaemon()
          Returns the master daemon
 java.util.Map getHeader()
          Returns header
 java.lang.String getIPAddressString()
           
 java.lang.String getLocation()
          Return the location sought
 java.lang.String getMessage()
          Returns the entire request message
 java.lang.String getParam(java.lang.String key)
           
 java.util.Map<java.lang.String,java.lang.String> getParamMap()
           
 java.lang.String getParamOrNull(java.lang.String key)
           
 java.lang.String getParamString()
           
 java.lang.String getURI()
          Returns the Uniform Resource Identifier
 boolean isRequestBad()
           
 void setMethodLine(java.lang.String methodLine)
           
protected  int switchToBody()
           
protected  void switchToCompleted()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Request

public Request(Daemon activeDaemon,
               Connection connx)
Creates a new request object

Parameters:
activeDaemon - the daemon that spawned the request
connx - the connection that produced this request
Method Detail

isRequestBad

public boolean isRequestBad()
Returns:
if the request was malformed

getURI

public java.lang.String getURI()
Returns the Uniform Resource Identifier

Returns:
the URI Uniform Resource Identifier

getMessage

public java.lang.String getMessage()
Returns the entire request message

Returns:
the entire request message

getBody

public java.lang.String getBody()
Used in POST to return the body of the request

Returns:
the body of the request (useful in POST)

getDaemon

public Daemon getDaemon()
Returns the master daemon

Returns:
the master daemon where this request was spawned

getHeader

public java.util.Map getHeader()
Returns header

Returns:
the header of this request

getParamMap

public java.util.Map<java.lang.String,java.lang.String> getParamMap()
Returns:
a param map of the request (like Perl)

getLocation

public java.lang.String getLocation()
Return the location sought

Returns:
the location sought (URL)

setMethodLine

public void setMethodLine(java.lang.String methodLine)
Parameters:
methodLine - the method line of the request

appendToBody

public void appendToBody(java.lang.String body)
appends more stuff to body of request

Parameters:
body - what to append

addRequestLines

public void addRequestLines(java.lang.String requestMessage)
Method Adds Request Lines

Parameters:
requestMessage - the message to add

getIPAddressString

public java.lang.String getIPAddressString()
Returns:
the ip address of the request

switchToBody

protected int switchToBody()

switchToCompleted

protected void switchToCompleted()

getParamString

public java.lang.String getParamString()
Returns:
the param string

getParam

public java.lang.String getParam(java.lang.String key)

getParamOrNull

public java.lang.String getParamOrNull(java.lang.String key)

checkParam

public boolean checkParam(java.lang.String param,
                          java.lang.String possvalue)


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/ContentOracle.html0000644000175000017500000004026310166321245024050 0ustar railrail ContentOracle

com.prolixtech.jaminid
Class ContentOracle

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
Direct Known Subclasses:
HelloWorldServer, SimpleServer, StreamingOracle

public class ContentOracle
extends java.lang.Object

The content oracle is a very special class. It completely allows us to delegate the computation of

Author:
Constantinos Michael TODO

Field Summary
protected  Response cRep
           
protected  Request cReq
           
protected  java.io.OutputStream streamOut
           
protected static ContentOracle theInstance
           
 
Constructor Summary
ContentOracle()
           
 
Method Summary
 java.lang.String demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
 ContentOracle getDelegatedOracle(Request serviceRequest)
           
static ContentOracle Instance()
          pertains to the singleton DESIGN PATTERN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cReq

protected Request cReq

cRep

protected Response cRep

streamOut

protected java.io.OutputStream streamOut

theInstance

protected static ContentOracle theInstance
Constructor Detail

ContentOracle

public ContentOracle()
Method Detail

Instance

public static ContentOracle Instance()
pertains to the singleton DESIGN PATTERN

Returns:
ContentOracle

demultiplex

public java.lang.String demultiplex(Request connRequest,
                                    Response connResponse)
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Parameters:
connRequest -
connResponse -
Returns:
the output

getDelegatedOracle

public ContentOracle getDelegatedOracle(Request serviceRequest)
Returns:
the oracle that will handle the request


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/StreamBundle.html0000644000175000017500000002315410166321245023675 0ustar railrail StreamBundle

com.prolixtech.jaminid
Interface StreamBundle


public interface StreamBundle

Author:
Constantinos Michael

Method Summary
 void disbandStream(Request req)
           
 MusicStream getStream(Request req)
           
 void setFullPath(java.lang.String fullpath)
           
 

Method Detail

getStream

MusicStream getStream(Request req)

disbandStream

void disbandStream(Request req)

setFullPath

void setFullPath(java.lang.String fullpath)
Parameters:
fullpath -


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/package-tree.html0000644000175000017500000001704510166321245023642 0ustar railrail com.prolixtech.jaminid Class Hierarchy

Hierarchy For Package com.prolixtech.jaminid

Package Hierarchies:
All Packages

Class Hierarchy

Interface Hierarchy

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/Protocol.html0000644000175000017500000011450410166321245023111 0ustar railrail Protocol

com.prolixtech.jaminid
Class Protocol

java.lang.Object
  extended by com.prolixtech.jaminid.Protocol

public class Protocol
extends java.lang.Object

This class captures the essential messages in the HTTP protocol. It behaves as a singleton.

Author:
Constantinos Michael

Field Summary
static int ACCEPTED
           
static int BAD_GATEWAY
           
static int BAD_REQUEST
           
static int CONFLICT
           
static int CONTINUE
           
static int CREATED
           
static int EXPECTATION_FAILED
           
static int FORBIDDEN
           
static int GATEWAY_TIMEOUT
           
static int GONE
           
static java.lang.String HQ_IFMODSINCE
           
static java.lang.String HTTP_VERSION
           
static int HTTP_VERSION_NOT_SUPPORTED
           
static int INTERNAL_SERVER_ERROR
           
static int LENGTH_REQUIRED
           
static java.lang.String MIMEFILE
           
static int MOVED_PERMANENTLY
           
static int MOVED_TEMPORARILY
           
static int MULTIPLE_CHOICE
           
static int NO_CONTENT
           
static int NONE_ACCEPTABLE
           
static int NOT_ALLOWED
           
static int NOT_FOUND
           
static int NOT_IMPLEMENTED
           
static int NOT_MODIFIED
           
static int OK
           
static int PARTIAL_CONTENT
           
static int PAYMENT_REQUIRED
           
static int PRECONDITION_FAILED
           
static int PROVISIONAL_INFORMATION
           
static int PROXY_AUTH_REQUIRED
           
static int REQUEST_ENTITY_TOO_LARGE
           
static int REQUEST_TIMEOUT
           
static int REQUEST_URI_TOO_LONG
           
static int REQUESTED_RANGE_NOT_SATISFIABLE
           
static int RESET_CONTENT
           
static int SEE_OTHER
           
static int SERVICE_UNAVAILABLE
           
static int SWITCHING
           
static int UNAUTHORIZED
           
static int UNSUPPORTED_MEDIA_TYPE
           
static int USE_PROXY
           
 
Method Summary
static java.lang.String getHeaderResponseStatus(int statusCode)
          gets a String description of the status code e.g (200 OK) or (404 FnF)
static java.lang.String getMIME(java.lang.String extension)
          MIME type accessor.
static Protocol Instance()
           
static void makeNewMIME()
          Creates a new mime file with the bare basic defaults
static boolean requestHeaderExists(java.lang.String requestHeader)
          checks if a request header exists in the protocol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIMEFILE

public static final java.lang.String MIMEFILE
See Also:
Constant Field Values

HTTP_VERSION

public static final java.lang.String HTTP_VERSION
See Also:
Constant Field Values

CONTINUE

public static final int CONTINUE
See Also:
Constant Field Values

SWITCHING

public static final int SWITCHING
See Also:
Constant Field Values

OK

public static final int OK
See Also:
Constant Field Values

CREATED

public static final int CREATED
See Also:
Constant Field Values

ACCEPTED

public static final int ACCEPTED
See Also:
Constant Field Values

PROVISIONAL_INFORMATION

public static final int PROVISIONAL_INFORMATION
See Also:
Constant Field Values

NO_CONTENT

public static final int NO_CONTENT
See Also:
Constant Field Values

RESET_CONTENT

public static final int RESET_CONTENT
See Also:
Constant Field Values

PARTIAL_CONTENT

public static final int PARTIAL_CONTENT
See Also:
Constant Field Values

MULTIPLE_CHOICE

public static final int MULTIPLE_CHOICE
See Also:
Constant Field Values

MOVED_PERMANENTLY

public static final int MOVED_PERMANENTLY
See Also:
Constant Field Values

MOVED_TEMPORARILY

public static final int MOVED_TEMPORARILY
See Also:
Constant Field Values

SEE_OTHER

public static final int SEE_OTHER
See Also:
Constant Field Values

NOT_MODIFIED

public static final int NOT_MODIFIED
See Also:
Constant Field Values

USE_PROXY

public static final int USE_PROXY
See Also:
Constant Field Values

BAD_REQUEST

public static final int BAD_REQUEST
See Also:
Constant Field Values

UNAUTHORIZED

public static final int UNAUTHORIZED
See Also:
Constant Field Values

PAYMENT_REQUIRED

public static final int PAYMENT_REQUIRED
See Also:
Constant Field Values

FORBIDDEN

public static final int FORBIDDEN
See Also:
Constant Field Values

NOT_FOUND

public static final int NOT_FOUND
See Also:
Constant Field Values

NOT_ALLOWED

public static final int NOT_ALLOWED
See Also:
Constant Field Values

NONE_ACCEPTABLE

public static final int NONE_ACCEPTABLE
See Also:
Constant Field Values

PROXY_AUTH_REQUIRED

public static final int PROXY_AUTH_REQUIRED
See Also:
Constant Field Values

REQUEST_TIMEOUT

public static final int REQUEST_TIMEOUT
See Also:
Constant Field Values

CONFLICT

public static final int CONFLICT
See Also:
Constant Field Values

GONE

public static final int GONE
See Also:
Constant Field Values

LENGTH_REQUIRED

public static final int LENGTH_REQUIRED
See Also:
Constant Field Values

PRECONDITION_FAILED

public static final int PRECONDITION_FAILED
See Also:
Constant Field Values

REQUEST_ENTITY_TOO_LARGE

public static final int REQUEST_ENTITY_TOO_LARGE
See Also:
Constant Field Values

REQUEST_URI_TOO_LONG

public static final int REQUEST_URI_TOO_LONG
See Also:
Constant Field Values

UNSUPPORTED_MEDIA_TYPE

public static final int UNSUPPORTED_MEDIA_TYPE
See Also:
Constant Field Values

REQUESTED_RANGE_NOT_SATISFIABLE

public static final int REQUESTED_RANGE_NOT_SATISFIABLE
See Also:
Constant Field Values

EXPECTATION_FAILED

public static final int EXPECTATION_FAILED
See Also:
Constant Field Values

INTERNAL_SERVER_ERROR

public static final int INTERNAL_SERVER_ERROR
See Also:
Constant Field Values

NOT_IMPLEMENTED

public static final int NOT_IMPLEMENTED
See Also:
Constant Field Values

BAD_GATEWAY

public static final int BAD_GATEWAY
See Also:
Constant Field Values

SERVICE_UNAVAILABLE

public static final int SERVICE_UNAVAILABLE
See Also:
Constant Field Values

GATEWAY_TIMEOUT

public static final int GATEWAY_TIMEOUT
See Also:
Constant Field Values

HTTP_VERSION_NOT_SUPPORTED

public static final int HTTP_VERSION_NOT_SUPPORTED
See Also:
Constant Field Values

HQ_IFMODSINCE

public static final java.lang.String HQ_IFMODSINCE
See Also:
Constant Field Values
Method Detail

Instance

public static Protocol Instance()

getMIME

public static java.lang.String getMIME(java.lang.String extension)
MIME type accessor. By using this, we understand that sometimes the wrong headers might go out for a badly named file (e.g. an mp3 file with extension .txt but this is how all the major HTTP servers do it anyway.

Parameters:
extension - the extension of the file
Returns:
the MIME type of the file according to the extension

getHeaderResponseStatus

public static java.lang.String getHeaderResponseStatus(int statusCode)
gets a String description of the status code e.g (200 OK) or (404 FnF)

Parameters:
statusCode - the integer status code
Returns:
the String status code

requestHeaderExists

public static boolean requestHeaderExists(java.lang.String requestHeader)
checks if a request header exists in the protocol

Parameters:
requestHeader - the request headcer to check
Returns:
true if it exists, false otherwise

makeNewMIME

public static void makeNewMIME()
Creates a new mime file with the bare basic defaults



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/ProtocolResponseHeader.html0000644000175000017500000005774710166321245025760 0ustar railrail ProtocolResponseHeader

com.prolixtech.jaminid
Enum ProtocolResponseHeader

java.lang.Object
  extended by java.lang.Enum<ProtocolResponseHeader>
      extended by com.prolixtech.jaminid.ProtocolResponseHeader
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ProtocolResponseHeader>

public enum ProtocolResponseHeader
extends java.lang.Enum<ProtocolResponseHeader>

Author:
Constantinos Michael

Enum Constant Summary
Accept_Ranges
           
Age
           
Allow
           
Connection
           
Content_Encoding
           
Content_Language
           
Content_Length
           
Content_Location
           
Content_MD5
           
Content_Range
           
Content_Type
           
Date
           
ETag
           
Expires
           
Icy_MetaData
           
Last_Modified
           
Location
           
Proxy_Authenticate
           
Retry_After
           
Server
           
Set_Cookie
           
Vary
           
WWW_Authenticate
           
 
Method Summary
static ProtocolResponseHeader valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ProtocolResponseHeader[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Age

public static final ProtocolResponseHeader Age

Location

public static final ProtocolResponseHeader Location

Server

public static final ProtocolResponseHeader Server

Vary

public static final ProtocolResponseHeader Vary

Connection

public static final ProtocolResponseHeader Connection

Date

public static final ProtocolResponseHeader Date

Accept_Ranges

public static final ProtocolResponseHeader Accept_Ranges

Proxy_Authenticate

public static final ProtocolResponseHeader Proxy_Authenticate

Retry_After

public static final ProtocolResponseHeader Retry_After

WWW_Authenticate

public static final ProtocolResponseHeader WWW_Authenticate

Set_Cookie

public static final ProtocolResponseHeader Set_Cookie

Allow

public static final ProtocolResponseHeader Allow

Expires

public static final ProtocolResponseHeader Expires

ETag

public static final ProtocolResponseHeader ETag

Content_Type

public static final ProtocolResponseHeader Content_Type

Content_Encoding

public static final ProtocolResponseHeader Content_Encoding

Content_Language

public static final ProtocolResponseHeader Content_Language

Content_Length

public static final ProtocolResponseHeader Content_Length

Content_Location

public static final ProtocolResponseHeader Content_Location

Content_MD5

public static final ProtocolResponseHeader Content_MD5

Content_Range

public static final ProtocolResponseHeader Content_Range

Last_Modified

public static final ProtocolResponseHeader Last_Modified

Icy_MetaData

public static final ProtocolResponseHeader Icy_MetaData
Method Detail

values

public static final ProtocolResponseHeader[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ProtocolResponseHeader c : ProtocolResponseHeader.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ProtocolResponseHeader valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid/Connection.html0000644000175000017500000003762110166321245023413 0ustar railrail Connection

com.prolixtech.jaminid
Class Connection

java.lang.Object
  extended by java.lang.Thread
      extended by com.prolixtech.jaminid.Connection
All Implemented Interfaces:
java.lang.Runnable

public class Connection
extends java.lang.Thread

The connection is a thread-of-service spanwed by the Daemon. The connection handles the IO part of the Response/Oracle/Request paradigm by creating the request and response objects, and calling the Oracle at the appropriate time to extract the output which will be send to the client.

Author:
Constantinos Michael TODO

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Connection(java.net.Socket activeSocket, Daemon masterDaemon)
          default constructor to create a Connection
 
Method Summary
static java.lang.String getGMTString(java.util.Date d)
           
 java.lang.String getIPAddressString()
           
 void run()
          The thread runs here.
protected  void sendString(byte[] bytes)
           
protected  void sendString(java.lang.Object string)
          Sends a string to the client
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Connection

public Connection(java.net.Socket activeSocket,
                  Daemon masterDaemon)
           throws java.io.IOException
default constructor to create a Connection

Parameters:
activeSocket - the socket on which the connection was madee
masterDaemon - the daemon that spanwed this connection
Throws:
java.io.IOException
Method Detail

getIPAddressString

public java.lang.String getIPAddressString()

run

public void run()
The thread runs here. This essentially allows the Daemon to serve multiple threads. ALL IO is carried out here.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

sendString

protected void sendString(java.lang.Object string)
                   throws java.io.IOException
Sends a string to the client

Parameters:
string -
Throws:
java.io.IOException

sendString

protected void sendString(byte[] bytes)

getGMTString

public static java.lang.String getGMTString(java.util.Date d)


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/0000755000175000017500000000000011217365117022317 5ustar railrailjaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/SimpleServer.html0000644000175000017500000003340010166321245025621 0ustar railrail SimpleServer

com.prolixtech.jaminid_examples
Class SimpleServer

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
      extended by com.prolixtech.jaminid_examples.SimpleServer

public class SimpleServer
extends ContentOracle

Author:
Constantinos Michael

Field Summary
 
Fields inherited from class com.prolixtech.jaminid.ContentOracle
cRep, cReq, streamOut, theInstance
 
Constructor Summary
SimpleServer()
           
 
Method Summary
 java.lang.String demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
static void main(java.lang.String[] args)
           
 
Methods inherited from class com.prolixtech.jaminid.ContentOracle
getDelegatedOracle, Instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleServer

public SimpleServer()
Method Detail

demultiplex

public java.lang.String demultiplex(Request connRequest,
                                    Response connResponse)
Description copied from class: ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Overrides:
demultiplex in class ContentOracle
Returns:
the output

main

public static void main(java.lang.String[] args)


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/HelloWorldServer.html0000644000175000017500000003617310166321245026455 0ustar railrail HelloWorldServer

com.prolixtech.jaminid_examples
Class HelloWorldServer

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
      extended by com.prolixtech.jaminid_examples.HelloWorldServer

public class HelloWorldServer
extends ContentOracle

Author:
Constantinos Michael

Field Summary
static java.lang.String HELLO
           
static int PORT
           
 
Fields inherited from class com.prolixtech.jaminid.ContentOracle
cRep, cReq, streamOut, theInstance
 
Constructor Summary
HelloWorldServer()
           
 
Method Summary
 java.lang.String demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
static void main(java.lang.String[] args)
           
 
Methods inherited from class com.prolixtech.jaminid.ContentOracle
getDelegatedOracle, Instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static final int PORT
See Also:
Constant Field Values

HELLO

public static java.lang.String HELLO
Constructor Detail

HelloWorldServer

public HelloWorldServer()
Method Detail

demultiplex

public java.lang.String demultiplex(Request connRequest,
                                    Response connResponse)
Description copied from class: ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Overrides:
demultiplex in class ContentOracle
Returns:
the output

main

public static void main(java.lang.String[] args)


jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/package-summary.html0000644000175000017500000001442410166321245026274 0ustar railrail com.prolixtech.jaminid_examples

Package com.prolixtech.jaminid_examples

Class Summary
HelloWorldServer  
SimpleServer  
 



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/package-use.html0000644000175000017500000001246110166321245025372 0ustar railrail Uses of Package com.prolixtech.jaminid_examples

Uses of Package
com.prolixtech.jaminid_examples

No usage of com.prolixtech.jaminid_examples



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/package-frame.html0000644000175000017500000000205510166321245025666 0ustar railrail com.prolixtech.jaminid_examples com.prolixtech.jaminid_examples
Classes 
HelloWorldServer
SimpleServer
jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/class-use/0000755000175000017500000000000011217365117024216 5ustar railrailjaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/class-use/SimpleServer.html0000644000175000017500000001327010166321245027523 0ustar railrail Uses of Class com.prolixtech.jaminid_examples.SimpleServer

Uses of Class
com.prolixtech.jaminid_examples.SimpleServer

No usage of com.prolixtech.jaminid_examples.SimpleServer



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/class-use/HelloWorldServer.html0000644000175000017500000001334010166321245030343 0ustar railrail Uses of Class com.prolixtech.jaminid_examples.HelloWorldServer

Uses of Class
com.prolixtech.jaminid_examples.HelloWorldServer

No usage of com.prolixtech.jaminid_examples.HelloWorldServer



jaminid-0.99a/doc/javadoc/com/prolixtech/jaminid_examples/package-tree.html0000644000175000017500000001427710166321245025544 0ustar railrail com.prolixtech.jaminid_examples Class Hierarchy

Hierarchy For Package com.prolixtech.jaminid_examples

Package Hierarchies:
All Packages

Class Hierarchy



jaminid-0.99a/doc/javadoc/allclasses-noframe.html0000644000175000017500000000525110166321245020507 0ustar railrail All Classes All Classes
Client
Connection
ContentOracle
Daemon
HelloWorldServer
JavaLogger
MboxLogger
MusicStream
NullLogger
Protocol
ProtocolResponseHeader
Request
Response
SimpleServer
SingleLineFormatter
SingletonLogger
StreamBundle
StreamingOracle
Suspender
jaminid-0.99a/doc/javadoc/stylesheet.css0000644000175000017500000000231710166321245016751 0ustar railrail/* Javadoc style sheet */ /* Define colors, fonts and other style attributes here to override the defaults */ /* Page background color */ body { background-color: #FFFFFF } /* Headings */ h1 { font-size: 145% } /* Table colors */ .TableHeadingColor { background: #CCCCFF } /* Dark mauve */ .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ .TableRowColor { background: #FFFFFF } /* White */ /* Font used in left-hand frame lists */ .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif } .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } /* Navigation bar fonts and colors */ .NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */ .NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */ .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} jaminid-0.99a/doc/allclasses-frame.html0000644000175000017500000000632110422252526016542 0ustar railrail All Classes All Classes
Client
Connection
ContentOracle
Daemon
HelloWorldServer
JavaLogger
MboxLogger
MusicStream
NullLogger
Protocol
ProtocolResponseHeader
Request
Response
SimpleAjaxServer
SimpleServer
SingleLineFormatter
SingletonLogger
StreamBundle
StreamingOracle
Suspender
jaminid-0.99a/doc/index.html0000644000175000017500000000247510422252526014441 0ustar railrail Generated Documentation (Untitled) <H2> Frame Alert</H2> <P> This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. <BR> Link to<A HREF="overview-summary.html">Non-frame version.</A> jaminid-0.99a/doc/help-doc.html0000644000175000017500000002262410422252526015023 0ustar railrail API Help

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Overview

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Enums
  • Exceptions
  • Errors
  • Annotation Types

Class/Interface

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Annotation Type

Each annotation type has its own separate page with the following sections:

  • Annotation Type declaration
  • Annotation Type description
  • Required Element Summary
  • Optional Element Summary
  • Element Detail

Enum

Each enum has its own separate page with the following sections:

  • Enum declaration
  • Enum description
  • Enum Constant Summary
  • Enum Constant Detail

Use

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

Constant Field Values

The Constant Field Values page lists the static final fields and their values.

This help file applies to API documentation generated using the standard doclet.



jaminid-0.99a/doc/constant-values.html0000644000175000017500000005736510422252526016470 0ustar railrail Constant Field Values

Constant Field Values


Contents
com.prolixtech.*

com.prolixtech.jaminid.Daemon
public static final java.lang.String VERSION "0.2a"

com.prolixtech.jaminid.Protocol
public static final int ACCEPTED 202
public static final int BAD_GATEWAY 502
public static final int BAD_REQUEST 400
public static final int CONFLICT 409
public static final int CONTINUE 100
public static final int CREATED 201
public static final int EXPECTATION_FAILED 417
public static final int FORBIDDEN 403
public static final int GATEWAY_TIMEOUT 504
public static final int GONE 410
public static final java.lang.String HQ_IFMODSINCE "If-Modified-Since"
public static final java.lang.String HTTP_VERSION "HTTP/1.1"
public static final int HTTP_VERSION_NOT_SUPPORTED 505
public static final int INTERNAL_SERVER_ERROR 500
public static final int LENGTH_REQUIRED 411
public static final java.lang.String MIMEFILE "config/MIME.XML"
public static final int MOVED_PERMANENTLY 301
public static final int MOVED_TEMPORARILY 302
public static final int MULTIPLE_CHOICE 300
public static final int NO_CONTENT 204
public static final int NONE_ACCEPTABLE 406
public static final int NOT_ALLOWED 405
public static final int NOT_FOUND 404
public static final int NOT_IMPLEMENTED 501
public static final int NOT_MODIFIED 304
public static final int OK 200
public static final int PARTIAL_CONTENT 206
public static final int PAYMENT_REQUIRED 402
public static final int PRECONDITION_FAILED 412
public static final int PROVISIONAL_INFORMATION 203
public static final int PROXY_AUTH_REQUIRED 407
public static final int REQUEST_ENTITY_TOO_LARGE 413
public static final int REQUEST_TIMEOUT 408
public static final int REQUEST_URI_TOO_LONG 414
public static final int REQUESTED_RANGE_NOT_SATISFIABLE 416
public static final int RESET_CONTENT 205
public static final int SEE_OTHER 303
public static final int SERVICE_UNAVAILABLE 503
public static final int SWITCHING 101
public static final int UNAUTHORIZED 401
public static final int UNSUPPORTED_MEDIA_TYPE 415
public static final int USE_PROXY 305

com.prolixtech.jaminid.StreamingOracle
public static final java.lang.String PATH_START "/streams/"

com.prolixtech.jaminid_examples.HelloWorldServer
public static final int PORT 80

com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer
public static final int PORT 8080



jaminid-0.99a/doc/index-files/0000755000175000017500000000000011217365117014647 5ustar railrailjaminid-0.99a/doc/index-files/index-9.html0000644000175000017500000002256710422252526017022 0ustar railrail I-Index
A B C D E F G H I J L M N O P R S T U V W

I

info(String) - Method in class com.prolixtech.utils.JavaLogger
Shortcut to submit a log message at the level INFO
info(String) - Method in interface com.prolixtech.utils.MboxLogger
Shortcut to submit a log message at the level INFO
info(String) - Method in class com.prolixtech.utils.NullLogger
 
Instance() - Static method in class com.prolixtech.jaminid.ContentOracle
pertains to the singleton DESIGN PATTERN
Instance() - Static method in class com.prolixtech.jaminid.Protocol
 
Instance() - Static method in class com.prolixtech.jaminid.StreamingOracle
 
Instance() - Static method in class com.prolixtech.utils.JavaLogger
Pertains to the Singleton DESIGN PATTERN.
Instance() - Static method in class com.prolixtech.utils.NullLogger
 
Instance() - Static method in class com.prolixtech.utils.SingletonLogger
 
INTERNAL_SERVER_ERROR - Static variable in class com.prolixtech.jaminid.Protocol
 
isRequestBad() - Method in class com.prolixtech.jaminid.Request
 
isRunning() - Method in class com.prolixtech.jaminid.Daemon
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-12.html0000644000175000017500000002230510422252526017062 0ustar railrail M-Index
A B C D E F G H I J L M N O P R S T U V W

M

main(String[]) - Static method in class com.prolixtech.jaminid.Daemon
 
main(String[]) - Static method in class com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer
 
main(String[]) - Static method in class com.prolixtech.jaminid_examples.HelloWorldServer
 
main(String[]) - Static method in class com.prolixtech.jaminid_examples.SimpleServer
 
makeNewMIME() - Static method in class com.prolixtech.jaminid.Protocol
Creates a new mime file with the bare basic defaults
MboxLogger - Interface in com.prolixtech.utils
 
MIMEFILE - Static variable in class com.prolixtech.jaminid.Protocol
 
MOVED_PERMANENTLY - Static variable in class com.prolixtech.jaminid.Protocol
 
MOVED_TEMPORARILY - Static variable in class com.prolixtech.jaminid.Protocol
 
MULTIPLE_CHOICE - Static variable in class com.prolixtech.jaminid.Protocol
 
MusicStream - Interface in com.prolixtech.jaminid
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-10.html0000644000175000017500000001476010422252526017066 0ustar railrail J-Index
A B C D E F G H I J L M N O P R S T U V W

J

JavaLogger - Class in com.prolixtech.utils
This class provides a single logging utility used for debugging purposes.

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-6.html0000644000175000017500000001705010422252526017006 0ustar railrail F-Index
A B C D E F G H I J L M N O P R S T U V W

F

fine(String) - Method in class com.prolixtech.utils.JavaLogger
Shortcut to submit a log message at the level FINE
fine(String) - Method in interface com.prolixtech.utils.MboxLogger
 
fine(String) - Method in class com.prolixtech.utils.NullLogger
 
FORBIDDEN - Static variable in class com.prolixtech.jaminid.Protocol
 
format(LogRecord) - Method in class com.prolixtech.utils.SingleLineFormatter
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-3.html0000644000175000017500000002357610422252526017015 0ustar railrail C-Index
A B C D E F G H I J L M N O P R S T U V W

C

checkParam(String, String) - Method in class com.prolixtech.jaminid.Request
 
Client - Class in com.prolixtech.jaminid
 
Client() - Constructor for class com.prolixtech.jaminid.Client
 
clone() - Method in interface com.prolixtech.jaminid.MusicStream
 
com.prolixtech.jaminid - package com.prolixtech.jaminid
 
com.prolixtech.jaminid_examples - package com.prolixtech.jaminid_examples
 
com.prolixtech.jaminid_examples.ajax - package com.prolixtech.jaminid_examples.ajax
 
com.prolixtech.utils - package com.prolixtech.utils
 
CONFLICT - Static variable in class com.prolixtech.jaminid.Protocol
 
Connection - Class in com.prolixtech.jaminid
The connection is a thread-of-service spanwed by the Daemon.
Connection(Socket, Daemon) - Constructor for class com.prolixtech.jaminid.Connection
default constructor to create a Connection
ContentOracle - Class in com.prolixtech.jaminid
The content oracle is a very special class.
ContentOracle() - Constructor for class com.prolixtech.jaminid.ContentOracle
 
CONTINUE - Static variable in class com.prolixtech.jaminid.Protocol
 
CREATED - Static variable in class com.prolixtech.jaminid.Protocol
 
CRLF() - Method in class com.prolixtech.jaminid.Response
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-18.html0000644000175000017500000001574210422252526017077 0ustar railrail T-Index
A B C D E F G H I J L M N O P R S T U V W

T

tearDown() - Method in class com.prolixtech.jaminid.Daemon
tears down server
tearDownAndWait() - Method in class com.prolixtech.jaminid.Daemon
Tears down server and waits for it to tear down
toString() - Method in class com.prolixtech.jaminid.Daemon
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-13.html0000644000175000017500000002025210422252526017062 0ustar railrail N-Index
A B C D E F G H I J L M N O P R S T U V W

N

NO_CONTENT - Static variable in class com.prolixtech.jaminid.Protocol
 
NONE_ACCEPTABLE - Static variable in class com.prolixtech.jaminid.Protocol
 
NOT_ALLOWED - Static variable in class com.prolixtech.jaminid.Protocol
 
NOT_FOUND - Static variable in class com.prolixtech.jaminid.Protocol
 
NOT_IMPLEMENTED - Static variable in class com.prolixtech.jaminid.Protocol
 
NOT_MODIFIED - Static variable in class com.prolixtech.jaminid.Protocol
 
NullLogger - Class in com.prolixtech.utils
 
NullLogger() - Constructor for class com.prolixtech.utils.NullLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-17.html0000644000175000017500000003570210422252526017074 0ustar railrail S-Index
A B C D E F G H I J L M N O P R S T U V W

S

SEE_OTHER - Static variable in class com.prolixtech.jaminid.Protocol
 
sendCookie15DG(String, String) - Method in class com.prolixtech.jaminid.Response
sets a fifteen day cookie
sendFile(File) - Method in class com.prolixtech.jaminid.Response
sends a file to the client.
SERVICE_UNAVAILABLE - Static variable in class com.prolixtech.jaminid.Protocol
 
setCookie(String, String, String, Date) - Method in class com.prolixtech.jaminid.Response
sets a cookie
setFullPath(String) - Method in interface com.prolixtech.jaminid.StreamBundle
 
setHeaderLine(ProtocolResponseHeader, String) - Method in class com.prolixtech.jaminid.Response
sets one particular header line
setLog(boolean) - Static method in class com.prolixtech.utils.SingletonLogger
 
setMethodLine(String) - Method in class com.prolixtech.jaminid.Request
 
setStatus(int) - Method in class com.prolixtech.jaminid.Response
sets the status of the response to a certain HTTP status code
severe(String) - Method in class com.prolixtech.utils.JavaLogger
Shortcut to submit a log message at the level SEVERE
severe(String) - Method in interface com.prolixtech.utils.MboxLogger
Shortcut to submit a log message at the level SEVERE
severe(String) - Method in class com.prolixtech.utils.NullLogger
 
SimpleAjaxServer - Class in com.prolixtech.jaminid_examples.ajax
 
SimpleAjaxServer() - Constructor for class com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer
 
SimpleServer - Class in com.prolixtech.jaminid_examples
 
SimpleServer() - Constructor for class com.prolixtech.jaminid_examples.SimpleServer
 
SingleLineFormatter - Class in com.prolixtech.utils
 
SingleLineFormatter() - Constructor for class com.prolixtech.utils.SingleLineFormatter
 
SingletonLogger - Class in com.prolixtech.utils
This class provides a single logging utility used for debugging purposes.
SingletonLogger() - Constructor for class com.prolixtech.utils.SingletonLogger
 
sql(String) - Method in class com.prolixtech.utils.JavaLogger
Specialized submit for SQL messages
sql(String) - Method in interface com.prolixtech.utils.MboxLogger
 
sql(String) - Method in class com.prolixtech.utils.NullLogger
 
StreamBundle - Interface in com.prolixtech.jaminid
 
StreamingOracle - Class in com.prolixtech.jaminid
 
StreamingOracle() - Constructor for class com.prolixtech.jaminid.StreamingOracle
 
Suspender - Class in com.prolixtech.utils
 
Suspender() - Constructor for class com.prolixtech.utils.Suspender
 
suspendMillis(long) - Static method in class com.prolixtech.utils.Suspender
 
suspendSeconds(int) - Static method in class com.prolixtech.utils.Suspender
 
SWITCHING - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-15.html0000644000175000017500000002342210422252526017066 0ustar railrail P-Index
A B C D E F G H I J L M N O P R S T U V W

P

PARTIAL_CONTENT - Static variable in class com.prolixtech.jaminid.Protocol
 
PATH_START - Static variable in class com.prolixtech.jaminid.StreamingOracle
 
PAYMENT_REQUIRED - Static variable in class com.prolixtech.jaminid.Protocol
 
PORT - Static variable in class com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer
 
PORT - Static variable in class com.prolixtech.jaminid_examples.HelloWorldServer
 
PRECONDITION_FAILED - Static variable in class com.prolixtech.jaminid.Protocol
 
printlog(String) - Method in class com.prolixtech.jaminid.Daemon
 
Protocol - Class in com.prolixtech.jaminid
This class captures the essential messages in the HTTP protocol.
ProtocolResponseHeader - Enum in com.prolixtech.jaminid
 
PROVISIONAL_INFORMATION - Static variable in class com.prolixtech.jaminid.Protocol
 
PROXY_AUTH_REQUIRED - Static variable in class com.prolixtech.jaminid.Protocol
 
publishHeader() - Method in class com.prolixtech.jaminid.Response
Sends the header to the client.
publishStream(StreamBundle, String) - Method in class com.prolixtech.jaminid.StreamingOracle
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-19.html0000644000175000017500000001574710422252526017105 0ustar railrail U-Index
A B C D E F G H I J L M N O P R S T U V W

U

UNAUTHORIZED - Static variable in class com.prolixtech.jaminid.Protocol
 
UNSUPPORTED_MEDIA_TYPE - Static variable in class com.prolixtech.jaminid.Protocol
 
USE_PROXY - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-1.html0000644000175000017500000001573110422252526017005 0ustar railrail A-Index
A B C D E F G H I J L M N O P R S T U V W

A

ACCEPTED - Static variable in class com.prolixtech.jaminid.Protocol
 
addRequestLines(String) - Method in class com.prolixtech.jaminid.Request
Method Adds Request Lines
appendToBody(String) - Method in class com.prolixtech.jaminid.Request
appends more stuff to body of request

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-7.html0000644000175000017500000003441510422252526017013 0ustar railrail G-Index
A B C D E F G H I J L M N O P R S T U V W

G

GATEWAY_TIMEOUT - Static variable in class com.prolixtech.jaminid.Protocol
 
getBody() - Method in class com.prolixtech.jaminid.Request
Used in POST to return the body of the request
getByteSizeForTime(int) - Method in interface com.prolixtech.jaminid.MusicStream
 
getContent(String, int, String) - Method in class com.prolixtech.jaminid.Client
 
getContent(String, int, Request) - Method in class com.prolixtech.jaminid.Client
 
getDaemon() - Method in class com.prolixtech.jaminid.Request
Returns the master daemon
getDelegatedOracle(Request) - Method in class com.prolixtech.jaminid.ContentOracle
 
getGMTString(Date) - Static method in class com.prolixtech.jaminid.Connection
 
getHeader() - Method in class com.prolixtech.jaminid.Request
Returns header
getHeaderResponseStatus(int) - Static method in class com.prolixtech.jaminid.Protocol
gets a String description of the status code e.g (200 OK) or (404 FnF)
getIPAddressString() - Method in class com.prolixtech.jaminid.Connection
 
getIPAddressString() - Method in class com.prolixtech.jaminid.Request
 
getLocation() - Method in class com.prolixtech.jaminid.Request
Return the location sought
getLogger() - Method in class com.prolixtech.utils.JavaLogger
For manual submission directly to the logger
getLogger() - Method in class com.prolixtech.utils.NullLogger
 
getMessage() - Method in class com.prolixtech.jaminid.Request
Returns the entire request message
getMIME(String) - Static method in class com.prolixtech.jaminid.Protocol
MIME type accessor.
getNextBatch(Request, Response) - Method in class com.prolixtech.jaminid.StreamingOracle
 
getOracle() - Method in class com.prolixtech.jaminid.Daemon
 
getParam(String) - Method in class com.prolixtech.jaminid.Request
 
getParamMap() - Method in class com.prolixtech.jaminid.Request
 
getParamOrNull(String) - Method in class com.prolixtech.jaminid.Request
 
getParamString() - Method in class com.prolixtech.jaminid.Request
 
getPos() - Method in interface com.prolixtech.jaminid.MusicStream
 
getProtocol() - Method in class com.prolixtech.jaminid.Daemon
 
getServerPort() - Method in class com.prolixtech.jaminid.Daemon
returns the server port
getStream(Request) - Method in interface com.prolixtech.jaminid.StreamBundle
 
getStreamInterval() - Method in class com.prolixtech.jaminid.StreamingOracle
 
getURI() - Method in class com.prolixtech.jaminid.Request
Returns the Uniform Resource Identifier
GONE - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-16.html0000644000175000017500000002360010422252526017065 0ustar railrail R-Index
A B C D E F G H I J L M N O P R S T U V W

R

readNext(int) - Method in interface com.prolixtech.jaminid.MusicStream
 
Request - Class in com.prolixtech.jaminid
The request class encapsulates an HTTP request.
Request(Daemon, Connection) - Constructor for class com.prolixtech.jaminid.Request
Creates a new request object
REQUEST_ENTITY_TOO_LARGE - Static variable in class com.prolixtech.jaminid.Protocol
 
REQUEST_TIMEOUT - Static variable in class com.prolixtech.jaminid.Protocol
 
REQUEST_URI_TOO_LONG - Static variable in class com.prolixtech.jaminid.Protocol
 
REQUESTED_RANGE_NOT_SATISFIABLE - Static variable in class com.prolixtech.jaminid.Protocol
 
requestHeaderExists(String) - Static method in class com.prolixtech.jaminid.Protocol
checks if a request header exists in the protocol
RESET_CONTENT - Static variable in class com.prolixtech.jaminid.Protocol
 
Response - Class in com.prolixtech.jaminid
The response class encapsulates an HTTP response.
Response(int, Protocol, OutputStream, Request) - Constructor for class com.prolixtech.jaminid.Response
 
run() - Method in class com.prolixtech.jaminid.Connection
The thread runs here.
run() - Method in class com.prolixtech.jaminid.Daemon
Handles listening for new connections and launching client threads

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-4.html0000644000175000017500000002356710422252526017016 0ustar railrail D-Index
A B C D E F G H I J L M N O P R S T U V W

D

Daemon - Class in com.prolixtech.jaminid
As in most HTTP implementations, the Daemon opens a port, listens for incoming connections, and then spawns the connections to serve that connection.
Daemon(int, ContentOracle) - Constructor for class com.prolixtech.jaminid.Daemon
creates a new daemon and opens on specific port
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid.ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request.
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid.StreamingOracle
 
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer
 
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid_examples.HelloWorldServer
 
demultiplex(Request, Response) - Method in class com.prolixtech.jaminid_examples.SimpleServer
 
disableBaloons() - Method in class com.prolixtech.utils.JavaLogger
 
disableBaloons() - Method in interface com.prolixtech.utils.MboxLogger
 
disableBaloons() - Method in class com.prolixtech.utils.NullLogger
 
disbandStream(Request) - Method in interface com.prolixtech.jaminid.StreamBundle
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-5.html0000644000175000017500000002050310422252526017002 0ustar railrail E-Index
A B C D E F G H I J L M N O P R S T U V W

E

exception(Level, String, Exception) - Method in class com.prolixtech.utils.JavaLogger
 
exception(String, Exception) - Method in class com.prolixtech.utils.JavaLogger
 
exception(Level, String, Exception) - Method in interface com.prolixtech.utils.MboxLogger
 
exception(String, Exception) - Method in interface com.prolixtech.utils.MboxLogger
 
exception(Level, String, Exception) - Method in class com.prolixtech.utils.NullLogger
 
exception(String, Exception) - Method in class com.prolixtech.utils.NullLogger
 
EXPECTATION_FAILED - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-14.html0000644000175000017500000001470510422252526017071 0ustar railrail O-Index
A B C D E F G H I J L M N O P R S T U V W

O

OK - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-2.html0000644000175000017500000001705410422252526017006 0ustar railrail B-Index
A B C D E F G H I J L M N O P R S T U V W

B

BAD_GATEWAY - Static variable in class com.prolixtech.jaminid.Protocol
 
BAD_REQUEST - Static variable in class com.prolixtech.jaminid.Protocol
 
baloon(String, String) - Method in class com.prolixtech.utils.JavaLogger
 
baloon(String, String) - Method in interface com.prolixtech.utils.MboxLogger
 
baloon(String, String) - Method in class com.prolixtech.utils.NullLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-21.html0000644000175000017500000001601010422252526017056 0ustar railrail W-Index
A B C D E F G H I J L M N O P R S T U V W

W

warning(String) - Method in class com.prolixtech.utils.JavaLogger
Shortcut to submit a log message at the level WARNING
warning(String) - Method in interface com.prolixtech.utils.MboxLogger
Shortcut to submit a log message at the level WARNING
warning(String) - Method in class com.prolixtech.utils.NullLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-20.html0000644000175000017500000001625310422252526017066 0ustar railrail V-Index
A B C D E F G H I J L M N O P R S T U V W

V

valueOf(String) - Static method in enum com.prolixtech.jaminid.ProtocolResponseHeader
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.prolixtech.jaminid.ProtocolResponseHeader
Returns an array containing the constants of this enum type, in the order they're declared.
VERSION - Static variable in class com.prolixtech.jaminid.Daemon
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-11.html0000644000175000017500000001667410422252526017075 0ustar railrail L-Index
A B C D E F G H I J L M N O P R S T U V W

L

LENGTH_REQUIRED - Static variable in class com.prolixtech.jaminid.Protocol
 
log(Level, String) - Method in class com.prolixtech.utils.JavaLogger
The main logging function is set by default to output to the console.
log(Level, String) - Method in interface com.prolixtech.utils.MboxLogger
The main logging function is set by default to output to the console.
log(Level, String) - Method in class com.prolixtech.utils.NullLogger
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/index-files/index-8.html0000644000175000017500000002145410422252526017013 0ustar railrail H-Index
A B C D E F G H I J L M N O P R S T U V W

H

HELLO - Static variable in class com.prolixtech.jaminid_examples.HelloWorldServer
 
HelloWorldServer - Class in com.prolixtech.jaminid_examples
 
HelloWorldServer() - Constructor for class com.prolixtech.jaminid_examples.HelloWorldServer
 
HQ_IFMODSINCE - Static variable in class com.prolixtech.jaminid.Protocol
 
http(Request, String) - Method in class com.prolixtech.utils.JavaLogger
Specialized submit for HTTP messages
http(Request, String) - Method in interface com.prolixtech.utils.MboxLogger
Specialized submit for HTTP messages
http(Request, String) - Method in class com.prolixtech.utils.NullLogger
 
HTTP_VERSION - Static variable in class com.prolixtech.jaminid.Protocol
 
HTTP_VERSION_NOT_SUPPORTED - Static variable in class com.prolixtech.jaminid.Protocol
 

A B C D E F G H I J L M N O P R S T U V W
jaminid-0.99a/doc/com/0000755000175000017500000000000011217365117013216 5ustar railrailjaminid-0.99a/doc/com/prolixtech/0000755000175000017500000000000011217365120015371 5ustar railrailjaminid-0.99a/doc/com/prolixtech/utils/0000755000175000017500000000000011217365117016537 5ustar railrailjaminid-0.99a/doc/com/prolixtech/utils/SingletonLogger.html0000644000175000017500000003106510422252526022530 0ustar railrail SingletonLogger

com.prolixtech.utils
Class SingletonLogger

java.lang.Object
  extended by com.prolixtech.utils.NullLogger
      extended by com.prolixtech.utils.SingletonLogger
All Implemented Interfaces:
MboxLogger

public class SingletonLogger
extends NullLogger

This class provides a single logging utility used for debugging purposes. It delegates most of its work to the java logging system, however it is made a singleton here so that it can be used throughout the application.

Author:
Constantinos Michael

Constructor Summary
SingletonLogger()
           
 
Method Summary
static MboxLogger Instance()
           
static void setLog(boolean x)
           
 
Methods inherited from class com.prolixtech.utils.NullLogger
baloon, disableBaloons, exception, exception, fine, getLogger, http, info, log, severe, sql, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonLogger

public SingletonLogger()
Method Detail

setLog

public static void setLog(boolean x)

Instance

public static MboxLogger Instance()


jaminid-0.99a/doc/com/prolixtech/utils/JavaLogger.html0000644000175000017500000005165510422252526021456 0ustar railrail JavaLogger

com.prolixtech.utils
Class JavaLogger

java.lang.Object
  extended by com.prolixtech.utils.JavaLogger
All Implemented Interfaces:
MboxLogger

public class JavaLogger
extends java.lang.Object
implements MboxLogger

This class provides a single logging utility used for debugging purposes. It delegates most of its work to the java logging system, however it is made a singleton here so that it can be used throughout the application.

Author:
Constantinos Michael

Method Summary
 void baloon(java.lang.String msg, java.lang.String title)
           
 void disableBaloons()
           
 void exception(java.util.logging.Level x, java.lang.String msg, java.lang.Exception e)
           
 void exception(java.lang.String msg, java.lang.Exception e)
           
 void fine(java.lang.String msg)
          Shortcut to submit a log message at the level FINE
 java.util.logging.Logger getLogger()
          For manual submission directly to the logger
 void http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 void info(java.lang.String msg)
          Shortcut to submit a log message at the level INFO
static MboxLogger Instance()
          Pertains to the Singleton DESIGN PATTERN.
 void log(java.util.logging.Level vel, java.lang.String msg)
          The main logging function is set by default to output to the console.
 void severe(java.lang.String msg)
          Shortcut to submit a log message at the level SEVERE
 void sql(java.lang.String msg)
          Specialized submit for SQL messages
 void warning(java.lang.String msg)
          Shortcut to submit a log message at the level WARNING
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Instance

public static MboxLogger Instance()
Pertains to the Singleton DESIGN PATTERN.

Returns:
the singleton instance

getLogger

public java.util.logging.Logger getLogger()
For manual submission directly to the logger

Returns:
the logger of this singleton

log

public void log(java.util.logging.Level vel,
                java.lang.String msg)
The main logging function is set by default to output to the console. If we require better logging in the future, perhaps a number of streams will be made. The default operation prints the last function called (gets it through a stacktrace) the message, the time.

Specified by:
log in interface MboxLogger
Parameters:
vel - the level of the message to log.
msg - the message to log.
See Also:
Level

fine

public void fine(java.lang.String msg)
Shortcut to submit a log message at the level FINE

Specified by:
fine in interface MboxLogger
Parameters:
msg - the message to submit

severe

public void severe(java.lang.String msg)
Shortcut to submit a log message at the level SEVERE

Specified by:
severe in interface MboxLogger
Parameters:
msg - the message to submit

warning

public void warning(java.lang.String msg)
Shortcut to submit a log message at the level WARNING

Specified by:
warning in interface MboxLogger
Parameters:
msg - the message to submit

info

public void info(java.lang.String msg)
Shortcut to submit a log message at the level INFO

Specified by:
info in interface MboxLogger
Parameters:
msg - the message to submit

sql

public void sql(java.lang.String msg)
Specialized submit for SQL messages

Specified by:
sql in interface MboxLogger
Parameters:
msg - the message to submit

http

public void http(Request req,
                 java.lang.String msg)
Specialized submit for HTTP messages

Specified by:
http in interface MboxLogger
Parameters:
msg - the message to submit

disableBaloons

public void disableBaloons()
Specified by:
disableBaloons in interface MboxLogger

exception

public void exception(java.util.logging.Level x,
                      java.lang.String msg,
                      java.lang.Exception e)
Specified by:
exception in interface MboxLogger

exception

public void exception(java.lang.String msg,
                      java.lang.Exception e)
Specified by:
exception in interface MboxLogger

baloon

public void baloon(java.lang.String msg,
                   java.lang.String title)
Specified by:
baloon in interface MboxLogger


jaminid-0.99a/doc/com/prolixtech/utils/NullLogger.html0000644000175000017500000005475010422252526021506 0ustar railrail NullLogger

com.prolixtech.utils
Class NullLogger

java.lang.Object
  extended by com.prolixtech.utils.NullLogger
All Implemented Interfaces:
MboxLogger
Direct Known Subclasses:
SingletonLogger

public class NullLogger
extends java.lang.Object
implements MboxLogger

Author:
Constantinos Michael

Constructor Summary
NullLogger()
           
 
Method Summary
 void baloon(java.lang.String msg, java.lang.String title)
           
 void disableBaloons()
           
 void exception(java.util.logging.Level x, java.lang.String msg, java.lang.Exception e)
           
 void exception(java.lang.String msg, java.lang.Exception e)
           
 void fine(java.lang.String msg)
           
 java.util.logging.Logger getLogger()
           
 void http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 void info(java.lang.String msg)
          Shortcut to submit a log message at the level INFO
static MboxLogger Instance()
           
 void log(java.util.logging.Level vel, java.lang.String msg)
          The main logging function is set by default to output to the console.
 void severe(java.lang.String msg)
          Shortcut to submit a log message at the level SEVERE
 void sql(java.lang.String msg)
           
 void warning(java.lang.String msg)
          Shortcut to submit a log message at the level WARNING
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullLogger

public NullLogger()
Method Detail

baloon

public void baloon(java.lang.String msg,
                   java.lang.String title)
Specified by:
baloon in interface MboxLogger

getLogger

public java.util.logging.Logger getLogger()

log

public void log(java.util.logging.Level vel,
                java.lang.String msg)
Description copied from interface: MboxLogger
The main logging function is set by default to output to the console. If we require better logging in the future, perhaps a number of streams will be made. The default operation prints the last function called (gets it through a stacktrace) the message, the time.

Specified by:
log in interface MboxLogger
Parameters:
vel - the level of the message to log.
msg - the message to log.
See Also:
Level

fine

public void fine(java.lang.String msg)
Specified by:
fine in interface MboxLogger

severe

public void severe(java.lang.String msg)
Description copied from interface: MboxLogger
Shortcut to submit a log message at the level SEVERE

Specified by:
severe in interface MboxLogger
Parameters:
msg - the message to submit

warning

public void warning(java.lang.String msg)
Description copied from interface: MboxLogger
Shortcut to submit a log message at the level WARNING

Specified by:
warning in interface MboxLogger
Parameters:
msg - the message to submit

info

public void info(java.lang.String msg)
Description copied from interface: MboxLogger
Shortcut to submit a log message at the level INFO

Specified by:
info in interface MboxLogger
Parameters:
msg - the message to submit

sql

public void sql(java.lang.String msg)
Specified by:
sql in interface MboxLogger

http

public void http(Request req,
                 java.lang.String msg)
Description copied from interface: MboxLogger
Specialized submit for HTTP messages

Specified by:
http in interface MboxLogger
msg - the message to submit

disableBaloons

public void disableBaloons()
Specified by:
disableBaloons in interface MboxLogger

exception

public void exception(java.util.logging.Level x,
                      java.lang.String msg,
                      java.lang.Exception e)
Specified by:
exception in interface MboxLogger

exception

public void exception(java.lang.String msg,
                      java.lang.Exception e)
Specified by:
exception in interface MboxLogger

Instance

public static MboxLogger Instance()
Returns:
the a new instance of the logger.


jaminid-0.99a/doc/com/prolixtech/utils/package-summary.html0000644000175000017500000001633410422252526022516 0ustar railrail com.prolixtech.utils

Package com.prolixtech.utils

Interface Summary
MboxLogger  
 

Class Summary
JavaLogger This class provides a single logging utility used for debugging purposes.
NullLogger  
SingleLineFormatter  
SingletonLogger This class provides a single logging utility used for debugging purposes.
Suspender  
 



jaminid-0.99a/doc/com/prolixtech/utils/package-use.html0000644000175000017500000001507710422252526021620 0ustar railrail Uses of Package com.prolixtech.utils

Uses of Package
com.prolixtech.utils

Packages that use com.prolixtech.utils
com.prolixtech.utils   
 

Classes in com.prolixtech.utils used by com.prolixtech.utils
MboxLogger
           
NullLogger
           
 



jaminid-0.99a/doc/com/prolixtech/utils/package-frame.html0000644000175000017500000000313210422252526022103 0ustar railrail com.prolixtech.utils com.prolixtech.utils
Interfaces 
MboxLogger
Classes 
JavaLogger
NullLogger
SingleLineFormatter
SingletonLogger
Suspender
jaminid-0.99a/doc/com/prolixtech/utils/MboxLogger.html0000644000175000017500000003641610422252526021500 0ustar railrail MboxLogger

com.prolixtech.utils
Interface MboxLogger

All Known Implementing Classes:
JavaLogger, NullLogger, SingletonLogger

public interface MboxLogger

Author:
Constantinos Michael

Method Summary
 void baloon(java.lang.String msg, java.lang.String title)
           
 void disableBaloons()
           
 void exception(java.util.logging.Level x, java.lang.String msg, java.lang.Exception e)
           
 void exception(java.lang.String msg, java.lang.Exception e)
           
 void fine(java.lang.String msg)
           
 void http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 void info(java.lang.String msg)
          Shortcut to submit a log message at the level INFO
 void log(java.util.logging.Level vel, java.lang.String msg)
          The main logging function is set by default to output to the console.
 void severe(java.lang.String msg)
          Shortcut to submit a log message at the level SEVERE
 void sql(java.lang.String msg)
           
 void warning(java.lang.String msg)
          Shortcut to submit a log message at the level WARNING
 

Method Detail

baloon

void baloon(java.lang.String msg,
            java.lang.String title)

log

void log(java.util.logging.Level vel,
         java.lang.String msg)
The main logging function is set by default to output to the console. If we require better logging in the future, perhaps a number of streams will be made. The default operation prints the last function called (gets it through a stacktrace) the message, the time.

Parameters:
vel - the level of the message to log.
msg - the message to log.
See Also:
Level

fine

void fine(java.lang.String msg)

severe

void severe(java.lang.String msg)
Shortcut to submit a log message at the level SEVERE

Parameters:
msg - the message to submit

warning

void warning(java.lang.String msg)
Shortcut to submit a log message at the level WARNING

Parameters:
msg - the message to submit

info

void info(java.lang.String msg)
Shortcut to submit a log message at the level INFO

Parameters:
msg - the message to submit

sql

void sql(java.lang.String msg)

http

void http(Request req,
          java.lang.String msg)
Specialized submit for HTTP messages

Parameters:
msg - the message to submit

disableBaloons

void disableBaloons()

exception

void exception(java.util.logging.Level x,
               java.lang.String msg,
               java.lang.Exception e)

exception

void exception(java.lang.String msg,
               java.lang.Exception e)


jaminid-0.99a/doc/com/prolixtech/utils/class-use/0000755000175000017500000000000011217365117020436 5ustar railrailjaminid-0.99a/doc/com/prolixtech/utils/class-use/SingletonLogger.html0000644000175000017500000001315310422252526024425 0ustar railrail Uses of Class com.prolixtech.utils.SingletonLogger

Uses of Class
com.prolixtech.utils.SingletonLogger

No usage of com.prolixtech.utils.SingletonLogger



jaminid-0.99a/doc/com/prolixtech/utils/class-use/JavaLogger.html0000644000175000017500000001307110422252526023343 0ustar railrail Uses of Class com.prolixtech.utils.JavaLogger

Uses of Class
com.prolixtech.utils.JavaLogger

No usage of com.prolixtech.utils.JavaLogger



jaminid-0.99a/doc/com/prolixtech/utils/class-use/NullLogger.html0000644000175000017500000001641510422252526023401 0ustar railrail Uses of Class com.prolixtech.utils.NullLogger

Uses of Class
com.prolixtech.utils.NullLogger

Packages that use NullLogger
com.prolixtech.utils   
 

Uses of NullLogger in com.prolixtech.utils
 

Subclasses of NullLogger in com.prolixtech.utils
 class SingletonLogger
          This class provides a single logging utility used for debugging purposes.
 



jaminid-0.99a/doc/com/prolixtech/utils/class-use/MboxLogger.html0000644000175000017500000002362110422252526023371 0ustar railrail Uses of Interface com.prolixtech.utils.MboxLogger

Uses of Interface
com.prolixtech.utils.MboxLogger

Packages that use MboxLogger
com.prolixtech.utils   
 

Uses of MboxLogger in com.prolixtech.utils
 

Classes in com.prolixtech.utils that implement MboxLogger
 class JavaLogger
          This class provides a single logging utility used for debugging purposes.
 class NullLogger
           
 class SingletonLogger
          This class provides a single logging utility used for debugging purposes.
 

Methods in com.prolixtech.utils that return MboxLogger
static MboxLogger NullLogger.Instance()
           
static MboxLogger SingletonLogger.Instance()
           
static MboxLogger JavaLogger.Instance()
          Pertains to the Singleton DESIGN PATTERN.
 



jaminid-0.99a/doc/com/prolixtech/utils/class-use/Suspender.html0000644000175000017500000001305710422252526023276 0ustar railrail Uses of Class com.prolixtech.utils.Suspender

Uses of Class
com.prolixtech.utils.Suspender

No usage of com.prolixtech.utils.Suspender



jaminid-0.99a/doc/com/prolixtech/utils/class-use/SingleLineFormatter.html0000644000175000017500000001322310422252526025236 0ustar railrail Uses of Class com.prolixtech.utils.SingleLineFormatter

Uses of Class
com.prolixtech.utils.SingleLineFormatter

No usage of com.prolixtech.utils.SingleLineFormatter



jaminid-0.99a/doc/com/prolixtech/utils/Suspender.html0000644000175000017500000002341310422252526021374 0ustar railrail Suspender

com.prolixtech.utils
Class Suspender

java.lang.Object
  extended by com.prolixtech.utils.Suspender

public class Suspender
extends java.lang.Object

Author:
Constantinos Michael

Constructor Summary
Suspender()
           
 
Method Summary
static void suspendMillis(long milliseconds)
           
static void suspendSeconds(int seconds)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Suspender

public Suspender()
Method Detail

suspendSeconds

public static void suspendSeconds(int seconds)

suspendMillis

public static void suspendMillis(long milliseconds)


jaminid-0.99a/doc/com/prolixtech/utils/package-tree.html0000644000175000017500000001556310422252526021763 0ustar railrail com.prolixtech.utils Class Hierarchy

Hierarchy For Package com.prolixtech.utils

Package Hierarchies:
All Packages

Class Hierarchy

Interface Hierarchy



jaminid-0.99a/doc/com/prolixtech/utils/SingleLineFormatter.html0000644000175000017500000002454710422252526023352 0ustar railrail SingleLineFormatter

com.prolixtech.utils
Class SingleLineFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by java.util.logging.SimpleFormatter
          extended by com.prolixtech.utils.SingleLineFormatter

public class SingleLineFormatter
extends java.util.logging.SimpleFormatter


Constructor Summary
SingleLineFormatter()
           
 
Method Summary
 java.lang.String format(java.util.logging.LogRecord record)
           
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleLineFormatter

public SingleLineFormatter()
Method Detail

format

public java.lang.String format(java.util.logging.LogRecord record)
Overrides:
format in class java.util.logging.SimpleFormatter


jaminid-0.99a/doc/com/prolixtech/jaminid/0000755000175000017500000000000011217365120017004 5ustar railrailjaminid-0.99a/doc/com/prolixtech/jaminid/StreamingOracle.html0000644000175000017500000004055410422252526022763 0ustar railrail StreamingOracle

com.prolixtech.jaminid
Class StreamingOracle

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
      extended by com.prolixtech.jaminid.StreamingOracle

public class StreamingOracle
extends ContentOracle

Author:
Constantinos Michael

Field Summary
static java.lang.String PATH_START
           
 
Constructor Summary
StreamingOracle()
           
 
Method Summary
 java.lang.String demultiplex(Request cReqL, Response cRepL)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
 byte[] getNextBatch(Request cReqL, Response cRepL)
           
 int getStreamInterval()
           
static ContentOracle Instance()
           
 java.lang.String publishStream(StreamBundle a, java.lang.String path)
           
 
Methods inherited from class com.prolixtech.jaminid.ContentOracle
getDelegatedOracle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_START

public static final java.lang.String PATH_START
See Also:
Constant Field Values
Constructor Detail

StreamingOracle

public StreamingOracle()
Method Detail

publishStream

public java.lang.String publishStream(StreamBundle a,
                                      java.lang.String path)

Instance

public static ContentOracle Instance()

demultiplex

public java.lang.String demultiplex(Request cReqL,
                                    Response cRepL)
Description copied from class: ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Overrides:
demultiplex in class ContentOracle
Returns:
the output

getStreamInterval

public int getStreamInterval()

getNextBatch

public byte[] getNextBatch(Request cReqL,
                           Response cRepL)


jaminid-0.99a/doc/com/prolixtech/jaminid/Response.html0000644000175000017500000003717410422252526021506 0ustar railrail Response

com.prolixtech.jaminid
Class Response

java.lang.Object
  extended by com.prolixtech.jaminid.Response

public class Response
extends java.lang.Object

The response class encapsulates an HTTP response. It contains the response data (headers, etc) as well as functions to publish cookies, send files, etc.

Author:
Constantinos Michael TODO

Constructor Summary
Response(int statusCode, Protocol protocol, java.io.OutputStream out, Request masterRequest)
           
 
Method Summary
 byte[] CRLF()
           
 void publishHeader()
          Sends the header to the client.
 void sendCookie15DG(java.lang.String name, java.lang.String value)
          sets a fifteen day cookie
 void sendFile(java.io.File cFile)
          sends a file to the client.
 void setCookie(java.lang.String name, java.lang.String value, java.lang.String path, java.util.Date expires)
          sets a cookie
 void setHeaderLine(ProtocolResponseHeader header, java.lang.String value)
          sets one particular header line
 void setStatus(int statusCode)
          sets the status of the response to a certain HTTP status code
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Response

public Response(int statusCode,
                Protocol protocol,
                java.io.OutputStream out,
                Request masterRequest)
Method Detail

setStatus

public void setStatus(int statusCode)
sets the status of the response to a certain HTTP status code

Parameters:
statusCode - the code to set the status to

sendCookie15DG

public void sendCookie15DG(java.lang.String name,
                           java.lang.String value)
sets a fifteen day cookie

Parameters:
name - the field name
value - the field value

setCookie

public void setCookie(java.lang.String name,
                      java.lang.String value,
                      java.lang.String path,
                      java.util.Date expires)
sets a cookie

Parameters:
name - the field name
value - the field vaLUE
path - the relevant path
expires - the cookie activation day

publishHeader

public void publishHeader()
                   throws java.io.IOException
Sends the header to the client. After this, no more headers can be set, no more cookies can be send

Throws:
java.io.IOException

setHeaderLine

public void setHeaderLine(ProtocolResponseHeader header,
                          java.lang.String value)
sets one particular header line

Parameters:
header -
value -

CRLF

public byte[] CRLF()

sendFile

public void sendFile(java.io.File cFile)
              throws java.lang.Exception
sends a file to the client. Sets the MIME type accordingly

Parameters:
cFile - the file to send
Throws:
java.io.IOException
java.lang.Exception


jaminid-0.99a/doc/com/prolixtech/jaminid/package-summary.html0000644000175000017500000002131710422252526022766 0ustar railrail com.prolixtech.jaminid

Package com.prolixtech.jaminid

Interface Summary
MusicStream  
StreamBundle  
 

Class Summary
Client  
Connection The connection is a thread-of-service spanwed by the Daemon.
ContentOracle The content oracle is a very special class.
Daemon As in most HTTP implementations, the Daemon opens a port, listens for incoming connections, and then spawns the connections to serve that connection.
Protocol This class captures the essential messages in the HTTP protocol.
Request The request class encapsulates an HTTP request.
Response The response class encapsulates an HTTP response.
StreamingOracle  
 

Enum Summary
ProtocolResponseHeader  
 



jaminid-0.99a/doc/com/prolixtech/jaminid/Client.html0000644000175000017500000002470210422252526021117 0ustar railrail Client

com.prolixtech.jaminid
Class Client

java.lang.Object
  extended by com.prolixtech.jaminid.Client

public class Client
extends java.lang.Object

Author:
Constantinos Michael

Constructor Summary
Client()
           
 
Method Summary
 java.lang.String getContent(java.lang.String ip, int port, Request serviceRequest)
           
 java.lang.String getContent(java.lang.String ip, int port, java.lang.String location)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client()
Method Detail

getContent

public java.lang.String getContent(java.lang.String ip,
                                   int port,
                                   java.lang.String location)

getContent

public java.lang.String getContent(java.lang.String ip,
                                   int port,
                                   Request serviceRequest)


jaminid-0.99a/doc/com/prolixtech/jaminid/package-use.html0000644000175000017500000003115110422252526022062 0ustar railrail Uses of Package com.prolixtech.jaminid

Uses of Package
com.prolixtech.jaminid

Packages that use com.prolixtech.jaminid
com.prolixtech.jaminid   
com.prolixtech.jaminid_examples   
com.prolixtech.jaminid_examples.ajax   
com.prolixtech.utils   
 

Classes in com.prolixtech.jaminid used by com.prolixtech.jaminid
Connection
          The connection is a thread-of-service spanwed by the Daemon.
ContentOracle
          The content oracle is a very special class.
Daemon
          As in most HTTP implementations, the Daemon opens a port, listens for incoming connections, and then spawns the connections to serve that connection.
MusicStream
           
Protocol
          This class captures the essential messages in the HTTP protocol.
ProtocolResponseHeader
           
Request
          The request class encapsulates an HTTP request.
Response
          The response class encapsulates an HTTP response.
StreamBundle
           
 

Classes in com.prolixtech.jaminid used by com.prolixtech.jaminid_examples
ContentOracle
          The content oracle is a very special class.
Request
          The request class encapsulates an HTTP request.
Response
          The response class encapsulates an HTTP response.
 

Classes in com.prolixtech.jaminid used by com.prolixtech.jaminid_examples.ajax
ContentOracle
          The content oracle is a very special class.
Request
          The request class encapsulates an HTTP request.
Response
          The response class encapsulates an HTTP response.
 

Classes in com.prolixtech.jaminid used by com.prolixtech.utils
Request
          The request class encapsulates an HTTP request.
 



jaminid-0.99a/doc/com/prolixtech/jaminid/package-frame.html0000644000175000017500000000446210422252526022365 0ustar railrail com.prolixtech.jaminid com.prolixtech.jaminid
Interfaces 
MusicStream
StreamBundle
Classes 
Client
Connection
ContentOracle
Daemon
Protocol
Request
Response
StreamingOracle
Enums 
ProtocolResponseHeader
jaminid-0.99a/doc/com/prolixtech/jaminid/MusicStream.html0000644000175000017500000002251710422252526022137 0ustar railrail MusicStream

com.prolixtech.jaminid
Interface MusicStream


public interface MusicStream

Author:
Constantinos Michael

Method Summary
 java.lang.Object clone()
           
 int getByteSizeForTime(int streamInterval)
           
 long getPos()
           
 byte[] readNext(int len)
           
 

Method Detail

readNext

byte[] readNext(int len)

getPos

long getPos()
Returns:
the position of the stream

clone

java.lang.Object clone()

getByteSizeForTime

int getByteSizeForTime(int streamInterval)
Parameters:
streamInterval -
Returns:
the a stream segment


jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/0000755000175000017500000000000011217365120020703 5ustar railrailjaminid-0.99a/doc/com/prolixtech/jaminid/class-use/StreamingOracle.html0000644000175000017500000001317710422252526024663 0ustar railrail Uses of Class com.prolixtech.jaminid.StreamingOracle

Uses of Class
com.prolixtech.jaminid.StreamingOracle

No usage of com.prolixtech.jaminid.StreamingOracle



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/Response.html0000644000175000017500000003254110422252526023376 0ustar railrail Uses of Class com.prolixtech.jaminid.Response

Uses of Class
com.prolixtech.jaminid.Response

Packages that use Response
com.prolixtech.jaminid   
com.prolixtech.jaminid_examples   
com.prolixtech.jaminid_examples.ajax   
 

Uses of Response in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid with parameters of type Response
 java.lang.String StreamingOracle.demultiplex(Request cReqL, Response cRepL)
           
 java.lang.String ContentOracle.demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
 byte[] StreamingOracle.getNextBatch(Request cReqL, Response cRepL)
           
 

Uses of Response in com.prolixtech.jaminid_examples
 

Methods in com.prolixtech.jaminid_examples with parameters of type Response
 java.lang.String SimpleServer.demultiplex(Request connRequest, Response connResponse)
           
 java.lang.String HelloWorldServer.demultiplex(Request connRequest, Response connResponse)
           
 

Uses of Response in com.prolixtech.jaminid_examples.ajax
 

Methods in com.prolixtech.jaminid_examples.ajax with parameters of type Response
 java.lang.String SimpleAjaxServer.demultiplex(Request connRequest, Response connResponse)
           
 



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/Client.html0000644000175000017500000001304510422252526023014 0ustar railrail Uses of Class com.prolixtech.jaminid.Client

Uses of Class
com.prolixtech.jaminid.Client

No usage of com.prolixtech.jaminid.Client



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/MusicStream.html0000644000175000017500000001705010422252526024032 0ustar railrail Uses of Interface com.prolixtech.jaminid.MusicStream

Uses of Interface
com.prolixtech.jaminid.MusicStream

Packages that use MusicStream
com.prolixtech.jaminid   
 

Uses of MusicStream in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid that return MusicStream
 MusicStream StreamBundle.getStream(Request req)
           
 



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/Daemon.html0000644000175000017500000002141310422252526022777 0ustar railrail Uses of Class com.prolixtech.jaminid.Daemon

Uses of Class
com.prolixtech.jaminid.Daemon

Packages that use Daemon
com.prolixtech.jaminid   
 

Uses of Daemon in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid that return Daemon
 Daemon Request.getDaemon()
          Returns the master daemon
 

Constructors in com.prolixtech.jaminid with parameters of type Daemon
Connection(java.net.Socket activeSocket, Daemon masterDaemon)
          default constructor to create a Connection
Request(Daemon activeDaemon, Connection connx)
          Creates a new request object
 



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/Request.html0000644000175000017500000004660410422252526023235 0ustar railrail Uses of Class com.prolixtech.jaminid.Request

Uses of Class
com.prolixtech.jaminid.Request

Packages that use Request
com.prolixtech.jaminid   
com.prolixtech.jaminid_examples   
com.prolixtech.jaminid_examples.ajax   
com.prolixtech.utils   
 

Uses of Request in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid with parameters of type Request
 java.lang.String StreamingOracle.demultiplex(Request cReqL, Response cRepL)
           
 java.lang.String ContentOracle.demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
 void StreamBundle.disbandStream(Request req)
           
 java.lang.String Client.getContent(java.lang.String ip, int port, Request serviceRequest)
           
 ContentOracle ContentOracle.getDelegatedOracle(Request serviceRequest)
           
 byte[] StreamingOracle.getNextBatch(Request cReqL, Response cRepL)
           
 MusicStream StreamBundle.getStream(Request req)
           
 

Constructors in com.prolixtech.jaminid with parameters of type Request
Response(int statusCode, Protocol protocol, java.io.OutputStream out, Request masterRequest)
           
 

Uses of Request in com.prolixtech.jaminid_examples
 

Methods in com.prolixtech.jaminid_examples with parameters of type Request
 java.lang.String SimpleServer.demultiplex(Request connRequest, Response connResponse)
           
 java.lang.String HelloWorldServer.demultiplex(Request connRequest, Response connResponse)
           
 

Uses of Request in com.prolixtech.jaminid_examples.ajax
 

Methods in com.prolixtech.jaminid_examples.ajax with parameters of type Request
 java.lang.String SimpleAjaxServer.demultiplex(Request connRequest, Response connResponse)
           
 

Uses of Request in com.prolixtech.utils
 

Methods in com.prolixtech.utils with parameters of type Request
 void NullLogger.http(Request req, java.lang.String msg)
           
 void MboxLogger.http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 void JavaLogger.http(Request req, java.lang.String msg)
          Specialized submit for HTTP messages
 



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/ContentOracle.html0000644000175000017500000003405610422252526024343 0ustar railrail Uses of Class com.prolixtech.jaminid.ContentOracle

Uses of Class
com.prolixtech.jaminid.ContentOracle

Packages that use ContentOracle
com.prolixtech.jaminid   
com.prolixtech.jaminid_examples   
com.prolixtech.jaminid_examples.ajax   
 

Uses of ContentOracle in com.prolixtech.jaminid
 

Subclasses of ContentOracle in com.prolixtech.jaminid
 class StreamingOracle
           
 

Methods in com.prolixtech.jaminid that return ContentOracle
 ContentOracle ContentOracle.getDelegatedOracle(Request serviceRequest)
           
 ContentOracle Daemon.getOracle()
           
static ContentOracle StreamingOracle.Instance()
           
static ContentOracle ContentOracle.Instance()
          pertains to the singleton DESIGN PATTERN
 

Constructors in com.prolixtech.jaminid with parameters of type ContentOracle
Daemon(int serverPort, ContentOracle cOra)
          creates a new daemon and opens on specific port
 

Uses of ContentOracle in com.prolixtech.jaminid_examples
 

Subclasses of ContentOracle in com.prolixtech.jaminid_examples
 class HelloWorldServer
           
 class SimpleServer
           
 

Uses of ContentOracle in com.prolixtech.jaminid_examples.ajax
 

Subclasses of ContentOracle in com.prolixtech.jaminid_examples.ajax
 class SimpleAjaxServer
           
 



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/StreamBundle.html0000644000175000017500000001706510422252526024171 0ustar railrail Uses of Interface com.prolixtech.jaminid.StreamBundle

Uses of Interface
com.prolixtech.jaminid.StreamBundle

Packages that use StreamBundle
com.prolixtech.jaminid   
 

Uses of StreamBundle in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid with parameters of type StreamBundle
 java.lang.String StreamingOracle.publishStream(StreamBundle a, java.lang.String path)
           
 



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/Protocol.html0000644000175000017500000002151510422252526023400 0ustar railrail Uses of Class com.prolixtech.jaminid.Protocol

Uses of Class
com.prolixtech.jaminid.Protocol

Packages that use Protocol
com.prolixtech.jaminid   
 

Uses of Protocol in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid that return Protocol
 Protocol Daemon.getProtocol()
           
static Protocol Protocol.Instance()
           
 

Constructors in com.prolixtech.jaminid with parameters of type Protocol
Response(int statusCode, Protocol protocol, java.io.OutputStream out, Request masterRequest)
           
 



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/ProtocolResponseHeader.html0000644000175000017500000002250010422252526026223 0ustar railrail Uses of Class com.prolixtech.jaminid.ProtocolResponseHeader

Uses of Class
com.prolixtech.jaminid.ProtocolResponseHeader

Packages that use ProtocolResponseHeader
com.prolixtech.jaminid   
 

Uses of ProtocolResponseHeader in com.prolixtech.jaminid
 

Methods in com.prolixtech.jaminid that return ProtocolResponseHeader
static ProtocolResponseHeader ProtocolResponseHeader.valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ProtocolResponseHeader[] ProtocolResponseHeader.values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 

Methods in com.prolixtech.jaminid with parameters of type ProtocolResponseHeader
 void Response.setHeaderLine(ProtocolResponseHeader header, java.lang.String value)
          sets one particular header line
 



jaminid-0.99a/doc/com/prolixtech/jaminid/class-use/Connection.html0000644000175000017500000001674010422252526023702 0ustar railrail Uses of Class com.prolixtech.jaminid.Connection

Uses of Class
com.prolixtech.jaminid.Connection

Packages that use Connection
com.prolixtech.jaminid   
 

Uses of Connection in com.prolixtech.jaminid
 

Constructors in com.prolixtech.jaminid with parameters of type Connection
Request(Daemon activeDaemon, Connection connx)
          Creates a new request object
 



jaminid-0.99a/doc/com/prolixtech/jaminid/Daemon.html0000644000175000017500000004757610422252526021122 0ustar railrail Daemon

com.prolixtech.jaminid
Class Daemon

java.lang.Object
  extended by java.lang.Thread
      extended by com.prolixtech.jaminid.Daemon
All Implemented Interfaces:
java.lang.Runnable

public class Daemon
extends java.lang.Thread

As in most HTTP implementations, the Daemon opens a port, listens for incoming connections, and then spawns the connections to serve that connection. Sometimes this is called the server, we already have plenty of things in the works that will be called servers, so we're going for the what was the original name of the process before Marketting got to it. We're going for a no frills implementation that handles all the law level stuff and delegates the production of content to what we call a ContentOracle. This is a nice clean design that makes this code reusable. On the subject of why an HTTP server vs a JSP implementation, we find this to be a better approach. Less messy, makes the whole thing easier to install, more controllable, faster - this is no frills. The code is centralized, almost all of it in the server itself.

Author:
Constantinos Michael TODO

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static java.lang.String VERSION
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Daemon(int serverPort, ContentOracle cOra)
          creates a new daemon and opens on specific port
 
Method Summary
 ContentOracle getOracle()
           
 Protocol getProtocol()
           
 int getServerPort()
          returns the server port
 boolean isRunning()
           
static void main(java.lang.String[] args)
           
 void printlog(java.lang.String message)
           
 void run()
          Handles listening for new connections and launching client threads
 void tearDown()
          tears down server
 void tearDownAndWait()
          Tears down server and waits for it to tear down
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

Daemon

public Daemon(int serverPort,
              ContentOracle cOra)
creates a new daemon and opens on specific port

Parameters:
serverPort - the port to open on
cOra - the content oracle to use
Method Detail

getServerPort

public int getServerPort()
returns the server port

Returns:
the server port

getProtocol

public Protocol getProtocol()
Returns:
the protocol instance

getOracle

public ContentOracle getOracle()
Returns:
the oracle instance

run

public void run()
Handles listening for new connections and launching client threads

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Thread

main

public static void main(java.lang.String[] args)

printlog

public void printlog(java.lang.String message)

isRunning

public boolean isRunning()
Returns:
true if the server is up

tearDown

public void tearDown()
tears down server


tearDownAndWait

public void tearDownAndWait()
Tears down server and waits for it to tear down



jaminid-0.99a/doc/com/prolixtech/jaminid/Request.html0000644000175000017500000004752710422252526021343 0ustar railrail Request

com.prolixtech.jaminid
Class Request

java.lang.Object
  extended by com.prolixtech.jaminid.Request

public class Request
extends java.lang.Object

The request class encapsulates an HTTP request. It is responsible for splitting up the query, processing POST forms, splitting to URI and URL, and once it is created, it is essentially a data struct for all this information.

Author:
Constantinos Michael TODO

Constructor Summary
Request(Daemon activeDaemon, Connection connx)
          Creates a new request object
 
Method Summary
 void addRequestLines(java.lang.String requestMessage)
          Method Adds Request Lines
 void appendToBody(java.lang.String body)
          appends more stuff to body of request
 boolean checkParam(java.lang.String param, java.lang.String possvalue)
           
 java.lang.String getBody()
          Used in POST to return the body of the request
 Daemon getDaemon()
          Returns the master daemon
 java.util.Map getHeader()
          Returns header
 java.lang.String getIPAddressString()
           
 java.lang.String getLocation()
          Return the location sought
 java.lang.String getMessage()
          Returns the entire request message
 java.lang.String getParam(java.lang.String key)
           
 java.util.Map<java.lang.String,java.lang.String> getParamMap()
           
 java.lang.String getParamOrNull(java.lang.String key)
           
 java.lang.String getParamString()
           
 java.lang.String getURI()
          Returns the Uniform Resource Identifier
 boolean isRequestBad()
           
 void setMethodLine(java.lang.String methodLine)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Request

public Request(Daemon activeDaemon,
               Connection connx)
Creates a new request object

Parameters:
activeDaemon - the daemon that spawned the request
connx - the connection that produced this request
Method Detail

isRequestBad

public boolean isRequestBad()
Returns:
if the request was malformed

getURI

public java.lang.String getURI()
Returns the Uniform Resource Identifier

Returns:
the URI Uniform Resource Identifier

getMessage

public java.lang.String getMessage()
Returns the entire request message

Returns:
the entire request message

getBody

public java.lang.String getBody()
Used in POST to return the body of the request

Returns:
the body of the request (useful in POST)

getDaemon

public Daemon getDaemon()
Returns the master daemon

Returns:
the master daemon where this request was spawned

getHeader

public java.util.Map getHeader()
Returns header

Returns:
the header of this request

getParamMap

public java.util.Map<java.lang.String,java.lang.String> getParamMap()
Returns:
a param map of the request (like Perl)

getLocation

public java.lang.String getLocation()
Return the location sought

Returns:
the location sought (URL)

setMethodLine

public void setMethodLine(java.lang.String methodLine)
Parameters:
methodLine - the method line of the request

appendToBody

public void appendToBody(java.lang.String body)
appends more stuff to body of request

Parameters:
body - what to append

addRequestLines

public void addRequestLines(java.lang.String requestMessage)
Method Adds Request Lines

Parameters:
requestMessage - the message to add

getIPAddressString

public java.lang.String getIPAddressString()
Returns:
the ip address of the request

getParamString

public java.lang.String getParamString()
Returns:
the param string

getParam

public java.lang.String getParam(java.lang.String key)

getParamOrNull

public java.lang.String getParamOrNull(java.lang.String key)

checkParam

public boolean checkParam(java.lang.String param,
                          java.lang.String possvalue)


jaminid-0.99a/doc/com/prolixtech/jaminid/ContentOracle.html0000644000175000017500000003224610422252526022443 0ustar railrail ContentOracle

com.prolixtech.jaminid
Class ContentOracle

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
Direct Known Subclasses:
HelloWorldServer, SimpleAjaxServer, SimpleServer, StreamingOracle

public class ContentOracle
extends java.lang.Object

The content oracle is a very special class. It completely allows us to delegate the computation of

Author:
Constantinos Michael TODO

Constructor Summary
ContentOracle()
           
 
Method Summary
 java.lang.String demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
 ContentOracle getDelegatedOracle(Request serviceRequest)
           
static ContentOracle Instance()
          pertains to the singleton DESIGN PATTERN
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentOracle

public ContentOracle()
Method Detail

Instance

public static ContentOracle Instance()
pertains to the singleton DESIGN PATTERN

Returns:
ContentOracle

demultiplex

public java.lang.String demultiplex(Request connRequest,
                                    Response connResponse)
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Parameters:
connRequest -
connResponse -
Returns:
the output

getDelegatedOracle

public ContentOracle getDelegatedOracle(Request serviceRequest)
Returns:
the oracle that will handle the request


jaminid-0.99a/doc/com/prolixtech/jaminid/StreamBundle.html0000644000175000017500000002315710422252526022271 0ustar railrail StreamBundle

com.prolixtech.jaminid
Interface StreamBundle


public interface StreamBundle

Author:
Constantinos Michael

Method Summary
 void disbandStream(Request req)
           
 MusicStream getStream(Request req)
           
 void setFullPath(java.lang.String fullpath)
           
 

Method Detail

getStream

MusicStream getStream(Request req)

disbandStream

void disbandStream(Request req)

setFullPath

void setFullPath(java.lang.String fullpath)
Parameters:
fullpath -


jaminid-0.99a/doc/com/prolixtech/jaminid/package-tree.html0000644000175000017500000001705010422252526022227 0ustar railrail com.prolixtech.jaminid Class Hierarchy

Hierarchy For Package com.prolixtech.jaminid

Package Hierarchies:
All Packages

Class Hierarchy

Interface Hierarchy

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)


jaminid-0.99a/doc/com/prolixtech/jaminid/Protocol.html0000644000175000017500000011446610422252526021511 0ustar railrail Protocol

com.prolixtech.jaminid
Class Protocol

java.lang.Object
  extended by com.prolixtech.jaminid.Protocol

public class Protocol
extends java.lang.Object

This class captures the essential messages in the HTTP protocol. It behaves as a singleton.

Author:
Constantinos Michael

Field Summary
static int ACCEPTED
           
static int BAD_GATEWAY
           
static int BAD_REQUEST
           
static int CONFLICT
           
static int CONTINUE
           
static int CREATED
           
static int EXPECTATION_FAILED
           
static int FORBIDDEN
           
static int GATEWAY_TIMEOUT
           
static int GONE
           
static java.lang.String HQ_IFMODSINCE
           
static java.lang.String HTTP_VERSION
           
static int HTTP_VERSION_NOT_SUPPORTED
           
static int INTERNAL_SERVER_ERROR
           
static int LENGTH_REQUIRED
           
static java.lang.String MIMEFILE
           
static int MOVED_PERMANENTLY
           
static int MOVED_TEMPORARILY
           
static int MULTIPLE_CHOICE
           
static int NO_CONTENT
           
static int NONE_ACCEPTABLE
           
static int NOT_ALLOWED
           
static int NOT_FOUND
           
static int NOT_IMPLEMENTED
           
static int NOT_MODIFIED
           
static int OK
           
static int PARTIAL_CONTENT
           
static int PAYMENT_REQUIRED
           
static int PRECONDITION_FAILED
           
static int PROVISIONAL_INFORMATION
           
static int PROXY_AUTH_REQUIRED
           
static int REQUEST_ENTITY_TOO_LARGE
           
static int REQUEST_TIMEOUT
           
static int REQUEST_URI_TOO_LONG
           
static int REQUESTED_RANGE_NOT_SATISFIABLE
           
static int RESET_CONTENT
           
static int SEE_OTHER
           
static int SERVICE_UNAVAILABLE
           
static int SWITCHING
           
static int UNAUTHORIZED
           
static int UNSUPPORTED_MEDIA_TYPE
           
static int USE_PROXY
           
 
Method Summary
static java.lang.String getHeaderResponseStatus(int statusCode)
          gets a String description of the status code e.g (200 OK) or (404 FnF)
static java.lang.String getMIME(java.lang.String extension)
          MIME type accessor.
static Protocol Instance()
           
static void makeNewMIME()
          Creates a new mime file with the bare basic defaults
static boolean requestHeaderExists(java.lang.String requestHeader)
          checks if a request header exists in the protocol
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIMEFILE

public static final java.lang.String MIMEFILE
See Also:
Constant Field Values

HTTP_VERSION

public static final java.lang.String HTTP_VERSION
See Also:
Constant Field Values

CONTINUE

public static final int CONTINUE
See Also:
Constant Field Values

SWITCHING

public static final int SWITCHING
See Also:
Constant Field Values

OK

public static final int OK
See Also:
Constant Field Values

CREATED

public static final int CREATED
See Also:
Constant Field Values

ACCEPTED

public static final int ACCEPTED
See Also:
Constant Field Values

PROVISIONAL_INFORMATION

public static final int PROVISIONAL_INFORMATION
See Also:
Constant Field Values

NO_CONTENT

public static final int NO_CONTENT
See Also:
Constant Field Values

RESET_CONTENT

public static final int RESET_CONTENT
See Also:
Constant Field Values

PARTIAL_CONTENT

public static final int PARTIAL_CONTENT
See Also:
Constant Field Values

MULTIPLE_CHOICE

public static final int MULTIPLE_CHOICE
See Also:
Constant Field Values

MOVED_PERMANENTLY

public static final int MOVED_PERMANENTLY
See Also:
Constant Field Values

MOVED_TEMPORARILY

public static final int MOVED_TEMPORARILY
See Also:
Constant Field Values

SEE_OTHER

public static final int SEE_OTHER
See Also:
Constant Field Values

NOT_MODIFIED

public static final int NOT_MODIFIED
See Also:
Constant Field Values

USE_PROXY

public static final int USE_PROXY
See Also:
Constant Field Values

BAD_REQUEST

public static final int BAD_REQUEST
See Also:
Constant Field Values

UNAUTHORIZED

public static final int UNAUTHORIZED
See Also:
Constant Field Values

PAYMENT_REQUIRED

public static final int PAYMENT_REQUIRED
See Also:
Constant Field Values

FORBIDDEN

public static final int FORBIDDEN
See Also:
Constant Field Values

NOT_FOUND

public static final int NOT_FOUND
See Also:
Constant Field Values

NOT_ALLOWED

public static final int NOT_ALLOWED
See Also:
Constant Field Values

NONE_ACCEPTABLE

public static final int NONE_ACCEPTABLE
See Also:
Constant Field Values

PROXY_AUTH_REQUIRED

public static final int PROXY_AUTH_REQUIRED
See Also:
Constant Field Values

REQUEST_TIMEOUT

public static final int REQUEST_TIMEOUT
See Also:
Constant Field Values

CONFLICT

public static final int CONFLICT
See Also:
Constant Field Values

GONE

public static final int GONE
See Also:
Constant Field Values

LENGTH_REQUIRED

public static final int LENGTH_REQUIRED
See Also:
Constant Field Values

PRECONDITION_FAILED

public static final int PRECONDITION_FAILED
See Also:
Constant Field Values

REQUEST_ENTITY_TOO_LARGE

public static final int REQUEST_ENTITY_TOO_LARGE
See Also:
Constant Field Values

REQUEST_URI_TOO_LONG

public static final int REQUEST_URI_TOO_LONG
See Also:
Constant Field Values

UNSUPPORTED_MEDIA_TYPE

public static final int UNSUPPORTED_MEDIA_TYPE
See Also:
Constant Field Values

REQUESTED_RANGE_NOT_SATISFIABLE

public static final int REQUESTED_RANGE_NOT_SATISFIABLE
See Also:
Constant Field Values

EXPECTATION_FAILED

public static final int EXPECTATION_FAILED
See Also:
Constant Field Values

INTERNAL_SERVER_ERROR

public static final int INTERNAL_SERVER_ERROR
See Also:
Constant Field Values

NOT_IMPLEMENTED

public static final int NOT_IMPLEMENTED
See Also:
Constant Field Values

BAD_GATEWAY

public static final int BAD_GATEWAY
See Also:
Constant Field Values

SERVICE_UNAVAILABLE

public static final int SERVICE_UNAVAILABLE
See Also:
Constant Field Values

GATEWAY_TIMEOUT

public static final int GATEWAY_TIMEOUT
See Also:
Constant Field Values

HTTP_VERSION_NOT_SUPPORTED

public static final int HTTP_VERSION_NOT_SUPPORTED
See Also:
Constant Field Values

HQ_IFMODSINCE

public static final java.lang.String HQ_IFMODSINCE
See Also:
Constant Field Values
Method Detail

Instance

public static Protocol Instance()

getMIME

public static java.lang.String getMIME(java.lang.String extension)
MIME type accessor. By using this, we understand that sometimes the wrong headers might go out for a badly named file (e.g. an mp3 file with extension .txt but this is how all the major HTTP servers do it anyway.

Parameters:
extension - the extension of the file
Returns:
the MIME type of the file according to the extension

getHeaderResponseStatus

public static java.lang.String getHeaderResponseStatus(int statusCode)
gets a String description of the status code e.g (200 OK) or (404 FnF)

Parameters:
statusCode - the integer status code
Returns:
the String status code

requestHeaderExists

public static boolean requestHeaderExists(java.lang.String requestHeader)
checks if a request header exists in the protocol

Parameters:
requestHeader - the request headcer to check
Returns:
true if it exists, false otherwise

makeNewMIME

public static void makeNewMIME()
Creates a new mime file with the bare basic defaults



jaminid-0.99a/doc/com/prolixtech/jaminid/ProtocolResponseHeader.html0000644000175000017500000005773110422252526024342 0ustar railrail ProtocolResponseHeader

com.prolixtech.jaminid
Enum ProtocolResponseHeader

java.lang.Object
  extended by java.lang.Enum<ProtocolResponseHeader>
      extended by com.prolixtech.jaminid.ProtocolResponseHeader
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ProtocolResponseHeader>

public enum ProtocolResponseHeader
extends java.lang.Enum<ProtocolResponseHeader>

Author:
Constantinos Michael

Enum Constant Summary
Accept_Ranges
           
Age
           
Allow
           
Connection
           
Content_Encoding
           
Content_Language
           
Content_Length
           
Content_Location
           
Content_MD5
           
Content_Range
           
Content_Type
           
Date
           
ETag
           
Expires
           
Icy_MetaData
           
Last_Modified
           
Location
           
Proxy_Authenticate
           
Retry_After
           
Server
           
Set_Cookie
           
Vary
           
WWW_Authenticate
           
 
Method Summary
static ProtocolResponseHeader valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ProtocolResponseHeader[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Age

public static final ProtocolResponseHeader Age

Location

public static final ProtocolResponseHeader Location

Server

public static final ProtocolResponseHeader Server

Vary

public static final ProtocolResponseHeader Vary

Connection

public static final ProtocolResponseHeader Connection

Date

public static final ProtocolResponseHeader Date

Accept_Ranges

public static final ProtocolResponseHeader Accept_Ranges

Proxy_Authenticate

public static final ProtocolResponseHeader Proxy_Authenticate

Retry_After

public static final ProtocolResponseHeader Retry_After

WWW_Authenticate

public static final ProtocolResponseHeader WWW_Authenticate

Set_Cookie

public static final ProtocolResponseHeader Set_Cookie

Allow

public static final ProtocolResponseHeader Allow

Expires

public static final ProtocolResponseHeader Expires

ETag

public static final ProtocolResponseHeader ETag

Content_Type

public static final ProtocolResponseHeader Content_Type

Content_Encoding

public static final ProtocolResponseHeader Content_Encoding

Content_Language

public static final ProtocolResponseHeader Content_Language

Content_Length

public static final ProtocolResponseHeader Content_Length

Content_Location

public static final ProtocolResponseHeader Content_Location

Content_MD5

public static final ProtocolResponseHeader Content_MD5

Content_Range

public static final ProtocolResponseHeader Content_Range

Last_Modified

public static final ProtocolResponseHeader Last_Modified

Icy_MetaData

public static final ProtocolResponseHeader Icy_MetaData
Method Detail

values

public static final ProtocolResponseHeader[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ProtocolResponseHeader c : ProtocolResponseHeader.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ProtocolResponseHeader valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name


jaminid-0.99a/doc/com/prolixtech/jaminid/Connection.html0000644000175000017500000003514210422252526022000 0ustar railrail Connection

com.prolixtech.jaminid
Class Connection

java.lang.Object
  extended by java.lang.Thread
      extended by com.prolixtech.jaminid.Connection
All Implemented Interfaces:
java.lang.Runnable

public class Connection
extends java.lang.Thread

The connection is a thread-of-service spanwed by the Daemon. The connection handles the IO part of the Response/Oracle/Request paradigm by creating the request and response objects, and calling the Oracle at the appropriate time to extract the output which will be send to the client.

Author:
Constantinos Michael TODO

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Connection(java.net.Socket activeSocket, Daemon masterDaemon)
          default constructor to create a Connection
 
Method Summary
static java.lang.String getGMTString(java.util.Date d)
           
 java.lang.String getIPAddressString()
           
 void run()
          The thread runs here.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Connection

public Connection(java.net.Socket activeSocket,
                  Daemon masterDaemon)
           throws java.io.IOException
default constructor to create a Connection

Parameters:
activeSocket - the socket on which the connection was madee
masterDaemon - the daemon that spanwed this connection
Throws:
java.io.IOException
Method Detail

getIPAddressString

public java.lang.String getIPAddressString()

run

public void run()
The thread runs here. This essentially allows the Daemon to serve multiple threads. ALL IO is carried out here.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getGMTString

public static java.lang.String getGMTString(java.util.Date d)


jaminid-0.99a/doc/com/prolixtech/jaminid_examples/0000755000175000017500000000000011217365120020702 5ustar railrailjaminid-0.99a/doc/com/prolixtech/jaminid_examples/SimpleServer.html0000644000175000017500000003073410422252526024221 0ustar railrail SimpleServer

com.prolixtech.jaminid_examples
Class SimpleServer

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
      extended by com.prolixtech.jaminid_examples.SimpleServer

public class SimpleServer
extends ContentOracle

Author:
Constantinos Michael

Constructor Summary
SimpleServer()
           
 
Method Summary
 java.lang.String demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
static void main(java.lang.String[] args)
           
 
Methods inherited from class com.prolixtech.jaminid.ContentOracle
getDelegatedOracle, Instance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleServer

public SimpleServer()
Method Detail

demultiplex

public java.lang.String demultiplex(Request connRequest,
                                    Response connResponse)
Description copied from class: ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Overrides:
demultiplex in class ContentOracle
Returns:
the output

main

public static void main(java.lang.String[] args)


jaminid-0.99a/doc/com/prolixtech/jaminid_examples/HelloWorldServer.html0000644000175000017500000003445410422252526025046 0ustar railrail HelloWorldServer

com.prolixtech.jaminid_examples
Class HelloWorldServer

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
      extended by com.prolixtech.jaminid_examples.HelloWorldServer

public class HelloWorldServer
extends ContentOracle

Author:
Constantinos Michael

Field Summary
static java.lang.String HELLO
           
static int PORT
           
 
Constructor Summary
HelloWorldServer()
           
 
Method Summary
 java.lang.String demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
static void main(java.lang.String[] args)
           
 
Methods inherited from class com.prolixtech.jaminid.ContentOracle
getDelegatedOracle, Instance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static final int PORT
See Also:
Constant Field Values

HELLO

public static java.lang.String HELLO
Constructor Detail

HelloWorldServer

public HelloWorldServer()
Method Detail

demultiplex

public java.lang.String demultiplex(Request connRequest,
                                    Response connResponse)
Description copied from class: ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Overrides:
demultiplex in class ContentOracle
Returns:
the output

main

public static void main(java.lang.String[] args)


jaminid-0.99a/doc/com/prolixtech/jaminid_examples/package-summary.html0000644000175000017500000001446710422252526024674 0ustar railrail com.prolixtech.jaminid_examples

Package com.prolixtech.jaminid_examples

Class Summary
HelloWorldServer  
SimpleServer  
 



jaminid-0.99a/doc/com/prolixtech/jaminid_examples/package-use.html0000644000175000017500000001246410422252526023766 0ustar railrail Uses of Package com.prolixtech.jaminid_examples

Uses of Package
com.prolixtech.jaminid_examples

No usage of com.prolixtech.jaminid_examples



jaminid-0.99a/doc/com/prolixtech/jaminid_examples/package-frame.html0000644000175000017500000000206010422252526024253 0ustar railrail com.prolixtech.jaminid_examples com.prolixtech.jaminid_examples
Classes 
HelloWorldServer
SimpleServer
jaminid-0.99a/doc/com/prolixtech/jaminid_examples/class-use/0000755000175000017500000000000011217365117022607 5ustar railrailjaminid-0.99a/doc/com/prolixtech/jaminid_examples/class-use/SimpleServer.html0000644000175000017500000001327310422252526026117 0ustar railrail Uses of Class com.prolixtech.jaminid_examples.SimpleServer

Uses of Class
com.prolixtech.jaminid_examples.SimpleServer

No usage of com.prolixtech.jaminid_examples.SimpleServer



jaminid-0.99a/doc/com/prolixtech/jaminid_examples/class-use/HelloWorldServer.html0000644000175000017500000001334310422252526026737 0ustar railrail Uses of Class com.prolixtech.jaminid_examples.HelloWorldServer

Uses of Class
com.prolixtech.jaminid_examples.HelloWorldServer

No usage of com.prolixtech.jaminid_examples.HelloWorldServer



jaminid-0.99a/doc/com/prolixtech/jaminid_examples/ajax/0000755000175000017500000000000011217365117021633 5ustar railrailjaminid-0.99a/doc/com/prolixtech/jaminid_examples/ajax/SimpleAjaxServer.html0000644000175000017500000003334110422252526025745 0ustar railrail SimpleAjaxServer

com.prolixtech.jaminid_examples.ajax
Class SimpleAjaxServer

java.lang.Object
  extended by com.prolixtech.jaminid.ContentOracle
      extended by com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer

public class SimpleAjaxServer
extends ContentOracle

Author:
Constantinos Michael

Field Summary
static int PORT
           
 
Constructor Summary
SimpleAjaxServer()
           
 
Method Summary
 java.lang.String demultiplex(Request connRequest, Response connResponse)
          the main function of the oracle, is to demux the request and produce an output that is relative to the request.
static void main(java.lang.String[] args)
           
 
Methods inherited from class com.prolixtech.jaminid.ContentOracle
getDelegatedOracle, Instance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static final int PORT
See Also:
Constant Field Values
Constructor Detail

SimpleAjaxServer

public SimpleAjaxServer()
Method Detail

demultiplex

public java.lang.String demultiplex(Request connRequest,
                                    Response connResponse)
Description copied from class: ContentOracle
the main function of the oracle, is to demux the request and produce an output that is relative to the request. in this example, it is a static HTML, that is all we care about for now.

Overrides:
demultiplex in class ContentOracle
Returns:
the output

main

public static void main(java.lang.String[] args)


jaminid-0.99a/doc/com/prolixtech/jaminid_examples/ajax/package-summary.html0000644000175000017500000001425110422252526025606 0ustar railrail com.prolixtech.jaminid_examples.ajax

Package com.prolixtech.jaminid_examples.ajax

Class Summary
SimpleAjaxServer  
 



jaminid-0.99a/doc/com/prolixtech/jaminid_examples/ajax/package-use.html0000644000175000017500000001257710422252526024716 0ustar railrail Uses of Package com.prolixtech.jaminid_examples.ajax

Uses of Package
com.prolixtech.jaminid_examples.ajax

No usage of com.prolixtech.jaminid_examples.ajax



jaminid-0.99a/doc/com/prolixtech/jaminid_examples/ajax/package-frame.html0000644000175000017500000000173010422252526025201 0ustar railrail com.prolixtech.jaminid_examples.ajax com.prolixtech.jaminid_examples.ajax
Classes 
SimpleAjaxServer
jaminid-0.99a/doc/com/prolixtech/jaminid_examples/ajax/class-use/0000755000175000017500000000000011217365117023532 5ustar railrailjaminid-0.99a/doc/com/prolixtech/jaminid_examples/ajax/class-use/SimpleAjaxServer.html0000644000175000017500000001351010422252526027640 0ustar railrail Uses of Class com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer

Uses of Class
com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer

No usage of com.prolixtech.jaminid_examples.ajax.SimpleAjaxServer



jaminid-0.99a/doc/com/prolixtech/jaminid_examples/ajax/package-tree.html0000644000175000017500000001417710422252526025057 0ustar railrail com.prolixtech.jaminid_examples.ajax Class Hierarchy

Hierarchy For Package com.prolixtech.jaminid_examples.ajax

Package Hierarchies:
All Packages

Class Hierarchy



jaminid-0.99a/doc/com/prolixtech/jaminid_examples/package-tree.html0000644000175000017500000001434210422252526024126 0ustar railrail com.prolixtech.jaminid_examples Class Hierarchy

Hierarchy For Package com.prolixtech.jaminid_examples

Package Hierarchies:
All Packages

Class Hierarchy



jaminid-0.99a/doc/doc/0000755000175000017500000000000011217365116013204 5ustar railrailjaminid-0.99a/doc/doc/index.html0000644000175000017500000003630110205154311015171 0ustar railrail jaminid (Java Mini Daemon) HOWTO FAQ
 

Frequently Asked Questions (FAQ)

General

1. If jaminid does not serve files, or have scripts, how can you serve active content through it?

jaminid works through demultiplexors of HTTP requests called ContentOracles - that extend the ContentOracle class. Content oracles by contract do one things: they produce the content as a regular java String.

2. How do I set up a Daemon and a ContentOracle for my Application?

Usually you will need to extend the ContentOracle class and override the demultiplex(..) function. A good, quick example is in the com.prolixtech.jaminid-example.HelloWorldServer class.

Here's a recap: Make a new class that will serve as your ContentOracle

	  public class HelloWorldServer extends ContentOracle {
		  // other functions you may use
		  public String demultiplex(Request connRequest, Response connResponse) {
		  	// here you can use the request object to view information about the request,
			// and optionally the reply object to inform the server of the response
			// (error codes, cookies, and more)
			
			return theWebPageInHTML; // a String you have assembled in the function
		  }
	  }
	  

Now, in your main class, start a Daemon using the ContentOracle you made:

		HelloWorldServer s = new HelloWorldServer();
      	Daemon myDaemon = new Daemon(PORT, s);
		// where PORT is the HTTP port (usually HTTP holds port 80)
	  

Note that Daemon runs as a thread, so your application will continue to run even after it finishes. Usually, daemons by definition keep running; if you need to close the daemon for some reason, call the tearDown() function.

3. Is this Daemon HTTP1.1 compliant?

Yes.

4. Who wrote this project?

Constantinos Michael wrote the initial project and is currently the project leader.

5. Why was this project written?

Because surprisingly, there was nothing out there that could perform these simple functions. You'll find Perl code to do what this project does, and you could actually also perform a system reminescent of the ContentOracle by using custom apache plugins.

This project was in essence written as part of a larger project - Project MuseBox, however I feel jaminid is good enough to release on its own.

6. What are some examples I can use jaminid for?

  • search engines
  • file sharing programs
  • internet jukebox players
  • remote administration tools
  • web servers
  • email / newsreaders
  • lightweight Web Services - infact, interprocess communication
  • database accessors

7. What does jaminid mean?

JAva MINI Daemon.

8. Can I use standard Java Servlets with jaminid?

Yes. See below, as well as Thin Client Interfaces, also below.

9. Did you use Servlets as a model when you were designing ContentOracles?

No. I had never used servlets before, but I've been using embedded HTTP servers for a long time. The fact that I arrived at a system that has similarities with Servlets is purely coincidental, as well as extremely practical. The servlet service method has the following signature:

public void service(ServletRequest req, ServletResponse res) ;  
The equivalent ContentOracle method has this signature:
public String demultiplex(Request connRequest, Response connResponse);

Why does the ContentOracle demultiplex method return a string? Because this way, you can nest ContentOracles inside other ContentOracles. So it can have a nice functional tree effect. Often times when you are making web applications you find yourself calling the same functions for different pages. Why not make pages contain other pages?

A bridging class would hold a Servlet instance, then convert Request and Response objects to ServletRequest and ServletResponse, and then have demultiplex call the servlet instance with the converts, and obtain and return the output string of ServletResponse. This is known as an Adapter Design Pattern.

Security

1. Are there any security issues with using this Daemon?

No. Remember, on its own, the daemon does not serve any files, nor even accesses the filesystem at all apart from configuration files. That is where the largest errors have been in other major web servers.

If a user needs to implement a file server running on this daemon, they must be careful to follow a few good ideas:

  • Try not to run as root on operating systems that have users and groups.
  • Make sure the Canonical filenames fall within the root paths allowed by your application - i.e. no symlinks are followed, and the "../.." trick is not used.
  • Whenever possible, just use a single directory for files and put everything in it. If for some reason you need to have such a large number of files that this becomes impractical, perhaps you should look into a traditional HTTP server.

2. Is HTTP authentication implemented?

No, it will be implemented very shortly however. It is very simple to do non-http authentication, and if you have a user authentication system already in place, it is very easy to use that instead.

3. Does jaminid support secure-HTTP?

No. There are plans to implement it in the future.

4. Can I block a particular IP from accessing the server?

Yes. Just check the IP field of the Request parameter in the demultiplex(..) function. If you don't like the IP that's making the request, just return an error message. You can always block all incoming connections using a firewall, or very simply, just block all IPs that are not 127.0.0.1 in the beginning of demultiplex(..).

 

Thin Client Interfaces

1. What other ways can I use to make thin-client interfaces? Does it have to be through HTTP?

In short, no. There are plenty of methods to make thin-client interfaces, but HTML/HTTP is the most commonly used method for the simple reason that there are browsers installed everywhere. You could always design your own methods. There is a growing tendency to design XML powered interfaces - the Mozilla project has developed a promising standard. However, jaminid is not concerned at all with XML or HTML - all it does is, it transfers HTTP data.

Theres a solution that is more standard than jaminid albeit only slightly harder to use - you can use servlets, and you can have the bonus feature of jaminid - the bundle in your application - by using an embedded server. You can use jaminid in fact as your embedded server if you write a (short and easy) class to bridge Servlets with ContentOracles. You can also use a more heavy weight server such as jetty - which at 350+K is about 10 times as big as jaminid but is still quite fast. Jetty might be more suitable if you want a server for multiple projects.

2. Why are thin-client interfaces good? Where are they useful?

For the majority of applications, they are suitable. They do not take more time to program than regular interfaces, and in fact, they can be cheaper to program - web designers can do it, it doesnt take programmers. Depending on what method is used, the interface is programmed independently of the rest of the application. (That is usually not true with ASP, JSP, and PHP, which infact do not discourage seperation of form and function, which is a major trap with traditional programming also.)

Furthermore, there is an added bonus: Added features can and will deploy seemlessly on their thin clients. You don't need to "download" new versions of your favorite websites to view the added features.

3. Why use jaminid instead of {PHP|ASP|JSP|...}?

  • Because you're a traditional programmer and this style of I/O appeals to you more.
  • Because you don't know the scripting language.
  • Because you don't want to have a third party server around.
  • Because you want to bundle the entire application together.
  • Because you'd like everything to be in Java.
  • Because you want to enforce seperation of content and function (this is a step, but not a guarantee)

4. Is there no templating system bundled with this at all?

No. Templates are subjective. There are a few options out there; I definetely reccomend the excellent HTML.Template.java, which is a java "port" of the HTML::Template.pm templating system from Perl. You define template files with placeholders that can be as complicated as tables of tables of tables (e.t.c.) and you pass the parameters you want put there in the form of a standard java Hashtable. It's fast and easy.

If you are obsessed with speed, perhaps you should not even use templates at all, or you should look into producing XSLT and XML pairs of files that burden the client with production instead of the server.

5. I'd like to built my own web server instead!

Sure. Building a web server is fun. The best page to start would be the HTTP Protocol Specification on W3 Consortium. If you think that is an overload of information for a starting developer, look at HTTP Made Really Easy.

My advice to you would be, study the protocol header transcripts - monitor port 80 on your computer as you use your browser. There are several ways to do this; you can use Mozilla with an http viewing plugin. Also you can use the Web Snifter page to do the whole thing online, if you dont have mozilla. Study a lot of the headers in different situations, where there are cookies, where there's authentication going on. If you like programming web servers also, you should work for this project!

If you just want a good server to put on your webpage, there's no doubt: Apache is the best, it's free, and the license is very flexible. If you're interested in running Java on your server, you can use either jaminid or Jetty to run servlets, Apache Jakarta Tomcat to run Servlets and JSP. Caucho Resin looks extremely promising also.

6. What's the difference between servlets and Java Server Pages (JSP)?

The essential difference is the style of programming. JSP is closer to ASP and PHP, where the logic and content lie on the same page. JSP is dynamically compiled to a servlet when it is run, so the performance is bounded by the same limitations. However, servlets tend to promote better programming disciplines, and tend to be cleaner, as they are programmed with a different attitude since integration of content and logic is not as straight forward. Both of these are usually harder to configure than jaminid.

There are plenty of resources available that cover this area; here's a good servlet starting point from Sun, and here's an over view of Java Server Pages (JSP).

 

Open Source

1. Can I contribute to this project?

Of course! That is the whole idea. Unfortunately I don't have time to perfect the Daemon, so any help I can get is valuable. If you see a bug you should immediately let me know, and if you can, fix it!

2. Can i get this released under a different license?

Depends. Ask me.

3. What are some things that need to be done with jaminid?

  • Servlet and even JSP integration as a plugin module.
  • Lots of testing.
  • Some cleaning up of the code.
  • Anything else you can think of.

 

SourceForge.net Logo Download jaminid on SourceForge.net

The project leader is Constantinos Michael.

This project is open source, released under the LGPL. If you need to use this project and would like to obtain it under a different license, please contact the administrators to ask for it.

 

jaminid-0.99a/doc/allclasses-noframe.html0000644000175000017500000000550110422252526017076 0ustar railrail All Classes All Classes
Client
Connection
ContentOracle
Daemon
HelloWorldServer
JavaLogger
MboxLogger
MusicStream
NullLogger
Protocol
ProtocolResponseHeader
Request
Response
SimpleAjaxServer
SimpleServer
SingleLineFormatter
SingletonLogger
StreamBundle
StreamingOracle
Suspender
jaminid-0.99a/doc/doc.html0000644000175000017500000001402510166321245014071 0ustar railrail
 

Frequently Asked Questions

1. If jaminid does not serve files, or have scripts, how can you serve active content through it?

jaminid works through demultiplexors of HTTP requests called ContentOracles - that extend the ContentOracle class. Content oracles by contract do one things: they produce the content as a regular java String.

2. How do I set up a Daemon and a ContentOracle for my Application?

Usually you will need to extend the ContentOracle class and override the demultiplex(..) function. A good, quick example is in the com.prolixtech.jaminid-example.HelloWorldServer class.

Here's a recap: Make a new class that will serve as your ContentOracle

	  public class HelloWorldServer extends ContentOracle {
		  // other functions you may use
		  public String demultiplex(Request connRequest, Response connResponse) {
		  	// here you can use the request object to view information about the request,
			// and optionally the reply object to inform the server of the response
			// (error codes, cookies, and more)
			
			return theWebPageInHTML; // a String you have assembled in the function
		  }
	  }
	  

Now, in your main class, start a Daemon using the ContentOracle you made:

		HelloWorldServer s = new HelloWorldServer();
      	Daemon myDaemon = new Daemon(PORT, s);
		// where PORT is the HTTP port (usually HTTP holds port 80)
	  

Note that Daemon runs as a thread, so your application will continue to run even after it finishes. Usually, daemons by definition keep running; if you need to close the daemon for some reason, call the tearDown() function.

3. Is this Daemon HTTP1.1 compliant?

Yes.

4. Are there any security issues with using this Daemon?

No. Remember, on its own, the daemon does not serve any files, nor even accesses the filesystem at all apart from configuration files. That is where the largest errors have been in other major web servers.

If a user needs to implement a file server running on this daemon, they must be careful to follow a few good ideas:

  • Try not to run as root on operating systems that have users and groups.
  • Make sure the Canonical filenames fall within the root paths allowed by your application - i.e. no symlinks are followed, and the "../.." trick is not used.
  • Whenever possible, just use a single directory for files and put everything in it. If for some reason you need to have such a large number of files that this becomes impractical, perhaps you should look into a traditional HTTP server.

5. Is HTTP authentication implemented?

No, it will be implemented very shortly however. It is very simple to do non-http authentication, and if you have a user authentication system already in place, it is very easy to use that instead.

6. Does jaminid support secure-HTTP?

No. There are plans to implement it in the future.

7. Who wrote this project?

Constantinos Michael wrote the initial project and is currently the project leader.

8. Why was this project written?

Because surprisingly, there was nothing out there that could perform these simple functions. You'll find Perl code to do what this project does, and you could actually also perform a system reminescent of the ContentOracle by using custom apache plugins.

This project was in essence written as part of a larger project - Project MuseBox, however it is good enough to release on its own.

9. What are some examples I can use jaminid for?

  • search engines
  • file sharing programs
  • internet jukebox players
  • remote administration tools
  • web servers
  • email / newsreaders
  • lightweight Web Services - infact, interprocess communication
  • database accessors

10. What does jaminid mean?

JAva MINI Daemon.

 

SourceForge.net Logo Download jaminid on SourceForge.net

The project leader is Constantinos Michael.

This project is open source, released under the LGPL. If you need to use this project and would like to obtain it under a different license, please contact the administrators to ask for it.

 

jaminid-0.99a/doc/stylesheet.css0000644000175000017500000000226210422252526015341 0ustar railrail/* Javadoc style sheet */ /* Define colors, fonts and other style attributes here to override the defaults */ /* Page background color */ body { background-color: #FFFFFF } /* Headings */ h1 { font-size: 145% } /* Table colors */ .TableHeadingColor { background: #CCCCFF } /* Dark mauve */ .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ .TableRowColor { background: #FFFFFF } /* White */ /* Font used in left-hand frame lists */ .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif } .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } /* Navigation bar fonts and colors */ .NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */ .NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */ .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} jaminid-0.99a/src/0000755000175000017500000000000011217365120012454 5ustar railrailjaminid-0.99a/src/com/0000755000175000017500000000000011217365120013232 5ustar railrailjaminid-0.99a/src/com/prolixtech/0000755000175000017500000000000011217365120015413 5ustar railrailjaminid-0.99a/src/com/prolixtech/utils/0000755000175000017500000000000011217365120016553 5ustar railrailjaminid-0.99a/src/com/prolixtech/utils/SingletonLogger.java0000644000175000017500000000147610166250235022532 0ustar railrailpackage com.prolixtech.utils; /** * This class provides a single logging utility used for debugging purposes. It * delegates most of its work to the java logging system, however it is made a * singleton here so that it can be used throughout the application. * * @author Constantinos Michael * * */ public class SingletonLogger extends NullLogger { private static MboxLogger inst = NullLogger.Instance(); private static boolean log; public static void setLog(boolean x){ if(log!=x){ if(x){ inst = JavaLogger.Instance(); } else { inst = NullLogger.Instance(); } } log=x; } public static MboxLogger Instance(){ return inst; } public SingletonLogger(){ // } }jaminid-0.99a/src/com/prolixtech/utils/NullLogger.java0000644000175000017500000000577310166250235021506 0ustar railrail/* * Created on Dec 24, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.utils; import java.util.logging.Level; import java.util.logging.Logger; import com.prolixtech.jaminid.Request; /** * @author Constantinos Michael * */ public class NullLogger extends Object implements MboxLogger { /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#baloon(java.lang.String, java.lang.String) */ public void baloon(String msg, String title) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#getLogger() */ public Logger getLogger() { // TODO Auto-generated method stub return null; } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#log(java.util.logging.Level, java.lang.String) */ public void log(Level vel, String msg) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#fine(java.lang.String) */ public void fine(String msg) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#severe(java.lang.String) */ public void severe(String msg) { System.out.println(msg); // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#warning(java.lang.String) */ public void warning(String msg) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#info(java.lang.String) */ public void info(String msg) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#sql(java.lang.String) */ public void sql(String msg) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#http(com.prolixtech.minihttp.Request, java.lang.String) */ public void http(Request req, String msg) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#disableBaloons() */ public void disableBaloons() { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#exception(java.util.logging.Level, java.lang.String, java.lang.Exception) */ public void exception(Level x, String msg, Exception e) { this.exception(msg,e); } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#exception(java.lang.String, java.lang.Exception) */ public void exception(String msg, Exception e) { System.out.println(msg); e.printStackTrace(); } /** * @return the a new instance of the logger. */ public static MboxLogger Instance() { // TODO Auto-generated method stub return new NullLogger(); } } jaminid-0.99a/src/com/prolixtech/utils/MboxLogger.java0000644000175000017500000000407410166250235021472 0ustar railrail/* * Created on Dec 24, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.utils; import java.util.logging.Level; import com.prolixtech.jaminid.Request; /** * @author Constantinos Michael * */ public interface MboxLogger { public void baloon(String msg, String title); /** * The main logging function is set by default to output to the console. If * we require better logging in the future, perhaps a number of streams will * be made. The default operation prints the last function called (gets it * through a stacktrace) the message, the time. * * @param vel * the level of the message to log. * @see java.util.logging.Level * @param msg * the message to log. */ public void log(Level vel, String msg); /* * The following specialized logging levels permit submission of messages * without importation of java.util.logging */public void fine(String msg); /** * Shortcut to submit a log message at the level SEVERE * * @param msg * the message to submit */ public void severe(String msg); /** * Shortcut to submit a log message at the level WARNING * * @param msg * the message to submit */ public void warning(String msg); /** * Shortcut to submit a log message at the level INFO * * @param msg * the message to submit */ public void info(String msg); /* * following are specialized levels that enable categorization into types of * messages. */public void sql(String msg); /** * Specialized submit for HTTP messages * * @param msg * the message to submit */ public void http(Request req, String msg); /** * */ public void disableBaloons(); public void exception(Level x, String msg, Exception e); public void exception(String msg, Exception e); }jaminid-0.99a/src/com/prolixtech/utils/JavaLogger.java0000644000175000017500000001131010166250235021435 0ustar railrailpackage com.prolixtech.utils; import java.util.logging.Formatter; import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.Logger; import com.prolixtech.jaminid.Request; /** * This class provides a single logging utility used for debugging purposes. It * delegates most of its work to the java logging system, however it is made a * singleton here so that it can be used throughout the application. * * @author Constantinos Michael * * */ public class JavaLogger implements MboxLogger { private Logger logger; private static JavaLogger theInstance; private Handler consoleLog = new java.util.logging.ConsoleHandler(); private boolean baloonsDisabled = false; /** * Pertains to the Singleton DESIGN PATTERN. * * @return the singleton instance */ public static MboxLogger Instance() { if (theInstance == null) theInstance = new JavaLogger(); return theInstance; } protected JavaLogger() { this.logger = Logger.getLogger("ProlixLogger"); logger.setLevel(Level.FINEST); logger.setUseParentHandlers(false); consoleLog.setLevel(Level.INFO); Formatter logFormat = new com.prolixtech.utils.SingleLineFormatter(); this.consoleLog.setFormatter(logFormat); logger.addHandler(consoleLog); logger.log(Level.INFO, "The Logger service has started"); } /** * For manual submission directly to the logger * * @return the logger of this singleton */ public Logger getLogger() { return logger; } /** * The main logging function is set by default to output to the console. If * we require better logging in the future, perhaps a number of streams will * be made. The default operation prints the last function called (gets it * through a stacktrace) the message, the time. * * @param vel * the level of the message to log. * @see java.util.logging.Level * @param msg * the message to log. */ public void log(Level vel, String msg) { StackTraceElement[] astrel = (new Throwable()).getStackTrace(); String callingClass = ""; for (int i = 0; i < astrel.length; i++) { StackTraceElement strel = astrel[i]; callingClass = (strel.getClassName()); if (!callingClass.endsWith(".SingletonLogger")) break; } callingClass = callingClass .substring(callingClass.lastIndexOf(".") + 1); logger.log(vel, "[" + callingClass + "] " + msg); } /* * The following specialized logging levels permit submission of messages * without importation of java.util.logging */ /** * Shortcut to submit a log message at the level FINE * * @param msg * the message to submit */ public void fine(String msg) { log(Level.FINE, msg); } /** * Shortcut to submit a log message at the level SEVERE * * @param msg * the message to submit */ public void severe(String msg) { log(Level.SEVERE, msg); } /** * Shortcut to submit a log message at the level WARNING * * @param msg * the message to submit */ public void warning(String msg) { log(Level.WARNING, msg); } /** * Shortcut to submit a log message at the level INFO * * @param msg * the message to submit */ public void info(String msg) { log(Level.INFO, msg); } /* * following are specialized levels that enable categorization into types of * messages. */ /** * Specialized submit for SQL messages * * @param msg * the message to submit */ public void sql(String msg) { log(Level.FINEST, "[SQL] " + msg); } /** * Specialized submit for HTTP messages * * @param msg * the message to submit */ public void http(Request req, String msg) { log(Level.INFO, "[HTTP " + req.getIPAddressString() + "]" + msg); } /** * */ public void disableBaloons() { this.baloonsDisabled = true; } public void exception(Level x, String msg, Exception e) { log(x, msg); e.printStackTrace(); } public void exception(String msg, Exception e) { this.exception(Level.WARNING, msg, e); } /* (non-Javadoc) * @see com.prolixtech.utils.MboxLogger#baloon(java.lang.String, java.lang.String) */ public void baloon(String msg, String title) { this.info(title + " : " + msg); } }jaminid-0.99a/src/com/prolixtech/utils/Suspender.java0000644000175000017500000000114410166250235021370 0ustar railrail/* * Created on Dec 18, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.utils; /** * @author Constantinos Michael * */ public class Suspender { public static void suspendSeconds(int seconds) { suspendMillis(seconds * 1000); } public static void suspendMillis(long milliseconds) { try { Thread.sleep(milliseconds); } catch (Exception e) { SingletonLogger.Instance().exception("SLEEPER UNABLE TO SLEEP", e); } } } jaminid-0.99a/src/com/prolixtech/utils/SingleLineFormatter.java0000644000175000017500000000072710166250235023343 0ustar railrailpackage com.prolixtech.utils; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.logging.LogRecord; public class SingleLineFormatter extends java.util.logging.SimpleFormatter { private DateFormat df = new SimpleDateFormat(); public String format(LogRecord record) { return "# " + (df.format(new java.util.Date(record.getMillis()))) + " [" + record.getLevel() + "] " + record.getMessage() + "\n"; } }jaminid-0.99a/src/com/prolixtech/jaminid/0000755000175000017500000000000011217365120017026 5ustar railrailjaminid-0.99a/src/com/prolixtech/jaminid/MusicStream.java0000644000175000017500000000112410166250235022125 0ustar railrail/* * Created on Nov 21, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.jaminid; /** * @author Constantinos Michael * */ public interface MusicStream { public byte[] readNext(int len); /** * @return the position of the stream */ public long getPos(); public Object clone(); /** * @param streamInterval * @return the a stream segment */ public int getByteSizeForTime(int streamInterval); /** * @param filePath */ }jaminid-0.99a/src/com/prolixtech/jaminid/ContentOracle.java0000644000175000017500000000656310415762533022453 0ustar railrailpackage com.prolixtech.jaminid; import java.util.Iterator; import java.util.Map; /** * The content oracle is a very special class. It completely allows us to * delegate the computation of * * @author Constantinos Michael * * * * TODO */ public class ContentOracle { protected static ContentOracle theInstance; /** * pertains to the singleton DESIGN PATTERN * * @return ContentOracle */ public static ContentOracle Instance() { if (theInstance == null) theInstance = new ContentOracle(); return theInstance; } /** * the main function of the oracle, is to demux the request and produce an * output that is relative to the request. * * in this example, it is a static HTML, that is all we care about for now. * * @param connRequest * @param connResponse * @return the output */ public String demultiplex(Request connRequest, Response connResponse) { StringBuffer HTML = new StringBuffer(); HTML.append(""); HTML.append("

Testing Handler Page

"); HTML.append("

What is this?

"); HTML.append("This is a hard-coded test page produced by the " + this.getClass().toString() + " handler class."); HTML.append("

Why is this?

"); HTML .append("Either you are testing a new mserve based applet, or something has gone terribly wrong. This class is supposed to be extended and overriden by content specific classes."); HTML.append("

Here is some information:

"); HTML .append("" + "" + "" + "" + ""); Map params = connRequest.getParamMap(); HTML.append(""); HTML.append("
URI " + connRequest.getURI() + "
Message " + connRequest.getMessage() + "
Body " + connRequest.getBody() + "
POST Form: " + "

First:
Last:
" + "
Parameters: "); if (params.size() > 0) { HTML.append(""); Iterator iter = params.keySet().iterator(); while (iter.hasNext()) { Object key = iter.next(); HTML.append(""); } HTML.append("
" + key + " " + params.get(key) + "
"); } else { HTML.append("No parameters."); } HTML.append("
"); HTML.append("

" + connRequest.getDaemon()); return HTML.toString(); } /** * @return the oracle that will handle the request */ public ContentOracle getDelegatedOracle(Request serviceRequest) { // TODO Auto-generated method stub return this; } }jaminid-0.99a/src/com/prolixtech/jaminid/StreamingOracle.java0000644000175000017500000000423710166250235022760 0ustar railrail/* * Created on Nov 13, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.jaminid; import java.util.HashMap; /** * @author Constantinos Michael * */ public class StreamingOracle extends ContentOracle { // IdentityHashMap streams = new IdentityHashMap(); HashMap streamspaths = new HashMap(); public static final String PATH_START = "/streams/"; static StreamingOracle theInstanceSO = new StreamingOracle(); public StreamingOracle() { // do nothing } public String publishStream(StreamBundle a, String path) { String fullpath = PATH_START + path; a.setFullPath(fullpath); streamspaths.put(fullpath, a); return fullpath; } public static ContentOracle Instance() { return theInstanceSO; } public String demultiplex(Request cReqL, Response cRepL) { StreamBundle streams = streamspaths.get(cReqL .getLocation()); if (streams != null) { MusicStream stream = streams.getStream(cReqL); cRepL.setHeaderLine(ProtocolResponseHeader.Content_Type, "audio/mpeg"); cRepL.setHeaderLine(ProtocolResponseHeader.Icy_MetaData, "-1"); return null; } return "Streaming Error: Not Found"; } public int getStreamInterval() { return 3000; } public byte[] getNextBatch(Request cReqL, Response cRepL) { StreamBundle streams = streamspaths.get(cReqL .getLocation()); if (streams != null) { MusicStream stream = streams.getStream(cReqL); if (stream != null) { System.out.println("Sending next batch to " + cReqL + " at " + stream.getPos()); int bytesToRead = stream.getByteSizeForTime(this .getStreamInterval()); System.out.println("will return " + bytesToRead); return stream.readNext(bytesToRead); } return null; } return null; } }jaminid-0.99a/src/com/prolixtech/jaminid/Request.java0000644000175000017500000002712210166250235021327 0ustar railrailpackage com.prolixtech.jaminid; import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; import com.prolixtech.utils.SingletonLogger; /** * The request class encapsulates an HTTP request. It is responsible for * splitting up the query, processing POST forms, splitting to URI and URL, and * once it is created, it is essentially a data struct for all this information. * * @author Constantinos Michael * * * * TODO */ public class Request { private StringBuffer requestMessageBuffer = new StringBuffer(); private StringBuffer requestBody = new StringBuffer(); private String paramString; private String HTTPMethod; private String requestURI; private Connection conn; private Daemon masterDaemon; private Protocol protocol; private String requestLocation; private boolean isbad = false; private static int STATUS_WAITING_FOR_METHOD = 0; private static int STATUS_WAITING_FOR_PARAMS = 1; private static int STATUS_WAITING_FOR_BODY = 2; private static int STATUS_COMPLETE = 3; private static int STATUS_MALFORMED = -1; private int currentStatus = 0; private Map activeHeader = new HashMap(); private Map paramMap = new HashMap(); /** * @return if the request was malformed */ public boolean isRequestBad() { return isbad; } private int getStatus() { return currentStatus; } /** * Returns the Uniform Resource Identifier * * @return the URI Uniform Resource Identifier */ public String getURI() { return this.requestURI; } /** * Returns the entire request message * * @return the entire request message */ public String getMessage() { return this.requestMessageBuffer.toString(); } /** * Used in POST to return the body of the request * * @return the body of the request (useful in POST) */ public String getBody() { return this.requestBody.toString(); } /** * Returns the master daemon * * @return the master daemon where this request was spawned */ public Daemon getDaemon() { return this.masterDaemon; } /** * Returns header * * @return the header of this request */ public Map getHeader() { return this.activeHeader; } /** * * @return a param map of the request (like Perl) */ public Map getParamMap() { return this.paramMap; } /** * Return the location sought * * @return the location sought (URL) */ public String getLocation() { return this.requestLocation; } /** * * @param methodLine the method line of the request */ public void setMethodLine(String methodLine) { try { String firstLine = methodLine.trim(); this.HTTPMethod = firstLine.substring(0, firstLine.indexOf(" ")); this.requestURI = (firstLine.substring(firstLine.indexOf(" "), firstLine.lastIndexOf("HTTP/"))).trim(); int splitLocation = this.requestURI.indexOf("?"); if (splitLocation > 0) { this.paramString = requestURI.substring(splitLocation + 1); // (paramString); this.requestLocation = requestURI.substring(0, splitLocation); // (this.requestLocation); this.processParamString(paramString); } else { this.requestLocation = this.requestURI; } } catch (Exception e) { this.isbad = true; this.currentStatus = Request.STATUS_MALFORMED; return; } } /** * appends more stuff to body of request * @param body what to append */ public void appendToBody(String body) { this.requestBody.append(body); } /** * Method Adds Request Lines * * @param requestMessage * the message to add */ public void addRequestLines(String requestMessage) { if (this.currentStatus == Request.STATUS_COMPLETE) { return; } if (this.currentStatus == Request.STATUS_MALFORMED) return; this.requestMessageBuffer.append(requestMessage); int bodyIndex = requestMessage.indexOf("\r\n\r\n"); String reqBody = ""; /* * if(bodyIndex>0){ reqBody = requestMessage.substring(bodyIndex+4); * requestMessage = requestMessage.substring(0, bodyIndex); } */ StringTokenizer tokenizer = new java.util.StringTokenizer( requestMessage, "\n\r"); if (this.currentStatus == Request.STATUS_WAITING_FOR_METHOD) { currentStatus = Request.STATUS_WAITING_FOR_PARAMS; setMethodLine(tokenizer.nextToken()); // process first line } if (this.currentStatus == Request.STATUS_WAITING_FOR_PARAMS) { while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); int splitLocation = token.indexOf(":"); if (splitLocation > 0) { String key = (token.substring(0, splitLocation)).trim(); String value = (token.substring(splitLocation + 1)).trim(); masterDaemon.printlog("KEY [" + key + "] VAL [" + value + "]"); this.activeHeader.put(key, value); } else { // "Not a keyval pair: " + token; } } } if (this.currentStatus == Request.STATUS_WAITING_FOR_BODY) { reqBody = requestMessage; } if (bodyIndex > 0) { this.currentStatus = Request.STATUS_WAITING_FOR_BODY; } if (this.currentStatus == Request.STATUS_WAITING_FOR_BODY) { this.appendToBody(reqBody); } masterDaemon.printlog("[**] METHOD: " + this.HTTPMethod); masterDaemon.printlog("[**] URI: " + this.requestURI); int lastDotLoc = requestURI.lastIndexOf("."); if (lastDotLoc != -1) { masterDaemon.printlog("[**] TYPE: " + Protocol.getMIME(requestURI.substring(lastDotLoc))); } masterDaemon.printlog("[**] BODY: " + requestBody); } /** * * @return the ip address of the request */ public String getIPAddressString(){ return conn.getIPAddressString(); } /** * Creates a new request object * * @param activeDaemon * the daemon that spawned the request * @param connx the connection that produced this request */ public Request(Daemon activeDaemon, Connection connx) { this.conn = connx; this.masterDaemon = activeDaemon; protocol = this.masterDaemon.getProtocol(); } /** * processes a parameter string for HTTP query ? parameters * * @param paramStringL */ private void processParamString(String paramStringL) { try { String cookie = (String) this.getHeader().get("Cookie"); if (cookie != null) { String cookieparts[] = cookie.split(";"); for (int i = 0; i < cookieparts.length; i++) { cookieparts[i] = cookieparts[i].trim(); if (cookieparts[i].indexOf("=") > 0) { String valuepair[] = cookieparts[i].split("="); if (valuepair.length == 2) { this.paramMap.put(valuepair[0].trim(), valuepair[1] .trim()); } } } } } catch (Exception e) { SingletonLogger.Instance().http(this, "Error processing cookie" + e); e.printStackTrace(); } String[] comps = paramStringL.split("&"); for (int i = 0; i < comps.length; i++) { int equalsLoc = comps[i].indexOf("="); if (equalsLoc > 0) { this.paramMap.put(comps[i].substring(0, equalsLoc), unEscape(comps[i].substring(equalsLoc + 1))); } else { this.paramMap.put(comps[i], ""); } } } /** * removes the HTTP escape sequence for the query (e.g. %20 and $) * * @param s the string to unescape * @return the unescaped string */ private String unEscape(String s) { if (s == null || s.equals("")) return ""; int lastIndex = -1; do { lastIndex = s.indexOf('%', lastIndex + 1); if (lastIndex >= 0) { try { String hex = s.substring(lastIndex + 1, lastIndex + 3); char hin = (char) hex2int(hex); System.out.println(lastIndex + " Hex is " + hex + " or " + hin); String sBefore = s.substring(0, lastIndex); String sAfter = s.substring(lastIndex + 3); s = sBefore + hin + sAfter; } catch (Exception e) { SingletonLogger.Instance().exception("Escaping Error", e); } } } while (lastIndex >= 0); s = s.replaceAll("\\+", " "); return s; } /** * convenience function for converting hex to int * * @param x the String to convert * @return the converted string */ private static int hex2int(String x) { char cha = x.charAt(0); char chb = x.charAt(1); return hex2int(chb) + hex2int(cha) * 16; } /** * convenience function for converting hex to int * * @param a the character to convert * @return the converted character */ private static int hex2int(char a) { if (Character.isDigit(a)) { return Integer.parseInt(String.valueOf(a)); } a = Character.toUpperCase(a); if (a >= 'A' && a <= 'F') { return a - 'A' + 10; } throw new IllegalArgumentException("Invalid Hex"); } protected int switchToBody() { if (this.HTTPMethod.equals("POST")) { try { // System.out.println("Switching to body"); int returnable = 0;// Integer.parseInt(this.paramMap.get("Content-Length").toString()); this.currentStatus = Request.STATUS_WAITING_FOR_BODY; return returnable; } catch (Exception e) { System.out.println("ABORTED to body"); e.printStackTrace(); } } this.currentStatus = Request.STATUS_COMPLETE; return 0; } protected void switchToCompleted() { if (this.HTTPMethod.equals("POST")) { this.processParamString(this.requestBody.toString()); } } /** * * @return the param string */ public String getParamString() { return this.paramString; } public String getParam(String key){ String n = this.paramMap.get(key); if(n==null) return ""; return n; } public String getParamOrNull(String key){ String n = this.paramMap.get(key); return n; } public boolean checkParam(String param, String possvalue) { if (param == null) return false; if (getParamMap().get(param) == null) return false; return (getParamMap().get(param)).equals(possvalue); } }jaminid-0.99a/src/com/prolixtech/jaminid/StreamBundle.java0000644000175000017500000000070110166250235022256 0ustar railrail/* * Created on Nov 21, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.jaminid; /** * @author Constantinos Michael * */ public interface StreamBundle { public MusicStream getStream(Request req); public void disbandStream(Request req); /** * @param fullpath */ public void setFullPath(String fullpath); }jaminid-0.99a/src/com/prolixtech/jaminid/Connection.java0000644000175000017500000002215510166250235021777 0ustar railrailpackage com.prolixtech.jaminid; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.InetAddress; import java.net.Socket; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.Timer; import java.util.TimerTask; import com.prolixtech.utils.SingletonLogger; import com.prolixtech.utils.Suspender; /** * The connection is a thread-of-service spanwed by the Daemon. The connection * handles the IO part of the Response/Oracle/Request paradigm by creating the * request and response objects, and calling the Oracle at the appropriate time * to extract the output which will be send to the client. * * @author Constantinos Michael * * * * TODO */ public class Connection extends Thread { private Socket activeSocket; private Daemon masterDaemon; private InputStream socketInput; private OutputStream socketOutput; private static SimpleDateFormat GMTDateFormatter = new java.text.SimpleDateFormat( "d MMM yyyy hh:mm:ss z", Locale.US); private boolean isalive = true; private static final long lineTimeout = 5000L; private static final long lineCheckInterval = 100L; /** * default constructor to create a Connection * * @param activeSocket * the socket on which the connection was madee * @param masterDaemon * the daemon that spanwed this connection * @throws IOException */ public Connection(Socket activeSocket, Daemon masterDaemon) throws IOException { this.activeSocket = activeSocket; this.masterDaemon = masterDaemon; InetAddress ina = activeSocket.getInetAddress(); this.setName("CN " + ina); SingletonLogger.Instance().fine("Connection from " + ina); socketInput = activeSocket.getInputStream(); socketOutput = activeSocket.getOutputStream(); start(); } public String getIPAddressString(){ return this.activeSocket.getInetAddress().toString(); } /** * The thread runs here. This essentially allows the Daemon to serve * multiple threads. ALL IO is carried out here. */ public void run() { try { printlog("Processing Connection."); CONNECTED: while(true){ StringBuffer requestInputBuffer = new StringBuffer(); int byteIn = -1; int CRLFState = 0; boolean doubleCRLFpassed = false; Request serviceRequest = new Request(masterDaemon, this); int expectedBodySize = 0; int bodyCharsParsed = 0; INPUTLOOP: do { if(socketInput.available()==0){ Timer a = new Timer(); ExpireTask timerTask = new ExpireTask(); a.schedule(timerTask, lineTimeout); while(timerTask.running){ if(socketInput.available()>0) timerTask.running=false; Suspender.suspendMillis(lineCheckInterval); } if(socketInput.available()==0){break INPUTLOOP;} } byteIn = socketInput.read(); if (byteIn > 0) { requestInputBuffer.append((char) byteIn); if (doubleCRLFpassed) bodyCharsParsed++; // LINEAR CRLF State Detection // case 0: none. // case 1: \r // case 2: \r\n // case 3: \r\n\r // case 4: \r\n\r\n char thischar = ((char) byteIn); switch (CRLFState) { case 0: if ("\r".charAt(0) == (thischar)) { CRLFState++; } break; case 1: if ("\n".charAt(0) == (thischar)) { CRLFState++; } else { CRLFState = 0; } break; case 2: if ("\r".charAt(0) == (thischar)) { CRLFState++; } else { CRLFState = 0; } break; case 3: if ("\n".charAt(0) == (thischar)) { CRLFState++; doubleCRLFpassed = true; serviceRequest.addRequestLines(requestInputBuffer .toString()); requestInputBuffer = new StringBuffer(); expectedBodySize = serviceRequest.switchToBody(); } else { CRLFState = 0; } break; } } // System.out.println(doubleCRLFpassed + " B/E: " + // bodyCharsParsed + " : " + expectedBodySize); // && byteIn!=-1 && socketInput.available()>0 } while (!doubleCRLFpassed || doubleCRLFpassed && bodyCharsParsed < expectedBodySize || doubleCRLFpassed && byteIn != -1 && socketInput.available() > 0); printlog("Request: " + requestInputBuffer.toString()); serviceRequest.addRequestLines(requestInputBuffer.toString()); serviceRequest.switchToCompleted(); Response serviceResponse = new Response(Protocol.OK, masterDaemon .getProtocol(), this.socketOutput, serviceRequest); serviceResponse.setHeaderLine(ProtocolResponseHeader.Content_Type, "text/html"); serviceResponse.setHeaderLine(ProtocolResponseHeader.Date, getGMTString(new Date())); ContentOracle chout = masterDaemon.getOracle(); String oracleOutput = null; chout = chout.getDelegatedOracle(serviceRequest); try { oracleOutput = chout.demultiplex(serviceRequest, serviceResponse); } catch (Exception e) { SingletonLogger.Instance().severe("User Oracle FAILED"); e.printStackTrace(); if (chout != ContentOracle.Instance()) { try { oracleOutput = ContentOracle.Instance().demultiplex( serviceRequest, serviceResponse); } catch (Exception f) { f.printStackTrace(); SingletonLogger.Instance().severe( "Fallback Oracle FAILED"); } } } serviceResponse.publishHeader(); if (chout instanceof StreamingOracle) { StreamingOracle shout = (StreamingOracle) chout; while (isalive) { Suspender.suspendMillis(shout.getStreamInterval()); this.sendString(shout.getNextBatch(serviceRequest, serviceResponse)); } } else { this.sendString(oracleOutput); } socketOutput.flush(); if( ((String) serviceRequest.getHeader().get(ProtocolResponseHeader.Connection)).equalsIgnoreCase("Close") ){ serviceResponse.setHeaderLine(ProtocolResponseHeader.Connection, "close"); socketOutput.close(); printlog("Connection Done."); break CONNECTED; } } } catch (Exception e) { printlog("Exception: " + e); } finally { try { activeSocket.close(); } catch (Exception e) { System.err.println("Socket not closed"); } } } /** * a shortcut method * * @param message * the message to print */ private void printlog(String message) { masterDaemon.printlog("[" + activeSocket.getInetAddress() + "] " + message); } /** * Sends a string to the client * * @param string * @throws IOException */ protected void sendString(Object string) throws IOException { if (string == null) return; socketOutput.write((string.toString()).getBytes()); } protected void sendString(byte[] bytes) { try { socketOutput.write(bytes); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); this.isalive = false; } } public static String getGMTString(Date d) { return Connection.GMTDateFormatter.format(d); } } class ExpireTask extends TimerTask { boolean running = true; public void run() { running = false; } } jaminid-0.99a/src/com/prolixtech/jaminid/Client.java0000644000175000017500000000146610166250235021120 0ustar railrail/* * Created on Nov 27, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.jaminid; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; /** * @author Constantinos Michael * */ public class Client { public Client() { // do nothing } public String getContent(String ip, int port, String location) { Socket MyClient; try { MyClient = new Socket(); MyClient.connect(new InetSocketAddress(ip, port)); } catch (IOException e) { System.out.println(e); } return null; } public String getContent(String ip, int port, Request serviceRequest) { return null; } }jaminid-0.99a/src/com/prolixtech/jaminid/ProtocolResponseHeader.java0000644000175000017500000000303710166250235024327 0ustar railrail/* * Created on Jan 3, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.jaminid; /** * @author Constantinos Michael * */ public enum ProtocolResponseHeader { Age , Location, Server, Vary, Connection, Date, Accept_Ranges {public String toString(){return "Accept-Ranges";}}, Proxy_Authenticate {public String toString(){return "Proxy-Authenticate";}}, Retry_After {public String toString(){return "Retry-After";}}, WWW_Authenticate {public String toString(){return "WWW-Authenticate";}}, Set_Cookie {public String toString(){return "Set-Cookie";}}, // HEADER ENTITY STRINGS Allow, Expires, ETag, Content_Type {public String toString(){return "Content-Type";}}, Content_Encoding {public String toString(){return "Content-Encoding";}}, Content_Language {public String toString(){return "Content-Language";}}, Content_Length {public String toString(){return "Content-Length";}}, Content_Location {public String toString(){return "Content-Location";}}, Content_MD5 {public String toString(){return "Content-MD5";}}, Content_Range {public String toString(){return "Content-Range";}}, Last_Modified {public String toString(){return "Last-Modified";}}, Icy_MetaData {public String toString(){return "Icy-MetaData";}}, } jaminid-0.99a/src/com/prolixtech/jaminid/Response.java0000644000175000017500000001241410166312017021470 0ustar railrailpackage com.prolixtech.jaminid; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.Date; import java.util.Map; /** * The response class encapsulates an HTTP response. It contains the response * data (headers, etc) as well as functions to publish cookies, send files, etc. * * @author Constantinos Michael * * * * TODO */ public class Response { private String statusLine; private Protocol protocol; private OutputStream out; private Request masterRequest; private boolean headerPublished; private Map activeHeader = new java.util.HashMap(); public Response(int statusCode, Protocol protocol, OutputStream out, Request masterRequest) { this.masterRequest = masterRequest; this.out = out; this.protocol = protocol; String statusDescription = Protocol.getHeaderResponseStatus(statusCode); if (statusDescription == null) statusCode = Protocol.INTERNAL_SERVER_ERROR; statusLine = Protocol.HTTP_VERSION + " " + statusCode + " " + Protocol.getHeaderResponseStatus(statusCode); } /** * sets the status of the response to a certain HTTP status code * * @param statusCode * the code to set the status to */ public void setStatus(int statusCode) { if (Protocol.getHeaderResponseStatus(statusCode) != null) { statusLine = Protocol.HTTP_VERSION + " " + statusCode + " " + Protocol.getHeaderResponseStatus(statusCode); } else { throw new java.lang.IllegalArgumentException("No such status code"); } } /** * sets a fifteen day cookie * * @param name * the field name * @param value * the field value */ public void sendCookie15DG(String name, String value) { // public void setCookie(String name, String value, String path, // java.util.Date expires){ Date d15G = new Date(System.currentTimeMillis() + 15 * 24 * 60 * 60 * 1000); setCookie(name, value, "/", d15G); } /** * sets a cookie * * @param name * the field name * @param value * the field vaLUE * @param path * the relevant path * @param expires * the cookie activation day */ public void setCookie(String name, String value, String path, java.util.Date expires) { // "Set-Cookie:" String cookieVal = name + "=" + value + "; expires=" + Connection.getGMTString(expires) + ";path=" + path + ";"; // domain=DOMAIN_NAME; // secure this.setHeaderLine(ProtocolResponseHeader.Set_Cookie, cookieVal); } /** * Sends the header to the client. After this, no more headers can be set, * no more cookies can be send * * @throws IOException */ public void publishHeader() throws IOException { if (headerPublished) return; out.write(statusLine.getBytes()); for(String x : activeHeader.keySet()){ out.write(this.CRLF()); out.write(x.getBytes()); out.write(':'); out.write(' '); out.write((activeHeader.get(x)).getBytes()); } out.write(this.CRLF()); out.write(this.CRLF()); this.headerPublished = true; } /** * sets one particular header line * * @param header * @param value */ public void setHeaderLine(ProtocolResponseHeader header, String value) { activeHeader.put(header.toString(), value); } public byte[] CRLF() { return "\r\n".getBytes(); } /** * sends a file to the client. Sets the MIME type accordingly * * @param cFile * the file to send * * @throws IOException */ public void sendFile(File cFile) throws Exception { String lastModifiedGMT = Connection.getGMTString(new Date(cFile .lastModified())); String modifiedCondition = (String) this.masterRequest.getHeader().get( Protocol.HQ_IFMODSINCE); if (lastModifiedGMT.equals(modifiedCondition)) { setStatus(Protocol.NOT_MODIFIED); setHeaderLine(ProtocolResponseHeader.Content_Length, "0"); } else { String canonFile = cFile.getCanonicalPath(); String fileExt = canonFile.substring(canonFile.lastIndexOf(".")); String type = Protocol.getMIME(fileExt); setHeaderLine(ProtocolResponseHeader.Content_Type, type); setHeaderLine(ProtocolResponseHeader.Content_Length, "" + cFile.length()); setHeaderLine(ProtocolResponseHeader.Last_Modified, lastModifiedGMT); publishHeader(); java.io.BufferedInputStream bfin = new java.io.BufferedInputStream( new java.io.FileInputStream(cFile)); int in; byte[] bin = new byte[4096]; while (true) { int bytesRead = bfin.read(bin); if (bytesRead < 0) break; out.write(bin, 0, bytesRead); } } } }jaminid-0.99a/src/com/prolixtech/jaminid/Daemon.java0000644000175000017500000001313610446127215021104 0ustar railrailpackage com.prolixtech.jaminid; import java.io.IOException; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import com.prolixtech.utils.SingletonLogger; import com.prolixtech.utils.Suspender; /** * As in most HTTP implementations, the Daemon opens a port, listens for * incoming connections, and then spawns the connections to serve that * connection. Sometimes this is called the server, we already have plenty of * things in the works that will be called servers, so we're going for the what * was the original name of the process before Marketting got to it. * * We're going for a no frills implementation that handles all the law level * stuff and delegates the production of content to what we call a * ContentOracle. This is a nice clean design that makes this code reusable. * * On the subject of why an HTTP server vs a JSP implementation, we find this to * be a better approach. Less messy, makes the whole thing easier to install, * more controllable, faster - this is no frills. The code is centralized, * almost all of it in the server itself. * * @author Constantinos Michael * @changes * 24.05.06 - Marco Strack added constructor to reflect socket binding arguments * * * * TODO */ public class Daemon extends Thread { private int serverPort; private ServerSocket serverSocket; private Protocol activeProtocol = Protocol.Instance(); private ContentOracle contentOracle; public static final String VERSION = "0.99.1"; private boolean RUNNING = false; /** * Queue Length * */ private int backLog; /** * The InetAddress; useful for opening on particular interfaces */ private InetAddress adr; /* some accessor fields */ /** * returns the server port * * @return the server port */ public int getServerPort() { return this.serverPort; } /** * * @return the protocol instance */ public Protocol getProtocol() { return this.activeProtocol; } /** * * @return the oracle instance */ public ContentOracle getOracle() { return contentOracle; } /** * creates a new daemon and opens on specific port * * @param serverPort * the port to open on * @param cOra * the content oracle to use */ public Daemon(int serverPort, ContentOracle cOra) { //calling with default values this(serverPort,50,null,cOra); } /** * creates a new daemon and opens on specific port * * @param serverPort * the port to open on * @param backLog * maximum queue length. more concurrent connections will be * rejected. default: 50 * @param adr * the address to bind to. null means any address found. * @param cOra * the content oracle to use */ public Daemon(int serverPort, int backLog, InetAddress adr, ContentOracle cOra) { super(); this.setName("HTTP Daemon on " + this.serverPort); if (cOra == null) { this.printlog("USING STANDARD CONTENTORACLE"); contentOracle = ContentOracle.Instance(); } else { contentOracle = cOra; } printlog("Web Server Started, Logger Connected. Using: " + cOra.getClass()); this.serverPort = serverPort; this.backLog = backLog; this.adr = adr; try { serverSocket = new ServerSocket(serverPort,backLog,adr); RUNNING = true; super.start(); } catch (Exception e) { SingletonLogger.Instance().severe("A major error has occured: " + e); SingletonLogger.Instance().severe("Perhaps I could not bind port " + serverPort + ". Exiting."); serverSocket = null; } } /** * Handles listening for new connections and launching client threads * * */ public void run() { super.run(); try { try { while (RUNNING) { Socket socket = serverSocket.accept(); try { printlog("Accepted Socket: " + socket); new Connection(socket, this); } catch (IOException e) { socket.close(); } } } finally { serverSocket.close(); } } catch (Exception e) { this.printlog("A major error has occured\n" + e); System.exit(-1); } } public String toString() { return ("mserve HTTPD daemon (" + this.getClass() + ") version " + VERSION + " running on port " + this.serverPort + "."); } public static void main(String args[]) { Daemon testServer = new Daemon(80, StreamingOracle.Instance()); } public void printlog(String message) { SingletonLogger.Instance().fine(message); } /** * * @return true if the server is up */ public boolean isRunning() { return this.RUNNING; } /** * tears down server * */ public void tearDown() { RUNNING = false; } /** * Tears down server and waits for it to tear down * */ public void tearDownAndWait() { this.tearDown(); while (RUNNING) { Suspender.suspendSeconds(1); } // TODO add error throw on time out } }jaminid-0.99a/src/com/prolixtech/jaminid/Protocol.java0000644000175000017500000002342110166250235021476 0ustar railrailpackage com.prolixtech.jaminid; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.HashMap; import java.util.InvalidPropertiesFormatException; import java.util.Properties; /** * This class captures the essential messages in the HTTP protocol. It behaves * as a singleton. * * @author Constantinos Michael * */ public class Protocol { public static final String MIMEFILE = "config/MIME.XML"; public static final String HTTP_VERSION = "HTTP/1.1"; public static final int CONTINUE = 100; public static final int SWITCHING = 101; public static final int OK = 200; public static final int CREATED = 201; public static final int ACCEPTED = 202; public static final int PROVISIONAL_INFORMATION = 203; public static final int NO_CONTENT = 204; public static final int RESET_CONTENT = 205; public static final int PARTIAL_CONTENT = 206; public static final int MULTIPLE_CHOICE = 300; public static final int MOVED_PERMANENTLY = 301; public static final int MOVED_TEMPORARILY = 302; public static final int SEE_OTHER = 303; public static final int NOT_MODIFIED = 304; public static final int USE_PROXY = 305; public static final int BAD_REQUEST = 400; public static final int UNAUTHORIZED = 401; public static final int PAYMENT_REQUIRED = 402; public static final int FORBIDDEN = 403; public static final int NOT_FOUND = 404; public static final int NOT_ALLOWED = 405; public static final int NONE_ACCEPTABLE = 406; public static final int PROXY_AUTH_REQUIRED = 407; public static final int REQUEST_TIMEOUT = 408; public static final int CONFLICT = 409; public static final int GONE = 410; public static final int LENGTH_REQUIRED = 411; public static final int PRECONDITION_FAILED = 412; public static final int REQUEST_ENTITY_TOO_LARGE = 413; public static final int REQUEST_URI_TOO_LONG = 414; public static final int UNSUPPORTED_MEDIA_TYPE = 415; public static final int REQUESTED_RANGE_NOT_SATISFIABLE = 416; public static final int EXPECTATION_FAILED = 417; public static final int INTERNAL_SERVER_ERROR = 500; public static final int NOT_IMPLEMENTED = 501; public static final int BAD_GATEWAY = 502; public static final int SERVICE_UNAVAILABLE = 503; public static final int GATEWAY_TIMEOUT = 504; public static final int HTTP_VERSION_NOT_SUPPORTED = 505; // HEADER REQUEST STRINGS public static final String HQ_IFMODSINCE = "If-Modified-Since"; // HEADER RESPONSE STRINGS private static Properties MIME = new Properties(); private static HashMap headerRequest = new HashMap(); private static HashMap headerResponseStatus = new HashMap(); private static HashMap headerResponse = new HashMap(); private static HashMap headerEntity = new HashMap(); private static HashMap requestMethod = new HashMap(); private static Protocol theInstance; public static Protocol Instance() { if (theInstance == null) theInstance = new Protocol(); return theInstance; } /** * initiates our definition of HTTP * */ private Protocol() { File mf = new File(MIMEFILE); if(mf.exists()==false) { makeNewMIME(); } else { try { MIME.loadFromXML(new FileInputStream(mf)); } catch (InvalidPropertiesFormatException e) { makeNewMIME(); } catch (FileNotFoundException e) { makeNewMIME(); } catch (IOException e) { e.printStackTrace(); } } requestMethod.put("OPTIONS", false); requestMethod.put("GET", true); requestMethod.put("HEAD", false); requestMethod.put("POST", true); requestMethod.put("PUT", false); requestMethod.put("DELETE", false); requestMethod.put("TRACE", false); requestMethod.put("CONNECT", false); headerRequest.put("Accept", true); headerRequest.put("Accept-Charset", true); headerRequest.put("Accept-Encoding", true); headerRequest.put("Accept-Language", true); headerRequest.put("Authorization", true); headerRequest.put("Expect", true); headerRequest.put("From", true); headerRequest.put("Host", true); headerRequest.put("If-Match", true); headerRequest.put("If-Modified-Since", true); headerRequest.put("If-None-Match", true); headerRequest.put("If-Range", true); headerRequest.put("If-Unmodified-Since", true); headerRequest.put("Max-Forwards", true); headerRequest.put("Proxy-Authorization", true); headerRequest.put("Range", true); headerRequest.put("Referer", true); headerRequest.put("TE", true); headerRequest.put("User-Agent", true); headerRequest.put("Cookie", true); headerResponseStatus.put("100", "Continue"); headerResponseStatus.put("101", "Switching Protocols"); headerResponseStatus.put("200", "OK"); headerResponseStatus.put("201", "Created"); headerResponseStatus.put("202", "Accepted"); headerResponseStatus.put("203", "Non-Authoritative Information"); headerResponseStatus.put("204", "No Content"); headerResponseStatus.put("205", "Reset Content"); headerResponseStatus.put("206", "Partial Content"); headerResponseStatus.put("300", "Multiple Choices"); headerResponseStatus.put("301", "Moved Permanently"); headerResponseStatus.put("302", "Found"); headerResponseStatus.put("303", "See Other"); headerResponseStatus.put("304", "Not Modified"); headerResponseStatus.put("305", "Use Proxy"); headerResponseStatus.put("307", "Temporary Redirect"); headerResponseStatus.put("400", "Bad Request"); headerResponseStatus.put("401", "Unauthorized"); headerResponseStatus.put("402", "Payment Required"); headerResponseStatus.put("403", "Forbidden"); headerResponseStatus.put("404", "Not Found"); headerResponseStatus.put("405", "Method Not Allowed"); headerResponseStatus.put("406", "Not Acceptable"); headerResponseStatus.put("407", "Proxy Authentication Required"); headerResponseStatus.put("408", "Request Time-out"); headerResponseStatus.put("409", "Conflict"); headerResponseStatus.put("410", "Gone"); headerResponseStatus.put("411", "Length Required"); headerResponseStatus.put("412", "Precondition Failed"); headerResponseStatus.put("413", "Request Entity Too Large"); headerResponseStatus.put("414", "Request-URI Too Large"); headerResponseStatus.put("415", "Unsupported Media Type"); headerResponseStatus.put("416", "Requested range not satisfiable"); headerResponseStatus.put("417", "Expectation Failed"); headerResponseStatus.put("500", "Internal Server Error"); headerResponseStatus.put("501", "Not Implemented"); headerResponseStatus.put("502", "Bad Gateway"); headerResponseStatus.put("503", "Service Unavailable"); headerResponseStatus.put("504", "Gateway Time-out"); headerResponseStatus.put("505", "HTTP Version not supported"); } /** * MIME type accessor. By using this, we understand that sometimes the wrong * headers might go out for a badly named file (e.g. an mp3 file with * extension .txt but this is how all the major HTTP servers do it anyway. * * @param extension * the extension of the file * @return the MIME type of the file according to the extension */ public static String getMIME(String extension) { return MIME.getProperty(extension.toLowerCase()); } /** * gets a String description of the status code e.g (200 OK) or (404 FnF) * * @param statusCode * the integer status code * @return the String status code */ public static String getHeaderResponseStatus(int statusCode) { return headerResponseStatus.get(Integer.toString(statusCode)); } /** * checks if a request header exists in the protocol * * @param requestHeader * the request headcer to check * @return true if it exists, false otherwise */ public static boolean requestHeaderExists(String requestHeader) { return headerRequest.containsKey(requestHeader); } /** * Creates a new mime file with the bare basic defaults * */ public static void makeNewMIME() { MIME.clear(); MIME.setProperty(".gif", "image/gif"); MIME.setProperty(".png", "image/png"); MIME.setProperty(".jpeg", "image/jpeg"); MIME.setProperty(".jpg", "image/jpeg"); MIME.setProperty(".html", "text/html"); MIME.setProperty(".htm", "text/html"); MIME.setProperty(".css", "text/css"); MIME.setProperty(".mp3", "audio/mp3"); MIME.setProperty(".txt", "text/plain"); try { OutputStream nmim = new FileOutputStream(Protocol.MIMEFILE); MIME.storeToXML(nmim, "\nJAMINID MIMETYPES\n\nThese are the default MIME types for the jaminid daemon. If you had a modified but invalid MIME file here, it may have been reverted to this."); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }jaminid-0.99a/src/com/prolixtech/jaminid_examples/0000755000175000017500000000000011217365120020724 5ustar railrailjaminid-0.99a/src/com/prolixtech/jaminid_examples/SimpleServer.java0000644000175000017500000000414110415762533024217 0ustar railrail/* * Created on Jan 3, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.jaminid_examples; import java.io.File; import java.io.IOException; import com.prolixtech.jaminid.ContentOracle; import com.prolixtech.jaminid.Daemon; import com.prolixtech.jaminid.Protocol; import com.prolixtech.jaminid.Request; import com.prolixtech.jaminid.Response; /** * @author Constantinos Michael * */ public class SimpleServer extends ContentOracle { private static Daemon daemon; private final static int PORT = 8080; private static final String ROOT_PATH = "doc/"; private static final String DEFAULT = "index.html"; private String root_canonical; public SimpleServer(){ File root_p = new File(ROOT_PATH); if(!root_p.exists()) { throw new IllegalArgumentException("ROOT PATH CAN'T BE FOUND: " + ROOT_PATH); } try{ root_canonical = root_p.getCanonicalPath(); } catch (Exception e) { throw new IllegalArgumentException("IO ERROR WITH: " + ROOT_PATH); } } public String demultiplex(Request connRequest, Response connResponse) { String loc = connRequest.getLocation(); if(loc.equals("/")) loc = DEFAULT; File x = new File(ROOT_PATH + loc); try { x = x.getCanonicalFile(); if(! (x.getAbsolutePath().startsWith(root_canonical))) throw new IOException("Not within filesystem limits"); connResponse.sendFile(x); } catch (IOException e) { connResponse.setStatus(Protocol.NOT_FOUND); } catch (Exception e){ connResponse.setStatus(Protocol.INTERNAL_SERVER_ERROR); } return ""; } public static void main(String[] args) { SimpleServer s = new SimpleServer(); daemon = new Daemon(PORT, s); System.out.println("The webserver is now running! Visit http://localhost:" + PORT + " through your favorite web browser."); } } jaminid-0.99a/src/com/prolixtech/jaminid_examples/HelloWorldServer.java0000644000175000017500000000347510166250235025044 0ustar railrail/* * Created on Jan 3, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.jaminid_examples; import com.prolixtech.jaminid.ContentOracle; import com.prolixtech.jaminid.Daemon; import com.prolixtech.jaminid.Request; import com.prolixtech.jaminid.Response; /** * @author Constantinos Michael * */ public class HelloWorldServer extends ContentOracle { public static final int PORT = 80; public static String HELLO = "

Hello World!

"; private static Daemon daemon; public String demultiplex(Request connRequest, Response connResponse) { if(connRequest.getParamOrNull("details")!=null){ StringBuffer a = new StringBuffer(); a.append("

Details about your request

"); a.append("

Location

"); a.append(connRequest.getLocation()); a.append("

Parameters

"); a.append(connRequest.getParamMap()); a.append("

Client

"); a.append("IP Address: "); a.append(connRequest.getIPAddressString()); a.append("
"); a.append(connRequest.getHeader()); return a.toString(); } if(connRequest.getLocation().endsWith("exit")){ System.out.println("Exiting!"); daemon.tearDown(); } return HELLO; } public static void main(String[] args) { HelloWorldServer s = new HelloWorldServer(); daemon = new Daemon(PORT, s); System.out.println("The webserver is now running! Visit http://localhost:" + PORT + " through your favorite web browser."); } } jaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/0000755000175000017500000000000011217365120021647 5ustar railrailjaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/resources/0000755000175000017500000000000011217365120023661 5ustar railrailjaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/resources/prosimii-print.css0000644000175000017500000000712510415773507027400 0ustar railrail/************************************** * TITLE: Prosimii Print Stylesheet * * URI : prosimii/prosimii-print.css * * MODIF: 2003-Apr-30 19:15 +0800 * **************************************/ /* ##### Common Styles ##### */ body { color: black; background-color: white; font-family: "times new roman", times, roman, serif; font-size: 12pt; margin: 0; padding: 0; } acronym, .titleTip { font-style: italic; border-bottom: none; } acronym:after, .titleTip:after { /* Prints titles after the acronyms/titletips. Doesn't work in MSIE */ content: "(" attr(title) ")"; font-size: 90%; font-style: normal; padding-left: 1ex; } a { color: black; background-color: transparent; text-decoration: none; } a[href]:after { /* Prints the links' URIs after the links' texts. Doesn't work in MSIE */ content: "<" attr(href) ">"; font-size: 90%; padding-left: 1ex; } ol { margin: -0.25em 0 1em 0; padding: 0; } ul { list-style-type: square; margin: -0.25em 0 1em 0; padding: 0; } dl { margin: 0 0 1em 0; padding: 0; } ul li { margin: 1ex 0 0 1.5em; padding: 0; } ol li { margin: 1ex 0 0 1.5em; padding: 0; } dt { font-weight: bold; margin: 0; padding: 0; } dd { margin: 0 0 0 1.5em; padding: 0; } .doNotPrint { display: none; } /* ##### Header ##### */ #header { } .superHeader { display: none; } .midHeader { color: black; background-color: transparent; margin: 0; padding: 0; border-bottom: 1px solid black; } .headerTitle { font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-size: 200%; font-weight: normal; margin: 0; padding: 0; } .headerSubTitle { font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-size: 110%; font-weight: normal; font-style: italic; margin: 0; padding: 0 0 1ex 0; } .headerLinks { display: none; } .subHeader { display: none; } /* ##### Side Menu ##### */ #side-bar { display: none !important; } /* ##### Main Copy ##### */ #main-copy { text-align: justify; margin: 0 !important; padding: 0; } #main-copy h1 { font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-size: 120%; margin: 2ex 0 1ex 0; padding: 0; } #main-copy h2 { font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-weight: normal; font-size: 100%; margin: 0; padding: 2ex 0 0.5ex 0; } #main-copy h1 + h2 { padding-top: 0; } #main-copy p { margin: 0 0 2ex 0; padding: 0; } h2 a:after { content: "" !important; } .newsDate { font-style: italic; margin: 0; padding: 0; display: inline; } .newsDate:before { /* Prints an '[' before the news item's date. Doesn't work in MSIE */ content: "["; font-style: normal; } .newsDate:after { /* Prints a ']' after the news item's date. Doesn't work in MSIE */ content: "]"; font-style: normal; } .newsSummary { display: inline; margin: 0 0 0 1ex !important; padding: 0; } .more { display: none; } .smallCaps { font-variant: small-caps; } .quarter, .oneThird, .half, .twoThirds, .fullWidth { margin: 0; padding: 0; } /* ##### Footer ##### */ #footer { color: black; background-color: transparent; font-size: 100%; text-align: center; margin: 2em 0 0 0; padding: 1ex 0 0 0; border-top: 1px solid black; display: block; } #footer a { color: black; background-color: transparent; text-decoration: none; }jaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/resources/runsim.html0000644000175000017500000001057110415773507026103 0ustar railrail Jaminid Ajax Example - Run

Technical Strategic Simulator

%%-%RUNSIMDETS%-%%
jaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/resources/bar.gif0000644000175000017500000000161210415773507025127 0ustar railrailGIF89a2 !2B!2B!2B! NETSCAPE2.0!Created with The GIMP! ,2 >xs \wT8-&pLk{mw[JԪZ! ,2 @ vp}!|acg'퐪0yt ^Ζ1!R$Ԫ! ,2 = jaa6R%qھ_|-*34#%%HԪ! ,2 ? jm!l硜&*L잺?zDYlyeLIԪ:(! ,2 ? jwl(7*Li)Jbm {G㭖\JԪ:(! ,2 > jwwll(yHj ҩ;b~ LЕHԪP! ,2 ? jwl(7*Li)Jbm {G㭖\JԪ:(! ,2 ? jm!l硜&*L잺?zDYlyeLIԪ:(! ,2 = jaa6R%qھ_|-*34#%%HԪ! ,2 @ vp}!|acg'퐪0yt ^Ζ1!R$Ԫ;jaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/resources/index.html0000644000175000017500000002056510415773507025701 0ustar railrail Jaminid Ajax Demonstration

Strategical Backtesting

Simulate automated technical analysis trading.

Initial funding ($):

Stock Ticker to trade:

Start Date:

End Date:

What am I looking at?

This jaminid oracle is an example of using Ajax techniques to build interactive applications. It is based on a trading simulator built to backtest technical analysis methods against historical prices.

When you click on Run Simulator, the page you will navigate to will launch individual requests, which will appear after being calculated on the server end.

To make this example simple to run, the stock prices have been left out, so the only strategy you will see will be a RandomStrategy, rendered 7 times. There's a built in random delay in returning the strategy so that the browser renders the data gradually.

jaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/resources/prosimii-screen.css0000644000175000017500000001416310415773507027523 0ustar railrail/*************************************** * TITLE: Prosimii Screen Stylesheet * * URI : prosimii/prosimii-screen.css * * MODIF: 2004-Apr-28 21:43 +0800 * ***************************************/ /* ##### Common Styles ##### */ body { font-family: verdana, helvetica, arial, sans-serif; font-size: 73%; /* Enables font size scaling in MSIE */ margin: 0; padding: 0; } html > body { font-size: 9pt; } acronym, .titleTip { border-bottom: 1px dotted rgb(61,92,122); cursor: help; margin: 0; padding: 0 0 0.4px 0; } a { color: rgb(61,92,122); background-color: transparent; text-decoration: underline; margin: 0; padding: 0 1px 2px 1px; } a:hover { color: rgb(117,144,174); text-decoration: none; } ol { margin: 1em 0 1.5em 0; padding: 0; } ul { list-style-type: square; margin: 1em 0 1.5em 0; padding: 0; } dl { margin: 1em 0 0.5em 0; padding: 0; } ul li { line-height: 1.5em; margin: 1.25ex 0 0 1.5em; padding: 0; } ol li { line-height: 1.5em; margin: 1.25ex 0 0 2em; padding: 0; } dt { font-weight: bold; margin: 0; padding: 0 0 1ex 0; } dd { line-height: 1.75em; margin: 0 0 1.5em 1.5em; padding: 0; } .doNotDisplay { display: none !important; } .smallCaps { font-size: 117%; font-variant: small-caps; } /* ##### Header ##### */ .superHeader { color: rgb(130,128,154); background-color: rgb(33,50,66); text-align: right; margin: 0; padding: 0.5ex 10px; } .superHeader span { color: rgb(195,196,210); background-color: transparent; font-weight: bold; text-transform: uppercase; } .superHeader a { color: rgb(195,196,210); background-color: transparent; text-decoration: none; margin: 0; padding: 0 0.25ex 0 0; } .superHeader a:hover { color: rgb(193,102,90); background-color: transparent; text-decoration: none; } .midHeader { color: white; background-color: rgb(61,92,122); margin: 0; padding: 0.26ex 10px; } .headerTitle { font-size: 300%; margin: 0; padding: 0; } .headerSubTitle { font-size: 151%; font-weight: normal; font-style: italic; margin: 0 0 1ex 0; padding: 0; } .headerLinks { text-align: right; margin: 0; padding: 0 0 2ex 0; position: absolute; right: 1.5em; top: 3.5em; } .headerLinks a { color: white; background-color: transparent; text-decoration: none; margin: 0; padding: 0 0 0.5ex 0; display: block; } .headerLinks a:hover { color: rgb(195,196,210); background-color: transparent; text-decoration: underline; } .subHeader { color: white; background-color: rgb(117,144,174); margin: 0; padding: 0.5ex 10px; } .subHeader a, .subHeader .highlight { color: white; background-color: transparent; font-size: 110%; font-weight: bold; text-decoration: none; margin: 0; padding: 0 0.25ex 0 0; } .subHeader a:hover, .subHeader .highlight { color: rgb(255,204,0); background-color: transparent; text-decoration: none; } /* ##### Main Copy ##### */ #main-copy { margin: 0; padding: 0.5em 10px; clear: left; } #main-copy h1 { color: rgb(117,144,174); background-color: transparent; font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-size: 200%; margin: 0; padding: 0; } #main-copy h2 { color: rgb(61,92,122); background-color: transparent; font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-weight: normal; font-size: 151%; margin: 0; padding: 1ex 0 0 0; } #main-copy p { line-height: 1.75em; margin: 1em 0 1.5em 0; padding: 0; } .newsHeading { color: rgb(61,92,122); background-color: transparent; font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-size: 145%; text-decoration: none; margin: 0; padding: 1ex 0 0 0; display: block; } .newsHeading:hover { color: rgb(117,144,174); background-color: transparent; text-decoration: underline; } .newsDate { font-style: italic; margin: 0 !important; padding: 0; } .newsSummary { margin: 1.5ex 0 2.5ex 0.75ex !important; padding: 0; } .more { text-align: right; margin: 0; padding: 0.5em 0; } .more a { color: rgb(61,92,122); background-color: transparent; font-size: 92%; text-decoration: underline; margin: 0; padding: 0.25ex 0.75ex; } .more a:hover { color: rgb(117,144,174); text-decoration: none; } .rowOfBoxes { clear: both; } .quarter, .oneThird, .half, .twoThirds, .fullWidth { margin: 1em 0; float: left; border-left: 1px solid rgb(204,204,204); } .quarter { width: 21%; padding: 0 1.9%; } .oneThird { width: 28%; padding: 0 1.9%; } .half { text-align: justify; width: 46%; padding: 0 1.9%; } .twoThirds { text-align: justify; width: 63%; padding: 0 1.9%; } .fullWidth { text-align: justify; width: 96%; padding: 0 1.2em; border-left: none; } .filler { /* use with an empty

element to add padding to the end of a text box */ border: 1px solid white; } .noBorderOnLeft { border-left: none; } .dividingBorderAbove { border-top: 1px solid rgb(204,204,204); } /* More elegant alternatives to .noBorderOnLeft & .dividingBorderAbove * that don't require the creation of new classes - but which are not * supported by MSIE - are the following: * * .rowOfBoxes > div:first-child { * border-left: none; * } * * .rowOfBoxes + .rowOfBoxes { * border-top: 1px solid rgb(204,204,204); * } */ /* ##### Footer ##### */ #footer { color: rgb(51,51,102); background-color: rgb(239,239,239); font-size: 87%; text-align: center; line-height: 1.25em; margin: 2em 0 0 0; padding: 1ex 10px; clear: left; } #footer a { color: rgb(0,68,204); background-color: transparent; text-decoration: underline; } #footer a:hover { text-decoration: none; } .greentext { color: rgb(15, 111, 7); } .redtext { color: rgb(96, 34, 23); } jaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/resources/prosimii-screen-alt.css0000644000175000017500000001350210415773507030275 0ustar railrail/************************************************* * TITLE: Prosimii Alternative Screen Stylesheet * * URI : prosimii/prosimii-screen-alt.css * * MODIF: 2004-Apr-28 21:56 +0800 * *************************************************/ /* ##### Common Styles ##### */ body { font-family: verdana, helvetica, arial, sans-serif; font-size: 73%; /* Enables font size scaling in MSIE */ margin: 0; padding: 0; } html > body { font-size: 9pt; } acronym, .titleTip { border-bottom: 1px dotted rgb(61,92,122); cursor: help; margin: 0; padding: 0 0 0.4px 0; } a { color: rgb(61,92,122); background-color: transparent; text-decoration: underline; margin: 0; padding: 0 1px 2px 1px; } a:hover { color: rgb(117,144,174); text-decoration: none; } ol { margin: 1em 0 1.5em 0; padding: 0; } ul { list-style-type: square; margin: 1em 0 1.5em 0; padding: 0; } dl { margin: 1em 0 0.5em 0; padding: 0; } ul li { line-height: 1.5em; margin: 1.25ex 0 0 1.5em; padding: 0; } ol li { line-height: 1.5em; margin: 1.25ex 0 0 2em; padding: 0; } dt { font-weight: bold; margin: 0; padding: 0 0 1ex 0; } dd { line-height: 1.75em; margin: 0 0 1.5em 1.5em; padding: 0; } .doNotDisplay { display: none !important; } .smallCaps { font-size: 117%; font-variant: small-caps; } /* ##### Header ##### */ .superHeader { color: rgb(130,128,154); background-color: rgb(33,50,66); text-align: right; margin: 0; padding: 0.5ex 10px; } .superHeader span { color: rgb(195,196,210); background-color: transparent; font-weight: bold; text-transform: uppercase; } .superHeader a { color: rgb(195,196,210); background-color: transparent; text-decoration: none; margin: 0; padding: 0 0.25ex 0 0; } .superHeader a:hover { color: rgb(193,102,90); background-color: transparent; text-decoration: none; } .midHeader { color: white; background-color: rgb(61,92,122); margin: 0; padding: 0.26ex 10px; } .headerTitle { font-size: 300%; margin: 0; padding: 0; } .headerSubTitle { font-size: 151%; font-weight: normal; font-style: italic; margin: 0 0 1ex 0; padding: 0; } .headerLinks { text-align: right; margin: 0; padding: 0 0 2ex 0; position: absolute; right: 1.5em; top: 3.5em; } .headerLinks a { color: white; background-color: transparent; text-decoration: none; margin: 0; padding: 0 0 0.5ex 0; display: block; } .headerLinks a:hover { color: rgb(195,196,210); background-color: transparent; text-decoration: underline; } .subHeader { color: white; background-color: rgb(117,144,174); margin: 0; padding: 0.5ex 10px; } .subHeader a, .subHeader .highlight { color: white; background-color: transparent; font-size: 110%; font-weight: bold; text-decoration: none; margin: 0; padding: 0 0.25ex 0 0; } .subHeader a:hover, .subHeader .highlight { color: rgb(255,204,0); background-color: transparent; text-decoration: none; } /* ##### Side Menu ##### */ #side-bar { color: rgb(204,204,204); background-color: transparent; list-style-type: square; list-style-position: inside; width: 10em; margin: 0; padding: 1ex 0; border: 1px solid rgb(204,204,204); position: absolute; left: 1.5ex; top: 12em; } [id="side-bar"] { position: fixed !important; /* Makes the side menu scroll with the page. Doesn't work in MSIE */ } #side-bar a { text-decoration: none; } #side-bar:hover { color: rgb(117,144,174); background-color: transparent; border-color: rgb(117,144,174); } #side-bar li { margin: 0; padding: 0.75ex 0 1ex 1.75ex; } #side-bar li:hover { color: rgb(61,92,122); background-color: transparent; } #side-bar li a:hover { text-decoration: underline; } /* ##### Main Copy ##### */ #main-copy { text-align: justify; margin: -0.5ex 1em 1em 12.5em; padding: 0.5em 10px; clear: left; } #main-copy h1 { color: rgb(117,144,174); background-color: transparent; font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-size: 186%; margin: 0; padding: 1.5ex 0 0 0; } #main-copy h2 { color: rgb(61,92,122); background-color: transparent; font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-weight: normal; font-size: 151%; margin: 0; padding: 1ex 0 0 0; } #main-copy p { line-height: 1.75em; margin: 1em 0 1.5em 0; padding: 0; } .newsHeading { color: rgb(61,92,122); background-color: transparent; font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; font-size: 145%; text-decoration: none; margin: 0; padding: 1ex 0 0 0; display: block; } .newsHeading:hover { color: rgb(117,144,174); background-color: transparent; text-decoration: underline; } .newsDate { font-style: italic; margin: 0 !important; padding: 0; } .newsSummary { margin: 1.5ex 0 2.5ex 0.75ex !important; padding: 0; } .more { text-align: right; margin: 0; padding: 0.5em 0; } .more a { color: rgb(61,92,122); background-color: transparent; font-size: 92%; text-decoration: underline; margin: 0; padding: 0.25ex 0.75ex; } .more a:hover { color: rgb(117,144,174); text-decoration: none; } /* ##### Footer ##### */ #footer { color: rgb(51,51,102); background-color: rgb(239,239,239); font-size: 87%; text-align: center; line-height: 1.25em; margin: 2em 0 0 0; padding: 1ex 10px; clear: left; } #footer a { color: rgb(0,68,204); background-color: transparent; text-decoration: underline; } #footer a:hover { text-decoration: none; }jaminid-0.99a/src/com/prolixtech/jaminid_examples/ajax/SimpleAjaxServer.java0000644000175000017500000001414110415773507025752 0ustar railrail/* * Created on Jan 3, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.prolixtech.jaminid_examples.ajax; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.text.DecimalFormat; import java.util.Date; import java.util.HashMap; import java.util.Random; import com.prolixtech.jaminid.ContentOracle; import com.prolixtech.jaminid.Daemon; import com.prolixtech.jaminid.Protocol; import com.prolixtech.jaminid.Request; import com.prolixtech.jaminid.Response; /** * @author Constantinos Michael * */ public class SimpleAjaxServer extends ContentOracle { public static final int PORT = 8080; private static final String ROOT_PATH = "src/com/prolixtech/jaminid_examples/ajax/resources/"; private static final String DEFAULT = "index.html"; private Random rand = new Random(); volatile private static Daemon daemon; private String root_canonical; public SimpleAjaxServer(){ File root_p = new File(ROOT_PATH); if(!root_p.exists()) { throw new IllegalArgumentException("ROOT PATH CAN'T BE FOUND: " + ROOT_PATH); } try{ root_canonical = root_p.getCanonicalPath(); } catch (Exception e) { throw new IllegalArgumentException("IO ERROR WITH: " + ROOT_PATH); } } public String demultiplex(Request connRequest, Response connResponse) { HashMap outputHash=new HashMap(); System.out.println(connRequest.getLocation()); if(connRequest.getLocation().equals("/runsim.html") ){ String strat = connRequest.getParamOrNull("strategy"); double d = Double.parseDouble(connRequest.getParam("start")); long startDate = new java.util.Date(connRequest.getParam("sday")+"-" + connRequest.getParam("smon") + "-" + connRequest.getParam("syear")).getTime(); long endDate = new java.util.Date(connRequest.getParam("eday")+"-" + connRequest.getParam("emon") + "-" + connRequest.getParam("eyear")).getTime(); String ticker = connRequest.getParam("ticker"); if(strat==null){ String msg = "

Running simulator on symbol " + ticker + " with an initial investment of $" + dcf.format(d) + "" + " from " + (new Date(startDate)).toString() + " to " + (new Date(endDate)).toString() + "

"; outputHash.put("RUNSIMDETS", msg); } else { // strategy=InsiderTrading&start=10000&ticker=IBM&sday=1&smon=Jan&syear=1985&eday=1&emon=Jan&eyear=2005 String mxa = "showtrans.html?strategy="+strat+"&start="+d+"&sdate="+startDate+"&edate="+endDate+"&ticker="+ticker; try { Thread.sleep(1000 + rand.nextInt(5000)); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } double v = rand.nextDouble() * 2 * d; String cl = (v-d>=0 ? "greentext" : "redtext"); StringBuffer a = new StringBuffer(); a.append(strat); a.append("|"); a.append("

RandomStrategy

"); a.append("

Balance: "); a.append(dcf.format(v)); a.append("
"); a.append("% Change: "); a.append(""); a.append(dcf.format((v-d)/d * 100)); a.append(""); a.append("

"); a.append("

Number of transactions: "); a.append(rand.nextInt(100)); a.append("

"); System.out.println(a.toString()); return a.toString(); // long endDate = new java.util.Date("15-Oct-2005").getTime(); } } String loc = connRequest.getLocation(); if(loc.equals("/")) loc = DEFAULT; File x = new File(ROOT_PATH + loc); try { x = x.getCanonicalFile(); if(! (x.getAbsolutePath().startsWith(root_canonical))) throw new IOException("Not within filesystem limits"); if(x.getName().endsWith("html") || x.getName().endsWith("htm")) { StringBuffer a = new StringBuffer(); BufferedReader br = new BufferedReader(new FileReader (x)); while(true){ String line = br.readLine(); if(line==null) break; a.append(line); a.append("\n"); } br.close(); fillInTemplate(a,connRequest,connResponse, outputHash); return a.toString(); } else { connResponse.sendFile(x); } } catch (IOException e) { connResponse.setStatus(Protocol.NOT_FOUND); } catch (Exception e){ connResponse.setStatus(Protocol.INTERNAL_SERVER_ERROR); } return ""; } private void fillInTemplate(StringBuffer a, Request connRequest, Response connResponse, HashMap outputHash) { while(true){ int s = a.indexOf("%%-%"); if(s<0) break; int e = a.indexOf("%-%%", s); String key = a.substring(s+4, e); if(outputHash.containsKey(key)){ a.replace(s, e+4, outputHash.get(key)); } else { a.replace(s, e+4, getFiller(key, connRequest, connResponse)); } } } private String getFiller(String string, Request connRequest, Response connResponse) { System.out.println("Getting " + string); if(string.equals("ENVLOC")){ return "" + connRequest.getLocation() + "?" + connRequest.getParamString(); } // TODO Auto-generated method stub return "N/A"; } DecimalFormat dcf = new DecimalFormat(); public static void main(String[] args) { SimpleAjaxServer s = new SimpleAjaxServer(); daemon = new Daemon(PORT, s); System.out.println("The webserver is now running! Visit http://localhost:" + PORT + " through your favorite web browser."); } }