asterisk-java-cvs Mailing List for Asterisk-Java Library (Page 96)
Brought to you by:
srt
You can subscribe to this list here.
2005 |
Jan
(4) |
Feb
(75) |
Mar
(211) |
Apr
(70) |
May
(12) |
Jun
(7) |
Jul
(96) |
Aug
(90) |
Sep
(11) |
Oct
(42) |
Nov
(45) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(32) |
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(10) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(3) |
Aug
(73) |
Sep
(13) |
Oct
(4) |
Nov
(1) |
Dec
(7) |
2009 |
Jan
(1) |
Feb
(2) |
Mar
(48) |
Apr
(21) |
May
(14) |
Jun
(11) |
Jul
(9) |
Aug
(2) |
Sep
(11) |
Oct
(14) |
Nov
(6) |
Dec
(4) |
2010 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
|
May
(3) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(12) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(10) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
2012 |
Jan
(3) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
(2) |
Dec
(2) |
2013 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(5) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(25) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
2016 |
Jan
|
Feb
(42) |
Mar
(6) |
Apr
(15) |
May
(3) |
Jun
(1) |
Jul
(11) |
Aug
|
Sep
|
Oct
(17) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
(3) |
Jul
(7) |
Aug
(11) |
Sep
(5) |
Oct
(7) |
Nov
(4) |
Dec
(4) |
2018 |
Jan
(11) |
Feb
(11) |
Mar
(3) |
Apr
|
May
(9) |
Jun
(6) |
Jul
(17) |
Aug
(9) |
Sep
(2) |
Oct
(4) |
Nov
(3) |
Dec
(3) |
2019 |
Jan
(13) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(5) |
Jun
|
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
(3) |
Dec
|
2020 |
Jan
(2) |
Feb
(72) |
Mar
(8) |
Apr
(11) |
May
(12) |
Jun
(3) |
Jul
(12) |
Aug
(3) |
Sep
(5) |
Oct
(4) |
Nov
|
Dec
(9) |
2021 |
Jan
|
Feb
(31) |
Mar
(6) |
Apr
(3) |
May
|
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
(9) |
Nov
|
Dec
(32) |
2022 |
Jan
(5) |
Feb
(7) |
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(2) |
Oct
(111) |
Nov
(105) |
Dec
(26) |
2023 |
Jan
(25) |
Feb
(6) |
Mar
(10) |
Apr
(54) |
May
(41) |
Jun
(24) |
Jul
(6) |
Aug
(11) |
Sep
(9) |
Oct
(8) |
Nov
(55) |
Dec
(34) |
2024 |
Jan
(6) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(89) |
Sep
(48) |
Oct
(31) |
Nov
(9) |
Dec
(19) |
2025 |
Jan
(12) |
Feb
(18) |
Mar
(9) |
Apr
(7) |
May
|
Jun
(7) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Stefan R. <sr...@us...> - 2005-02-24 00:05:41
|
Update of /cvsroot/asterisk-java/asterisk-java/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16777/xdocs Log Message: Directory /cvsroot/asterisk-java/asterisk-java/xdocs added to the repository |
From: Stefan R. <sr...@us...> - 2005-02-23 23:00:59
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25761/src/java/net/sf/asterisk/manager Modified Files: ManagerConnection.java Log Message: fixed java doc Index: ManagerConnection.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerConnection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- ManagerConnection.java 23 Feb 2005 22:50:57 -0000 1.2 +++ ManagerConnection.java 23 Feb 2005 23:00:50 -0000 1.3 @@ -22,8 +22,8 @@ import net.sf.asterisk.manager.action.Ma import net.sf.asterisk.manager.response.ManagerResponse; /** - * The main interface to talk to an asterisk server via the manager api. A concrete implementation - * of this interface is obtained from a ManagerConnectionFactory. + * The main interface to talk to an Asterisk server via the Asterisk Manager API. A concrete + * implementation of this interface can be obtained from a ManagerConnectionFactory. * * @see net.sf.asterisk.manager.ManagerConnectionFactory * @@ -36,7 +36,7 @@ public interface ManagerConnection * Logs in to the asterisk server with the username and password specified when this connection * was created. * - * @throws IOException + * @throws IOException if the network connection is disrupted. * @throws AuthenticationFailedException if the username and/or password are incorrect or the * ChallengeResponse could not be built. * @throws TimeoutException if no response is received within the default timeout period. If the @@ -51,7 +51,7 @@ public interface ManagerConnection /** * Sends a LogoffAction to the asterisk server and disconnects. * - * @throws IOException + * @throws IOException if the network connection is disrupted. * @throws TimeoutException if no response to the logoff action is received within the default * timeout period. * @@ -75,7 +75,7 @@ public interface ManagerConnection * * @return the corresponding response received from the asterisk server * - * @throws IOException + * @throws IOException if the network connection is disrupted. * @throws TimeoutException if no reponse is received within the default timeout period. * * @see #sendAction(ManagerAction, long) @@ -92,7 +92,7 @@ public interface ManagerConnection * * @return the corresponding response received from the asterisk server * - * @throws IOException + * @throws IOException if the network connection is disrupted. * @throws TimeoutException if no reponse is received within the given timeout period. * * @see #sendAction(ManagerAction, ManagerResponseHandler) @@ -106,7 +106,7 @@ public interface ManagerConnection * @param action the action to send to the asterisk server * @param callbackHandler the callback handler to call when the response is received * - * @throws IOException + * @throws IOException if the network connection is disrupted. */ void sendAction(ManagerAction action, ManagerResponseHandler callbackHandler) throws IOException; @@ -131,9 +131,8 @@ public interface ManagerConnection void removeEventHandler(ManagerEventHandler eventHandler); /** - * Return Asterisk server of connection - * + * Returns the Asterisk server of this connection. + * @return the Asterisk server of this connection. */ - AsteriskServer getAsteriskServer(); } |
From: Stefan R. <sr...@us...> - 2005-02-23 22:56:50
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24032/src/java/net/sf/asterisk/manager/event Modified Files: RenameEvent.java Log Message: fixed javadoc Index: RenameEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/RenameEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- RenameEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ RenameEvent.java 23 Feb 2005 22:56:41 -0000 1.3 @@ -82,7 +82,7 @@ public class RenameEvent extends Manager /** * Sets the old name of the channel. - * @param the old name of the channel. + * @param oldname the old name of the channel. */ public final void setOldname(final String oldname) { |
From: Stefan R. <sr...@us...> - 2005-02-23 22:55:16
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23433 Modified Files: checkstyle.xml Log Message: changed GenericIllegalRegexp to ignore comments removed check for HiddenField Index: checkstyle.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/checkstyle.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- checkstyle.xml 23 Feb 2005 12:45:22 -0000 1.1 +++ checkstyle.xml 23 Feb 2005 22:54:59 -0000 1.2 @@ -169,7 +169,7 @@ <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> - <module name="HiddenField"/> + <!-- module name="HiddenField"/ --> <module name="IllegalInstantiation"/> <module name="InnerAssignment"/> <module name="MagicNumber"/> @@ -193,6 +193,7 @@ <module name="FinalParameters"/> <module name="GenericIllegalRegexp"> <property name="format" value="\s+$"/> + <property name="ignoreComments" value="true"/> <property name="message" value="Line has trailing spaces."/> </module> <module name="TodoComment"/> |
From: Stefan R. <sr...@us...> - 2005-02-23 22:53:55
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22956 Modified Files: LICENSE Added Files: LICENSE.txt Log Message: changed license to Apache --- NEW FILE: LICENSE.txt --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ Index: LICENSE =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/LICENSE,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- LICENSE 15 Sep 2004 01:22:33 -0000 1.1 +++ LICENSE 23 Feb 2005 22:53:46 -0000 1.2 @@ -1,504 +1,202 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 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. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ - 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. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. + 1. Definitions. - 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. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. - 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: + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - 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. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. - 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. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - 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. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - 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. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - 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. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -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. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -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. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - 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. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. - 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. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -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. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - NO WARRANTY + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and - 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. + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and - 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. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - 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). + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this 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. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. - 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. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. - 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. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. - 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -Also add information on how to contact you by electronic and paper mail. + END OF TERMS AND CONDITIONS -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: + APPENDIX: How to apply the Apache License to your work. - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice + Copyright [yyyy] [name of copyright owner] -That's all there is to it! + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21466/src/java/net/sf/asterisk/manager/event Modified Files: AlarmClearEvent.java NewStateEvent.java QueueEntryEvent.java AgentCallbackLoginEvent.java PeerStatusEvent.java OriginateSuccessEvent.java AgentCallbackLogoffEvent.java QueueParamsEvent.java DisconnectEvent.java StatusEvent.java ChannelEvent.java AgentLoginEvent.java QueueMemberEvent.java NewChannelEvent.java HoldedCallEvent.java OriginateFailureEvent.java MeetMeJoinEvent.java AgentLogoffEvent.java ZapShowChannelsEvent.java AgentCalledEvent.java ReloadEvent.java QueueEvent.java MeetMeLeaveEvent.java MessageWaitingEvent.java ResponseEvent.java UnlinkEvent.java ParkedCallsCompleteEvent.java ZapShowChannelsCompleteEvent.java RenameEvent.java StatusCompleteEvent.java HangupEvent.java ConnectEvent.java MeetMeEvent.java ParkedCallEvent.java RegistryEvent.java ShutdownEvent.java LeaveEvent.java CdrEvent.java ManagerEvent.java JoinEvent.java ExtensionStatusEvent.java LinkageEvent.java OriginateEvent.java LinkEvent.java AlarmEvent.java NewCallerIdEvent.java NewExtenEvent.java Log Message: added license header Index: AlarmClearEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AlarmClearEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AlarmClearEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ AlarmClearEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.event; */ public class AlarmClearEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -3584791971422266558L; private String alarm; private Integer channel; Index: NewStateEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/NewStateEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- NewStateEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ NewStateEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.event; */ public class NewStateEvent extends ChannelEvent { + /** + * Serializable version identifier + */ static final long serialVersionUID = -3660049241052945802L; /** Index: QueueEntryEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/QueueEntryEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- QueueEntryEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ QueueEntryEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** - * A QueueEntryEvent is triggered in response to a QueueStatusAction and contains - * information about an entry in a queue.<br> + * A QueueEntryEvent is triggered in response to a QueueStatusAction and contains information about + * an entry in a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction @@ -17,6 +28,9 @@ package net.sf.asterisk.manager.event; */ public class QueueEntryEvent extends ResponseEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 3419114730595151514L; private String queue; private Integer position; Index: AgentCallbackLoginEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentCallbackLoginEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AgentCallbackLoginEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ AgentCallbackLoginEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** - * An AgentCallbackLoginEvent is triggered when an agent is successfully - * logged in using AgentCallbackLogin.<br> + * An AgentCallbackLoginEvent is triggered when an agent is successfully logged in using + * AgentCallbackLogin.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentCallbackLogoffEvent @@ -16,6 +27,9 @@ package net.sf.asterisk.manager.event; */ public class AgentCallbackLoginEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -3510642916347427230L; private String agent; private String loginChan; Index: PeerStatusEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/PeerStatusEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- PeerStatusEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ PeerStatusEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** - * A PeerStatusEvent is triggered when a SIP or IAX client attempts to registrer - * at this asterisk server.<br> + * A PeerStatusEvent is triggered when a SIP or IAX client attempts to registrer at this asterisk + * server.<br> * This event is implemented in <code>channels/chan_iax2.c</code> and * <code>channels/chan_sip.c</code> * @@ -16,6 +27,9 @@ package net.sf.asterisk.manager.event; */ public class PeerStatusEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 8384939771592846892L; private String peer; private String peerStatus; @@ -31,9 +45,9 @@ public class PeerStatusEvent extends Man } /** - * Returns the name of the peer that registered. The peer's name starts - * with "IAX2/" if it is an IAX client or "SIP/" if it is a SIP client. - * It is followed by the username that is used for registration. + * Returns the name of the peer that registered. The peer's name starts with "IAX2/" if it is an + * IAX client or "SIP/" if it is a SIP client. It is followed by the username that is used for + * registration. */ public String getPeer() { @@ -52,13 +66,13 @@ public class PeerStatusEvent extends Man * Returns the registration state.<br> * This may be one of * <ul> - * <li>Registered</li> - * <li>Unregistered</li> - * <li>Reachable</li> - * <li>Lagged</li> - * <li>Rejected (IAX only)</li> - * <li>Unreachable</li> - * </ul> + * <li>Registered</li> + * <li>Unregistered</li> + * <li>Reachable</li> + * <li>Lagged</li> + * <li>Rejected (IAX only)</li> + * <li>Unreachable</li> + * </ul> */ public String getPeerStatus() { @@ -76,9 +90,8 @@ public class PeerStatusEvent extends Man /** * Returns the cause of a rejection or unregistration.<br> * For IAX peers this is set only if the status equals "Rejected".<br> - * For SIP peers this is set if the status equals "Unregistered" and the - * peer was unregistered due to an expiration. In that case the cause is set - * to "Expired". + * For SIP peers this is set if the status equals "Unregistered" and the peer was unregistered + * due to an expiration. In that case the cause is set to "Expired". */ public String getCause() { @@ -94,9 +107,9 @@ public class PeerStatusEvent extends Man } /** - * Returns the ping time of the client if status equals "Reachable" or "Lagged"; if - * the status equals "Unreachable" it returns how long the last response took - * (in ms) for IAX peers or -1 for SIP peers. + * Returns the ping time of the client if status equals "Reachable" or "Lagged"; if the status + * equals "Unreachable" it returns how long the last response took (in ms) for IAX peers or -1 + * for SIP peers. */ public Integer getTime() { Index: OriginateSuccessEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/OriginateSuccessEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- OriginateSuccessEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ OriginateSuccessEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,23 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** - * An OriginateSuccessEvent is triggered when the execution of an OriginateAction - * succeeded. + * An OriginateSuccessEvent is triggered when the execution of an OriginateAction succeeded. * * @see net.sf.asterisk.manager.action.OriginateAction * @@ -16,6 +26,9 @@ package net.sf.asterisk.manager.event; */ public class OriginateSuccessEvent extends OriginateEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -5086668438614692086L; /** Index: AgentCallbackLogoffEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentCallbackLogoffEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AgentCallbackLogoffEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ AgentCallbackLogoffEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** - * An AgentCallbackLogoffEvent is triggered when an agent that previously logged in - * using AgentCallbackLogin is logged of.<br> + * An AgentCallbackLogoffEvent is triggered when an agent that previously logged in using + * AgentCallbackLogin is logged of.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentCallbackLoginEvent @@ -16,6 +27,9 @@ package net.sf.asterisk.manager.event; */ public class AgentCallbackLogoffEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 8458799161502800576L; private String agent; private String loginChan; @@ -68,11 +82,9 @@ public class AgentCallbackLogoffEvent ex } /** - * Returns the reason for the logoff. - * The reason is set to Autologoff if the agent has been logged off due to not - * answering the phone in time. - * Autologoff is configured by setting <code>autologoff</code> to the appropriate - * number of seconds in <code>agents.conf</code>. + * Returns the reason for the logoff. The reason is set to Autologoff if the agent has been + * logged off due to not answering the phone in time. Autologoff is configured by setting + * <code>autologoff</code> to the appropriate number of seconds in <code>agents.conf</code>. */ public String getReason() { Index: QueueParamsEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/QueueParamsEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- QueueParamsEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ QueueParamsEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** - * A QueueParamsEvent is triggered in response to a QueueStatusAction and contains - * the parameters of a queue.<br> + * A QueueParamsEvent is triggered in response to a QueueStatusAction and contains the parameters of + * a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction @@ -17,6 +28,9 @@ package net.sf.asterisk.manager.event; */ public class QueueParamsEvent extends ResponseEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -170511596914604717L; private String queue; private Integer max; @@ -133,8 +147,8 @@ public class QueueParamsEvent extends Re } /** - * Returns the service level (in seconds) as defined by the - * <code>servicelevel</code> setting in <code>queues.conf</code>. + * Returns the service level (in seconds) as defined by the <code>servicelevel</code> setting + * in <code>queues.conf</code>. */ public Integer getServiceLevel() { @@ -150,8 +164,8 @@ public class QueueParamsEvent extends Re } /** - * Returns the ratio of calls answered within the specified service level - * per total completed calls (in percent). + * Returns the ratio of calls answered within the specified service level per total completed + * calls (in percent). */ public Double getServiceLevelPerf() { @@ -159,8 +173,8 @@ public class QueueParamsEvent extends Re } /** - * Sets the ratio of calls answered within the specified service level - * per total completed calls. + * Sets the ratio of calls answered within the specified service level per total completed + * calls. */ public void setServiceLevelPerf(Double serviceLevelPerf) { Index: DisconnectEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/DisconnectEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- DisconnectEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ DisconnectEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.event; */ public class DisconnectEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 3689355411862206518L; /** Index: StatusEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/StatusEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- StatusEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ StatusEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,23 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** - * A StatusEvent is triggered for each active channel in response to a - * StatusAction. + * A StatusEvent is triggered for each active channel in response to a StatusAction. * * @see net.sf.asterisk.manager.action.StatusAction * @@ -16,6 +26,9 @@ package net.sf.asterisk.manager.event; */ public class StatusEvent extends ResponseEvent { + /** + * Serial version identifier + */ private static final long serialVersionUID = -3619197512835308812L; private String channel; private String callerId; Index: ChannelEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/ChannelEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ChannelEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ChannelEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,19 +1,33 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** - * Abstract base class providing common properties for - * HangupEvent, NewChannelEvent and NewStateEvent. + * Abstract base class providing common properties for HangupEvent, NewChannelEvent and + * NewStateEvent. * * @author srt * @version $Id$ */ public abstract class ChannelEvent extends ManagerEvent { + /** + * Serializable version identifier + */ static final long serialVersionUID = 5906599407896179295L; private String channel; @@ -81,13 +95,13 @@ public abstract class ChannelEvent exten * Returns the (new) state of the channel.<br> * The following states are used:<br> * <ul> - * <li>Down</li> - * <li>OffHook</li> - * <li>Dialing</li> - * <li>Ring</li> - * <li>Ringing</li> - * <li>Up</li> - * <li>Busy</li> + * <li>Down</li> + * <li>OffHook</li> + * <li>Dialing</li> + * <li>Ring</li> + * <li>Ringing</li> + * <li>Up</li> + * <li>Busy</li> * <ul> */ public String getState() Index: AgentLoginEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentLoginEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AgentLoginEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ AgentLoginEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,23 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** - * An AgentLoginEvent is triggered when an agent is successfully - * logged in using AgentLogin.<br> + * An AgentLoginEvent is triggered when an agent is successfully logged in using AgentLogin.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentLogoffEvent @@ -16,6 +26,9 @@ package net.sf.asterisk.manager.event; */ public class AgentLoginEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 7125917930904957919L; private String agent; private String loginChan; Index: QueueMemberEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/QueueMemberEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- QueueMemberEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ QueueMemberEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** - * A QueueMemberEvent is triggered in response to a QueueStatusAction and contains - * information about a member of a queue.<br> + * A QueueMemberEvent is triggered in response to a QueueStatusAction and contains information about + * a member of a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction @@ -17,6 +28,9 @@ package net.sf.asterisk.manager.event; */ public class QueueMemberEvent extends ResponseEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -2293926744791895763L; private String queue; private String location; @@ -67,9 +81,9 @@ public class QueueMemberEvent extends Re } /** - * Returns "dynamic" if this member has been dynamically added by the - * QueueAdd command (in the dialplan or via the manager api) or "static" - * if this member is has been statically defined in <code>queues.conf</code>. + * Returns "dynamic" if this member has been dynamically added by the QueueAdd command (in the + * dialplan or via the manager api) or "static" if this member is has been statically defined in + * <code>queues.conf</code>. */ public String getMembership() { @@ -78,7 +92,8 @@ public class QueueMemberEvent extends Re /** * Sets if this member has been dynamically or statically added. - * @param membership either "dynamic" or "static". + * + * @param membership either "dynamic" or "static". */ public void setMembership(String membership) { @@ -118,8 +133,8 @@ public class QueueMemberEvent extends Re } /** - * Returns the time (in seconds since 01/01/1970) the last successful call - * answered by this member was hungup. + * Returns the time (in seconds since 01/01/1970) the last successful call answered by this + * member was hungup. */ public Long getLastCall() { @@ -127,8 +142,8 @@ public class QueueMemberEvent extends Re } /** - * Sets the time (in seconds since 01/01/1970) the last successful call - * answered by this member was hungup. + * Sets the time (in seconds since 01/01/1970) the last successful call answered by this member + * was hungup. */ public void setLastCall(Long lastCall) { Index: NewChannelEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/NewChannelEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- NewChannelEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ NewChannelEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.event; */ public class NewChannelEvent extends ChannelEvent { + /** + * Serializable version identifier + */ static final long serialVersionUID = -4503396901506287549L; /** Index: HoldedCallEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/HoldedCallEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- HoldedCallEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ HoldedCallEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.event; */ public class HoldedCallEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 7384290590382334480L; private String uniqueId1; private String uniqueId2; @@ -69,7 +83,7 @@ public class HoldedCallEvent extends Man } /** - * Sets the name of the channel that put the other channel on hold. + * Sets the name of the channel that put the other channel on hold. */ public void setChannel1(String channel1) { Index: OriginateFailureEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/OriginateFailureEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- OriginateFailureEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ OriginateFailureEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,23 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** - * An OriginateFailureEvent is triggered when the execution of an OriginateAction - * failed. + * An OriginateFailureEvent is triggered when the execution of an OriginateAction failed. * * @see net.sf.asterisk.manager.action.OriginateAction * @@ -16,6 +26,9 @@ package net.sf.asterisk.manager.event; */ public class OriginateFailureEvent extends OriginateEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -6812199688948480631L; /** Index: MeetMeJoinEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/MeetMeJoinEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MeetMeJoinEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ MeetMeJoinEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,19 +1,33 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A MeetMeJoinEvent is triggered if a channel joins a meet me conference.<br> - * It is implemented in <code>apps/app_meetme.c</code> + * It is implemented in <code>apps/app_meetme.c</code> * * @author srt * @version $Id$ */ public class MeetMeJoinEvent extends MeetMeEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -8554403451985143184L; /** Index: AgentLogoffEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentLogoffEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AgentLogoffEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ AgentLogoffEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** - * An AgentCallbackLogoffEvent is triggered when an agent that previously logged in - * using AgentLogin is logged of.<br> + * An AgentCallbackLogoffEvent is triggered when an agent that previously logged in using AgentLogin + * is logged of.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentLoginEvent @@ -16,6 +27,9 @@ package net.sf.asterisk.manager.event; */ public class AgentLogoffEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -3482474719161350942L; private String agent; private String loginChan; Index: ZapShowChannelsEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/ZapShowChannelsEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ZapShowChannelsEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ZapShowChannelsEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 30, 2004 */ package net.sf.asterisk.manager.event; /** - * A ZapShowChannelsEvent is triggered in response to a ZapShowChannelsAction and - * shows the state of a zap channel. + * A ZapShowChannelsEvent is triggered in response to a ZapShowChannelsAction and shows the state of + * a zap channel. * * @see net.sf.asterisk.manager.action.ZapShowChannelsAction * @@ -16,6 +27,9 @@ package net.sf.asterisk.manager.event; */ public class ZapShowChannelsEvent extends ResponseEvent { + /** + * Serial version identifier + */ private static final long serialVersionUID = -3613642267527361400L; private Integer channel; private String signalling; @@ -50,29 +64,29 @@ public class ZapShowChannelsEvent extend * Returns the signalling of this zap channel.<br> * Possible values are: * <ul> - * <li>E & M Immediate</li> - * <li>E & M Wink</li> - * <li>E & M E1</li> - * <li>Feature Group D (DTMF)</li> - * <li>Feature Group D (MF)</li> - * <li>Feature Group B (MF)</li> - * <li>E911 (MF)</li> - * <li>FXS Loopstart</li> - * <li>FXS Groundstart</li> - * <li>FXS Kewlstart</li> - * <li>FXO Loopstart</li> - * <li>FXO Groundstart</li> - * <li>FXO Kewlstart</li> - * <li>PRI Signalling</li> - * <li>R2 Signalling</li> - * <li>SF (Tone) Signalling Immediate</li> - * <li>SF (Tone) Signalling Wink</li> - * <li>SF (Tone) Signalling with Feature Group D (DTMF)</li> - * <li>SF (Tone) Signalling with Feature Group D (MF)</li> - * <li>SF (Tone) Signalling with Feature Group B (MF)</li> - * <li>GR-303 Signalling with FXOKS</li> - * <li>GR-303 Signalling with FXSKS</li> - * <li>Pseudo Signalling</li> + * <li>E & M Immediate</li> + * <li>E & M Wink</li> + * <li>E & M E1</li> + * <li>Feature Group D (DTMF)</li> + * <li>Feature Group D (MF)</li> + * <li>Feature Group B (MF)</li> + * <li>E911 (MF)</li> + * <li>FXS Loopstart</li> + * <li>FXS Groundstart</li> + * <li>FXS Kewlstart</li> + * <li>FXO Loopstart</li> + * <li>FXO Groundstart</li> + * <li>FXO Kewlstart</li> + * <li>PRI Signalling</li> + * <li>R2 Signalling</li> + * <li>SF (Tone) Signalling Immediate</li> + * <li>SF (Tone) Signalling Wink</li> + * <li>SF (Tone) Signalling with Feature Group D (DTMF)</li> + * <li>SF (Tone) Signalling with Feature Group D (MF)</li> + * <li>SF (Tone) Signalling with Feature Group B (MF)</li> + * <li>GR-303 Signalling with FXOKS</li> + * <li>GR-303 Signalling with FXSKS</li> + * <li>Pseudo Signalling</li> * </ul> */ public String getSignalling() @@ -89,8 +103,7 @@ public class ZapShowChannelsEvent extend } /** - * Returns the context of this zap channel as defined in - * <code>zapata.conf</code>. + * Returns the context of this zap channel as defined in <code>zapata.conf</code>. */ public String getContext() { @@ -109,13 +122,13 @@ public class ZapShowChannelsEvent extend * Returns the alarm state of this zap channel.<br> * This may be one of * <ul> - * <li>Red Alarm</li> - * <li>Yellow Alarm</li> - * <li>Blue Alarm</li> - * <li>Recovering</li> - * <li>Loopback</li> - * <li>Not Open</li> - * <li>No Alarm</li> + * <li>Red Alarm</li> + * <li>Yellow Alarm</li> + * <li>Blue Alarm</li> + * <li>Recovering</li> + * <li>Loopback</li> + * <li>Not Open</li> + * <li>No Alarm</li> * </ul> */ public String getAlarm() Index: AgentCalledEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentCalledEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AgentCalledEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ AgentCalledEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,14 +1,25 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCalledEvent is triggered when an agent is rung.<br> - * To enable AgentCalledEvents you have to set <code>eventwhencalled = yes</code> - * in <code>queues.conf</code>.<br> + * To enable AgentCalledEvents you have to set <code>eventwhencalled = yes</code> in + * <code>queues.conf</code>.<br> * This event is implemented in <code>apps/app_queue.c</code> * * @author srt @@ -16,6 +27,9 @@ package net.sf.asterisk.manager.event; */ public class AgentCalledEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -8736410893935374606L; private String agentCalled; private String channelCalling; Index: ReloadEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/ReloadEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ReloadEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ReloadEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** - * A ReloadEvent is triggerd when the <code>reload</code> console command is executed - * or the asterisk server is started.<br> + * A ReloadEvent is triggerd when the <code>reload</code> console command is executed or the + * asterisk server is started.<br> * It is implemented in <code>manager.c</code> * * @author srt @@ -15,6 +26,9 @@ package net.sf.asterisk.manager.event; */ public class ReloadEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 7503005587022499819L; private String message; Index: QueueEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/QueueEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- QueueEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ QueueEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.event; */ public abstract class QueueEvent extends ManagerEvent { + /** + * Serializable version identifier + */ static final long serialVersionUID = -8554382298783676181L; private String channel; @@ -44,8 +58,8 @@ public abstract class QueueEvent extends } /** - * Returns the number of elements in the queue, i.e. the number of calls waiting - * to be answered by an agent. + * Returns the number of elements in the queue, i.e. the number of calls waiting to be answered + * by an agent. */ public Integer getCount() { Index: MeetMeLeaveEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/MeetMeLeaveEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MeetMeLeaveEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ MeetMeLeaveEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,19 +1,33 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A MeetMeLeaveEvent is triggered if a channel leaves a meet me conference.<br> - * It is implemented in <code>apps/app_meetme.c</code> + * It is implemented in <code>apps/app_meetme.c</code> * * @author srt * @version $Id$ */ public class MeetMeLeaveEvent extends MeetMeEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 7692361610793036224L; /** Index: MessageWaitingEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/MessageWaitingEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MessageWaitingEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ MessageWaitingEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Aug 28, 2004 */ package net.sf.asterisk.manager.event; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.event; */ public class MessageWaitingEvent extends ManagerEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 7014587245968686266L; private String mailbox; private Integer waiting; @@ -29,6 +43,7 @@ public class MessageWaitingEvent extends /** * Returns the name of the mailbox that has waiting messages.<br> * The name of the mailbox is of the form numberOfMailbox@context, e.g. 1234@default. + * * @return the name of the mailbox that has waiting messages */ public String getMailbox() @@ -38,6 +53,7 @@ public class MessageWaitingEvent extends /** * Sets the name of the mailbox that has waiting messages. + * * @param mailbox the name of the mailbox that has waiting messages */ public void setMailbox(String mailbox) @@ -47,6 +63,7 @@ public class MessageWaitingEvent extends /** * Returns the number of new messages in the mailbox. + * * @return the number of new messages in the mailbox */ public Integer getWaiting() @@ -56,6 +73,7 @@ public class MessageWaitingEvent extends /** * Sets the number of new messages in the mailbox. + * * @param waiting the number of new messages in the mailbox */ public void setWaiting(Integer waiting) Index: ResponseEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/ResponseEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ResponseEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ResponseEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,14 +1,25 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class for events triggered in response to an Action.<br> - * All ResponseEvents contain an additional action id property that links - * the event to the action that caused it. + * All ResponseEvents contain an additional action id property that links the event to the action + * that caused it. * * @see net.sf.asterisk.manager.action.ManagerAction * @@ -28,8 +39,7 @@ public abstract class ResponseEvent exte } /** - * Returns the action id of the corresponding ManagerAction that - * caused this event. + * Returns the action id of the corresponding ManagerAction that caused this event. */ public String getActionId() { @@ -37,8 +47,7 @@ public abstract class ResponseEvent exte } /** - * Sets the action id of the corresponding ManagerAction that - * caused this event. + * Sets the action id of the corresponding ManagerAction that caused this event. */ public void setActionId(String actionId) { Index: UnlinkEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/UnlinkEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- UnlinkEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ UnlinkEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** - * An UnlinkEvent is triggered when a link between two voice channels is - * discontinued, for example, just before call completion.<br> + * An UnlinkEvent is triggered when a link between two voice channels is discontinued, for example, + * just before call completion.<br> * It is implemented in <code>channel.c</code> * * @author srt @@ -15,6 +26,9 @@ package net.sf.asterisk.manager.event; */ public class UnlinkEvent extends LinkageEvent { + /** + * Serial version identifier + */ static final long serialVersionUID = -2943257621137870024L; /** Index: ParkedCallsCompleteEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/ParkedCallsCompleteEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ParkedCallsCompleteEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ParkedCallsCompleteEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** - * A ParkedCallsCompleteEvent is triggered after all parked calls have been - * reported in response to a ParkedCallsAction. + * A ParkedCallsCompleteEvent is triggered after all parked calls have been reported in response to + * a ParkedCallsAction. * * @see net.sf.asterisk.manager.action.ParkedCallsAction * @see net.sf.asterisk.manager.event.ParkedCallEvent @@ -17,6 +28,9 @@ package net.sf.asterisk.manager.event; */ public class ParkedCallsCompleteEvent extends ResponseEvent { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -2736388036245367249L; /** Index: ZapShowChannelsCompleteEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/ZapShowChannelsCompleteEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ZapShowChannelsCompleteEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ZapShowChannelsCompleteEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** - * A ZapShowChannelsCompleteEvent is triggered after the state of all zap channels has - * been reported in response to a ZapShowChannelsAction. + * A ZapShowChannelsCompleteEvent is triggered after the state of all zap channels has been reported + * in response to a ZapShowChannelsAction. * * @see net.sf.asterisk.manager.action.ZapShowChannelsAction * @see net.sf.asterisk.manager.event.ZapShowChannelsEvent @@ -17,6 +28,9 @@ package net.sf.asterisk.manager.event; */ public class ZapShowChannelsCompleteEvent extends ResponseEvent { + /** + * Serial version identifier + */ private static final long serialVersionUID = 6323249250335886462L; /** Index: RenameEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/RenameEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- RenameEvent.java 23 Feb 2005 12:45:22 -0000 1.1 +++ RenameEvent.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASI... [truncated message content] |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21466/src/java/net/sf/asterisk/manager/action Modified Files: SetCDRUserFieldAction.java ZapTransferAction.java StopMonitorAction.java PingAction.java ParkedCallsAction.java ZapShowChannelsAction.java QueueAddAction.java RedirectAction.java LogoffAction.java OriginateAction.java AbsoluteTimeoutAction.java ZapDNDOffAction.java ManagerAction.java MonitorAction.java QueueStatusAction.java ChangeMonitorAction.java MailboxCountAction.java ChallengeAction.java ZapDNDOnAction.java StatusAction.java EventsAction.java GetVarAction.java ZapDialOffhookAction.java MailboxStatusAction.java QueueRemoveAction.java ExtensionStateAction.java HangupAction.java LoginAction.java CommandAction.java ZapHangupAction.java Log Message: added license header Index: SetCDRUserFieldAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/SetCDRUserFieldAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- SetCDRUserFieldAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ SetCDRUserFieldAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,15 +1,25 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** - * The SetCDRUserFieldAction causes the user field of the call detail record - * for the given channel to be changed.<br> - * Depending on the value of the append property the value is appended or - * overwritten.<br> + * The SetCDRUserFieldAction causes the user field of the call detail record for the given channel + * to be changed.<br> + * Depending on the value of the append property the value is appended or overwritten.<br> * The SetCDRUserFieldAction is implemented in <code>apps/app_setcdruserfield.c</code> * * @author srt @@ -17,6 +27,9 @@ package net.sf.asterisk.manager.action; */ public class SetCDRUserFieldAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -2024074141079750509L; private String channel; private String userField; @@ -73,8 +86,7 @@ public class SetCDRUserFieldAction exten } /** - * Set to true to append the value to the cdr user field or false to - * overwrite. + * Set to true to append the value to the cdr user field or false to overwrite. */ public void setAppend(Boolean append) { Index: ZapTransferAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ZapTransferAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ZapTransferAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ZapTransferAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.action; */ public class ZapTransferAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -2802091639000800786L; private Integer zapChannel; Index: StopMonitorAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/StopMonitorAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- StopMonitorAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ StopMonitorAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.action; */ public class StopMonitorAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -6316010713240389305L; private String channel; private String file; Index: PingAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/PingAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- PingAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ PingAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,19 +1,33 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** - * The PingAction will ellicit a 'Pong' response, it is used to keep the - * manager connection open and performs no operation. + * The PingAction will ellicit a 'Pong' response, it is used to keep the manager connection open and + * performs no operation. * * @author srt * @version $Id$ */ public class PingAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -2930397629192323391L; /** Index: ParkedCallsAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ParkedCallsAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ParkedCallsAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ParkedCallsAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,14 +1,25 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ParkedCallsAction requests a list of all currently parked calls.<br> - * For each active channel a ParkedCallEvent is generated. After all parked calls - * have been reported a ParkedCallsCompleteEvent is generated. + * For each active channel a ParkedCallEvent is generated. After all parked calls have been reported + * a ParkedCallsCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.ParkedCallEvent * @see net.sf.asterisk.manager.event.ParkedCallsCompleteEvent @@ -18,6 +29,9 @@ package net.sf.asterisk.manager.action; */ public class ParkedCallsAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 1859575016378824743L; /** Index: ZapShowChannelsAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ZapShowChannelsAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ZapShowChannelsAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ZapShowChannelsAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,14 +1,25 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapShowChannelsAction requests the state of all zap channels.<br> - * For each zap channel a ZapShowChannelsEvent is generated. After - * all zap channels have been listed a ZapShowChannelsCompleteEvent is generated. + * For each zap channel a ZapShowChannelsEvent is generated. After all zap channels have been listed + * a ZapShowChannelsCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.ZapShowChannelsEvent * @see net.sf.asterisk.manager.event.ZapShowChannelsCompleteEvent @@ -18,6 +29,9 @@ package net.sf.asterisk.manager.action; */ public class ZapShowChannelsAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 8697000330085766825L; /** Index: QueueAddAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/QueueAddAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- QueueAddAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ QueueAddAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.action; */ public class QueueAddAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -7022129266332219953L; private String queue; private String iface; @@ -72,8 +86,7 @@ public class QueueAddAction extends Mana /** * Sets the penality for this member.<br> - * The penality must be a positive integer or 0 for no penality. If it is not set - * 0 is assumed.<br> + * The penality must be a positive integer or 0 for no penality. If it is not set 0 is assumed.<br> * When calls are distributed members with higher penalties are considered last. */ public void setPenality(Integer penality) Index: RedirectAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/RedirectAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- RedirectAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ RedirectAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -11,6 +22,9 @@ package net.sf.asterisk.manager.action; */ public class RedirectAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = 1869279324159418150L; private String channel; Index: LogoffAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/LogoffAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- LogoffAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ LogoffAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.action; */ public class LogoffAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = -7576797478570238525L; /** Index: OriginateAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/OriginateAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- OriginateAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ OriginateAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,28 +1,37 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** - * The OriginateAction generates an outgoing call to the extension - * in the given context with the given priority or to a given - * application with optional parameters.<br> + * The OriginateAction generates an outgoing call to the extension in the given context with the + * given priority or to a given application with optional parameters.<br> * - * If you want to connect to an extension use the properties context, exten and - * priority. If you want to connect to an application use the properties - * application and data if needed. Note that no call detail record will be written when - * directly connecting to an application, so it may be better to connect to an - * extension that starts the application you wish to connect to.<br> - * - * The response to this action is sent when the channel has been answered and - * asterisk starts connecting it to the given extension. So be careful not - * to choose a too short timeout when waiting for the response.<br> + * If you want to connect to an extension use the properties context, exten and priority. If you + * want to connect to an application use the properties application and data if needed. Note that no + * call detail record will be written when directly connecting to an application, so it may be + * better to connect to an extension that starts the application you wish to connect to.<br> * - * If the origination succeeds an OriginateSuccessEvent is generated, if it - * fails an OriginateFailureEvent is generated. The action id of these events - * equals the action id of this OriginateAction. + * The response to this action is sent when the channel has been answered and asterisk starts + * connecting it to the given extension. So be careful not to choose a too short timeout when + * waiting for the response.<br> + * + * If the origination succeeds an OriginateSuccessEvent is generated, if it fails an + * OriginateFailureEvent is generated. The action id of these events equals the action id of this + * OriginateAction. * * @see net.sf.asterisk.manager.event.OriginateSuccessEvent * @see net.sf.asterisk.manager.event.OriginateFailureEvent @@ -32,7 +41,10 @@ package net.sf.asterisk.manager.action; */ public class OriginateAction extends ManagerAction { - static final long serialVersionUID = 8194597741743334704L; + /** + * Serializable version identifier + */ + static final long serialVersionUID = 8194597741743334704L; private String channel; private String exten; @@ -65,8 +77,8 @@ public class OriginateAction extends Man /** * Sets the account code to use for the originated call.<br> - * The account code is included in the call detail record generated for this - * call and will be used for billing. + * The account code is included in the call detail record generated for this call and will be + * used for billing. */ public void setAccount(String account) { @@ -98,7 +110,8 @@ public class OriginateAction extends Man } /** - * Set to <code>true</code> if you want Caller ID presentation to be set on the outgoing channel. + * Set to <code>true</code> if you want Caller ID presentation to be set on the outgoing + * channel. */ public void setCallingPres(Boolean callingPres) { @@ -132,8 +145,7 @@ public class OriginateAction extends Man /** * Sets the name of the context of the extension to connect to.<br> - * If you set the context you also have to set the exten and - * priority properties. + * If you set the context you also have to set the exten and priority properties. */ public void setContext(String context) { @@ -150,8 +162,7 @@ public class OriginateAction extends Man /** * Sets the extension to connect to.<br> - * If you set the extension you also have to set the context and - * priority properties. + * If you set the extension you also have to set the context and priority properties. */ public void setExten(String exten) { @@ -167,9 +178,8 @@ public class OriginateAction extends Man } /** - * Sets the priority of the extension to connect to. - * If you set the priority you also have to set the context and - * exten properties. + * Sets the priority of the extension to connect to. If you set the priority you also have to + * set the context and exten properties. */ public void setPriority(Integer priority) { @@ -218,8 +228,8 @@ public class OriginateAction extends Man /** * Sets the timeout (in milliseconds) for the origination.<br> - * The channel must be answered within this time, otherwise the origination - * is considered to have failed and an OriginateFailureEvent is generated.<br> + * The channel must be answered within this time, otherwise the origination is considered to + * have failed and an OriginateFailureEvent is generated.<br> * If not set, asterisk assumes a default value of 30000 meaning 30 seconds. */ public void setTimeout(Integer timeout) @@ -237,10 +247,9 @@ public class OriginateAction extends Man /** * Sets the variables to set on the originated call.<br> - * Variable assignments are of the form "VARNAME=VALUE". - * You can specify multiple variable assignments separated by the '|' character.<br> - * Example: "VAR1=abc|VAR2=def" sets the channel variables VAR1 to "abc" and - * VAR2 to "def". + * Variable assignments are of the form "VARNAME=VALUE". You can specify multiple variable + * assignments separated by the '|' character.<br> + * Example: "VAR1=abc|VAR2=def" sets the channel variables VAR1 to "abc" and VAR2 to "def". */ public void setVariable(String variable) { Index: AbsoluteTimeoutAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/AbsoluteTimeoutAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AbsoluteTimeoutAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ AbsoluteTimeoutAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,19 +1,29 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** - * The AbsoluteTimeoutAction sets the absolute maximum amount of time permitted - * for a call on a given channel.<br> - * Note that the timeout is set from the current time forward, not counting the - * number of seconds the call has already been up.<br> + * The AbsoluteTimeoutAction sets the absolute maximum amount of time permitted for a call on a + * given channel.<br> + * Note that the timeout is set from the current time forward, not counting the number of seconds + * the call has already been up.<br> * When setting a new timeout all previous absolute timeouts are cancelled.<br> - * When the timeout is reached the call is returned to the T extension so that - * you can playback an explanatory note to the calling party (the called - * party will not hear that).<br> + * When the timeout is reached the call is returned to the T extension so that you can playback an + * explanatory note to the calling party (the called party will not hear that).<br> * This action corresponds the the AbsoluteTimeout command used in the dialplan. * * @author srt @@ -21,6 +31,9 @@ package net.sf.asterisk.manager.action; */ public class AbsoluteTimeoutAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = 3073237188819825503L; private String channel; Index: ZapDNDOffAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ZapDNDOffAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ZapDNDOffAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ZapDNDOffAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.action; */ public class ZapDNDOffAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 6596440995467988436L; private Integer zapChannel; Index: ManagerAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ManagerAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ManagerAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ManagerAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -13,19 +24,20 @@ import org.apache.commons.lang.builder.T import org.apache.commons.lang.builder.ToStringStyle; /** - * Abstract base class for all Actions that can be sent to the Asterisk - * server.<br> - * Instances of this class represent a command sent to Asterisk, requesting - * a particular Action be performed. The number of actions available to the client - * are determined by the modules presently loaded in the Asterisk engine.<br> - * There is one conrete subclass of ManagerAction per each supported Asterisk - * Action. + * Abstract base class for all Actions that can be sent to the Asterisk server.<br> + * Instances of this class represent a command sent to Asterisk, requesting a particular Action be + * performed. The number of actions available to the client are determined by the modules presently + * loaded in the Asterisk engine.<br> + * There is one conrete subclass of ManagerAction per each supported Asterisk Action. * * @author srt * @version $Id$ */ public abstract class ManagerAction implements Serializable { + /** + * Serializable version identifier + */ static final long serialVersionUID = -7667827187378395689L; private String actionId; @@ -45,9 +57,9 @@ public abstract class ManagerAction impl /** * Sets the action id.<br> - * If the action id is set and sent to the asterisk server any response returned by - * the asterisk server will include the same action id. This way the action id can - * be used to track actions and their corresponding responses. + * If the action id is set and sent to the asterisk server any response returned by the asterisk + * server will include the same action id. This way the action id can be used to track actions + * and their corresponding responses. */ public void setActionId(String actionId) { Index: MonitorAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/MonitorAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MonitorAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ MonitorAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.action; */ public class MonitorAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 6840975934278794758L; private String channel; private String file; @@ -55,8 +69,8 @@ public class MonitorAction extends Manag /** * Sets the (base) name of the file(s) to which the voice data is written.<br> - * If this property is not set it defaults to to the channel name as per CLI - * with the '/' replaced by '-'. + * If this property is not set it defaults to to the channel name as per CLI with the '/' + * replaced by '-'. */ public void setFile(String file) { Index: QueueStatusAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/QueueStatusAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- QueueStatusAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ QueueStatusAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,20 +1,29 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** - * The QueueStatusAction requests the state of all defined queues their - * members (agents) and entries (callers).<br> + * The QueueStatusAction requests the state of all defined queues their members (agents) and entries + * (callers).<br> * - * For each queue a QueueParamsEvent is generated, followed by - * a QueueMemberEvent for each member of that queue and a QueueEntryEvent - * for each entry in the queue.<br> + * For each queue a QueueParamsEvent is generated, followed by a QueueMemberEvent for each member of + * that queue and a QueueEntryEvent for each entry in the queue.<br> * - * Note: Currently asterisk does not send a special event to denote the end of the - * generated dump.<br> + * Note: Currently asterisk does not send a special event to denote the end of the generated dump.<br> * * This action is implemented in <code>apps/app_queue.c</code> * @@ -27,6 +36,9 @@ package net.sf.asterisk.manager.action; */ public class QueueStatusAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -8599401015517232869L; /** Index: ChangeMonitorAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ChangeMonitorAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ChangeMonitorAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ChangeMonitorAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** - * The ChangeMonitorAction changes the monitoring filename of a channel. - * It has no effect if the channel is not monitored.<br> + * The ChangeMonitorAction changes the monitoring filename of a channel. It has no effect if the + * channel is not monitored.<br> * It is implemented in <code>res/res_monitor.c</code> * * @author srt @@ -15,6 +26,9 @@ package net.sf.asterisk.manager.action; */ public class ChangeMonitorAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -798530703607827118L; private String channel; private String file; Index: MailboxCountAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/MailboxCountAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MailboxCountAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ MailboxCountAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -6,17 +6,19 @@ package net.sf.asterisk.manager.action; /** - * The MailboxCountAction queries the number of unread and read messages - * in a mailbox.<br> + * The MailboxCountAction queries the number of unread and read messages in a mailbox.<br> * The MailboxCountAction returns a MailboxStatusResponse. - * + * * @see net.sf.asterisk.manager.response.MailboxCountResponse - * + * * @author srt * @version $Id$ */ public class MailboxCountAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = -6900421919824575941L; private String mailbox; @@ -39,9 +41,8 @@ public class MailboxCountAction extends /** * Sets the name of the mailbox to query.<br> - * This can either be only the number of the mailbox or a string of the - * form mailboxnumber@context.If no context is specified "default" is - * assumed.<br> + * This can either be only the number of the mailbox or a string of the form + * mailboxnumber@context.If no context is specified "default" is assumed.<br> * This property is mandatory. */ public void setMailbox(String mailbox) Index: ChallengeAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ChallengeAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ChallengeAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ChallengeAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,14 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** - * The ChallengeAction requests a challenge from the server to use when logging in - * using challenge/response. - * Sending this action to the asterisk server results in a ChallengeResponse + * The ChallengeAction requests a challenge from the server to use when logging in using + * challenge/response. Sending this action to the asterisk server results in a ChallengeResponse * being received from the server. * * @see net.sf.asterisk.manager.action.LoginAction @@ -19,6 +29,9 @@ package net.sf.asterisk.manager.action; */ public class ChallengeAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = 7240516124871953971L; private String authType; @@ -39,8 +52,7 @@ public class ChallengeAction extends Man } /** - * Sets the digest alogrithm to use. - * Currently asterisk only supports "MD5". + * Sets the digest alogrithm to use. Currently asterisk only supports "MD5". */ public void setAuthType(String authType) { Index: ZapDNDOnAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ZapDNDOnAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ZapDNDOnAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ZapDNDOnAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.action; */ public class ZapDNDOnAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -4669362344411680132L; private Integer zapChannel; Index: StatusAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/StatusAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- StatusAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ StatusAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,14 +1,25 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The StatusAction requests the state of all active channels.<br> - * For each active channel a StatusEvent is generated. After the state - * of all channels has been reported a StatusCompleteEvent is generated. + * For each active channel a StatusEvent is generated. After the state of all channels has been + * reported a StatusCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.StatusEvent * @see net.sf.asterisk.manager.event.StatusCompleteEvent @@ -18,6 +29,9 @@ package net.sf.asterisk.manager.action; */ public class StatusAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = -320228893513973367L; /** Index: EventsAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/EventsAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- EventsAction.java 23 Feb 2005 12:45:21 -0000 1.1 +++ EventsAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,19 +1,33 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** - * With the EventsAction you can specify what kind of events should be sent - * to this manager connection. + * With the EventsAction you can specify what kind of events should be sent to this manager + * connection. * * @author srt * @version $Id$ */ public class EventsAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = -8042435402644984875L; private String eventMask; @@ -36,9 +50,9 @@ public class EventsAction extends Manage /** * Sets the event mask.<br> - * Set to "on" if all events should be send, "off" if not events should be sent - * or a combination of "system", "call" and "log" (separated by ',') to specify - * what kind of events should be sent. + * Set to "on" if all events should be send, "off" if not events should be sent or a combination + * of "system", "call" and "log" (separated by ',') to specify what kind of events should be + * sent. */ public void setEventMask(String eventMask) { Index: GetVarAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/GetVarAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- GetVarAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ GetVarAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.action; */ public class GetVarAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 5239805071977668779L; private String channel; private String variable; Index: ZapDialOffhookAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ZapDialOffhookAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ZapDialOffhookAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ZapDialOffhookAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.action; */ public class ZapDialOffhookAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -4708738122184810899L; private Integer zapChannel; private String number; Index: MailboxStatusAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/MailboxStatusAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MailboxStatusAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ MailboxStatusAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -16,6 +27,9 @@ package net.sf.asterisk.manager.action; */ public class MailboxStatusAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = -3845028207155711950L; private String mailbox; @@ -38,12 +52,10 @@ public class MailboxStatusAction extends /** * Sets the name of the mailbox to query.<br> - * This can either be only the number of the mailbox or a string of the - * form mailboxnumber@context. If no context is specified "default" is - * assumed.<br> - * Multiple mailboxes may be given, separated by ','. In this case the - * action checks whether at least one of the given mailboxes has waiting - * messages.<br> + * This can either be only the number of the mailbox or a string of the form + * mailboxnumber@context. If no context is specified "default" is assumed.<br> + * Multiple mailboxes may be given, separated by ','. In this case the action checks whether at + * least one of the given mailboxes has waiting messages.<br> * This property is mandatory.<br> * Example: "1234,1235@mycontext" */ Index: QueueRemoveAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/QueueRemoveAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- QueueRemoveAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ QueueRemoveAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; @@ -14,6 +25,9 @@ package net.sf.asterisk.manager.action; */ public class QueueRemoveAction extends ManagerAction { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -4296471882045706821L; private String queue; private String iface; Index: ExtensionStateAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/ExtensionStateAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ExtensionStateAction.java 23 Feb 2005 12:45:21 -0000 1.1 +++ ExtensionStateAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.action; */ public class ExtensionStateAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = 6537408784388696403L; private String exten; Index: HangupAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/HangupAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- HangupAction.java 23 Feb 2005 12:45:20 -0000 1.1 +++ HangupAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; @@ -13,6 +24,9 @@ package net.sf.asterisk.manager.action; */ public class HangupAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = 3479615884618713986L; private String channel; Index: LoginAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/LoginAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- LoginAction.java 23 Feb 2005 12:45:21 -0000 1.1 +++ LoginAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,17 +1,27 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The LoginAction authenticates the connection.<br> - * A successful login is the precondition for sending any other action except for - * the ChallengeAction.<br> - * An unsuccessful login results in an ManagerError being received from the server - * with a message set to "Authentication failed" and the socket being closed - * by asterisk. + * A successful login is the precondition for sending any other action except for the + * ChallengeAction.<br> + * An unsuccessful login results in an ManagerError being received from the server with a message + * set to "Authentication failed" and the socket being closed by asterisk. * * @see net.sf.asterisk.manager.action.ChallengeAction * @see net.sf.asterisk.manager.response.ManagerError @@ -21,6 +31,9 @@ package net.sf.asterisk.manager.action; */ public class LoginAction extends ManagerAction { + /** + * Serializable version identifier + */ static final long serialVersionUID = -2600694249339115032L; private String username; @@ -63,9 +76,8 @@ public class LoginAction extends Manager /** * Sets the secret to use when using clear text login.<br> - * The secret contains the user's password as configured in - * asterisk's <code>manager.conf</code>.<br> - * The secret and key properties are mutually exclusive. + * The secret contains the user's password as configured in asterisk's <code>manager.conf</code>.<br> + * The secret and key properties are mutually exclusive. */ public void setSecret(String secret) { @@ -82,8 +94,8 @@ public class LoginAction extends Manager /** * Sets the digest alogrithm when using challenge/response.<br> - * The digest algorithm is used to create the key based on the challenge - * and the user's password.<br> + * The digest algorithm is used to create the key based on the challenge and the user's + * password.<br> * Currently asterisk supports only "MD5". */ public void setAuthType(String authType) Index: CommandAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/CommandAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- CommandAction.java 23 Feb 2005 12:45:21 -0000 1.1 +++ CommandAction.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,21 +1,33 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** - * The CommandAction sends a command line interface (CLI) command to the - * asterisk server.<br> - * For a list of supported commands type <code>help</code> on - * asterisk's command line. + * The CommandAction sends a command line interface (CLI) command to the asterisk server.<br> + * For a list of supported commands type <code>help</code> on asterisk's command line. * * @author srt * @version $Id$ */ public class CommandAction extends ManagerAction { +... [truncated message content] |
From: Stefan R. <sr...@us...> - 2005-02-23 22:51:09
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21466/src/java/net/sf/asterisk/manager/response Modified Files: ManagerResponse.java MailboxStatusResponse.java ManagerError.java ExtensionStateResponse.java CommandResponse.java MailboxCountResponse.java ChallengeResponse.java Log Message: added license header Index: ManagerResponse.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response/ManagerResponse.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ManagerResponse.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ManagerResponse.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.response; @@ -15,8 +26,8 @@ import org.apache.commons.lang.builder.T /** * Represents a response received from the Asterisk server as the result of a previously sent * ManagerAction.<br> - * The response can be linked with the action that caused it by looking the action id - * attribute that will match the action id of the corresponding action. + * The response can be linked with the action that caused it by looking the action id attribute that + * will match the action id of the corresponding action. * * @see net.sf.asterisk.manager.action.ManagerAction * @author srt @@ -24,6 +35,9 @@ import org.apache.commons.lang.builder.T */ public class ManagerResponse implements Serializable { + /** + * Serial version identifier + */ static final long serialVersionUID = -935845815108584292L; private Date dateReceived; @@ -49,8 +63,8 @@ public class ManagerResponse implements } /** - * Returns the action id received with this response referencing the action - * that generated this response. + * Returns the action id received with this response referencing the action that generated this + * response. */ public String getActionId() { @@ -66,8 +80,8 @@ public class ManagerResponse implements } /** - * Returns the message received with this response. - * The content depends on the action that generated this response. + * Returns the message received with this response. The content depends on the action that + * generated this response. */ public String getMessage() { @@ -83,9 +97,8 @@ public class ManagerResponse implements } /** - * Returns the value of the "Response:" line. - * This typically a String like "Success" or "Error" but depends on the action that - * generated this response. + * Returns the value of the "Response:" line. This typically a String like "Success" or "Error" + * but depends on the action that generated this response. */ public String getResponse() { @@ -101,9 +114,8 @@ public class ManagerResponse implements } /** - * Returns the unique id received with this response. - * The unique id is used to keep track of channels created by the action sent, - * for example an OriginateAction. + * Returns the unique id received with this response. The unique id is used to keep track of + * channels created by the action sent, for example an OriginateAction. */ public String getUniqueId() { Index: MailboxStatusResponse.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response/MailboxStatusResponse.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MailboxStatusResponse.java 23 Feb 2005 12:45:22 -0000 1.1 +++ MailboxStatusResponse.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; /** - * A MailboxStatusResponse is sent in response to a MailboxStatusAction - * and indicates if a mailbox contains waiting messages. + * A MailboxStatusResponse is sent in response to a MailboxStatusAction and indicates if a mailbox + * contains waiting messages. * * @see net.sf.asterisk.manager.action.MailboxStatusAction * @@ -16,6 +27,9 @@ package net.sf.asterisk.manager.response */ public class MailboxStatusResponse extends ManagerResponse { + /** + * Serial version identifier + */ private static final long serialVersionUID = -7193581424292429279L; private String mailbox; private Integer waiting; Index: ManagerError.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response/ManagerError.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ManagerError.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ManagerError.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.response; @@ -9,14 +20,17 @@ import org.apache.commons.lang.builder.E import org.apache.commons.lang.builder.HashCodeBuilder; /** - * Represents an "Response: Error" response received from the asterisk server. - * The cause for the error is given in the message attribute. + * Represents an "Response: Error" response received from the asterisk server. The cause for the + * error is given in the message attribute. * * @author srt * @version $Id$ */ public class ManagerError extends ManagerResponse { + /** + * Serial version identifier + */ static final long serialVersionUID = -8753149536715547476L; /** Index: ExtensionStateResponse.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response/ExtensionStateResponse.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ExtensionStateResponse.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ExtensionStateResponse.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; @@ -11,6 +22,9 @@ package net.sf.asterisk.manager.response */ public class ExtensionStateResponse extends ManagerResponse { + /** + * Serial version identifier + */ private static final long serialVersionUID = -2044248427247227390L; private String exten; private String context; Index: CommandResponse.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response/CommandResponse.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- CommandResponse.java 23 Feb 2005 12:45:22 -0000 1.1 +++ CommandResponse.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 25, 2004 */ package net.sf.asterisk.manager.response; @@ -10,10 +21,10 @@ import java.util.List; /** * Corresponds to a CommandAction.<br> * - * Asterisk's handling of the command action is generelly quite hairy. It sends a "Response: Follows" - * line followed by the raw output of the command including empty lines. At the end of the command - * output a line containing "--END COMMAND--" is sent. The reader parses this response into a - * CommandResponse object to hide these details. + * Asterisk's handling of the command action is generelly quite hairy. It sends a "Response: + * Follows" line followed by the raw output of the command including empty lines. At the end of the + * command output a line containing "--END COMMAND--" is sent. The reader parses this response into + * a CommandResponse object to hide these details. * * @see net.sf.asterisk.manager.action.CommandAction * @@ -22,13 +33,15 @@ import java.util.List; */ public class CommandResponse extends ManagerResponse { + /** + * Serial version identifier + */ static final long serialVersionUID = -350763332794275049L; protected List result; /** - * Returns a List containing strings representing the lines returned by - * the CLI command. + * Returns a List containing strings representing the lines returned by the CLI command. */ public List getResult() { Index: MailboxCountResponse.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response/MailboxCountResponse.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MailboxCountResponse.java 23 Feb 2005 12:45:22 -0000 1.1 +++ MailboxCountResponse.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,21 +1,35 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; /** - * A MailboxCountResponse is sent in response to a MailboxCountAction - * and contains the number of old and new messages in a mailbox. - * - * @see net.sf.asterisk.manager.action.MailboxCountAction + * A MailboxCountResponse is sent in response to a MailboxCountAction and contains the number of old + * and new messages in a mailbox. + * + * @see net.sf.asterisk.manager.action.MailboxCountAction * * @author srt * @version $Id$ */ public class MailboxCountResponse extends ManagerResponse { + /** + * Serial version identifier + */ private static final long serialVersionUID = 7820598941277275838L; private String mailbox; private Integer newMessages; Index: ChallengeResponse.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response/ChallengeResponse.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ChallengeResponse.java 23 Feb 2005 12:45:22 -0000 1.1 +++ ChallengeResponse.java 23 Feb 2005 22:50:58 -0000 1.2 @@ -1,13 +1,24 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.response; /** - * Corresponds to a ChallengeAction and contains the challenge needed to log in - * using challenge/response. + * Corresponds to a ChallengeAction and contains the challenge needed to log in using + * challenge/response. * * @see net.sf.asterisk.manager.action.ChallengeAction * @see net.sf.asterisk.manager.action.LoginAction @@ -17,6 +28,9 @@ package net.sf.asterisk.manager.response */ public class ChallengeResponse extends ManagerResponse { + /** + * Serial version identifier + */ static final long serialVersionUID = -7253724086340850957L; private String challenge; |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21466/src/java/net/sf/asterisk/manager Modified Files: DefaultAsteriskManager.java ManagerReader.java ChannelStateEnum.java Channel.java ManagerConnectionFactory.java Util.java TimeoutException.java ManagerConnection.java MultiAsterisksManager.java ManagerEventHandler.java AsteriskManager.java AuthenticationFailedException.java ManagerResponseHandler.java AsteriskServer.java ActionBuilder.java EventBuilder.java Queue.java DefaultManagerConnection.java Log Message: added license header Index: DefaultAsteriskManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/DefaultAsteriskManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- DefaultAsteriskManager.java 23 Feb 2005 12:45:20 -0000 1.1 +++ DefaultAsteriskManager.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Oct 28, 2004 */ package net.sf.asterisk.manager; @@ -62,7 +73,7 @@ public class DefaultAsteriskManager impl this.queues = Collections.synchronizedMap(new HashMap()); this.queuedEvents = Collections.synchronizedList(new ArrayList()); this.channelsInitialized = false; - //TODO fix detection of queuesInitialized + // TODO fix detection of queuesInitialized this.queuesInitialized = true; this.initialized = false; } @@ -104,8 +115,8 @@ public class DefaultAsteriskManager impl /** * Handles all events received from the asterisk server.<br> - * Events are queued until channels and queues are initialized and then - * delegated to the dispatchEvent method. + * Events are queued until channels and queues are initialized and then delegated to the + * dispatchEvent method. */ public void handleEvent(ManagerEvent event) { @@ -273,7 +284,7 @@ public class DefaultAsteriskManager impl } /** - * Resets the internal state when the connection to the asterisk server is lost. + * Resets the internal state when the connection to the asterisk server is lost. */ protected void handleDisconnectEvent(DisconnectEvent disconnectEvent) { @@ -281,7 +292,7 @@ public class DefaultAsteriskManager impl this.queues.clear(); this.queuedEvents.clear(); this.channelsInitialized = false; - //TODO fix detection of queuesInitialized + // TODO fix detection of queuesInitialized this.queuesInitialized = true; this.initialized = false; } @@ -371,7 +382,7 @@ public class DefaultAsteriskManager impl */ private Channel getChannelByName(String name) { - //TODO must get unique + // TODO must get unique Channel channel = null; Iterator channelIterator = channels.values().iterator(); while (channelIterator.hasNext()) Index: ManagerReader.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerReader.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ManagerReader.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ManagerReader.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; @@ -26,10 +37,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** - * The ManagerReader is a Thread that reads events and responses from an asterisk - * server, parses them to the corresponding ManagerEvent and ManagerResponse objects and - * dispatches them via the associated DefaultManagerConnection. - * <br> + * The ManagerReader is a Thread that reads events and responses from an asterisk server, parses + * them to the corresponding ManagerEvent and ManagerResponse objects and dispatches them via the + * associated DefaultManagerConnection. <br> * This class is intended to be used only by the DefaultManagerConnection. * * @see net.sf.asterisk.manager.event.ManagerEvent @@ -61,9 +71,8 @@ class ManagerReader extends Thread } /** - * Reads line by line from the asterisk server, sets the protocol identifier - * as soon as it is received and dispatches the received - * events and responses via the associated connection. + * Reads line by line from the asterisk server, sets the protocol identifier as soon as it is + * received and dispatches the received events and responses via the associated connection. * * @see DefaultManagerConnection#dispatchEvent(ManagerEvent) * @see DefaultManagerConnection#dispatchResponse(ManagerResponse) @@ -80,7 +89,8 @@ class ManagerReader extends Thread { while ((line = reader.readLine()) != null && !die) { - // dirty hack for handling the CommandAction. Needs fix when manager protocol is enhanced. + // dirty hack for handling the CommandAction. Needs fix when manager protocol is + // enhanced. if (processingCommandResult) { if ("--END COMMAND--".equals(line)) Index: ChannelStateEnum.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ChannelStateEnum.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ChannelStateEnum.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ChannelStateEnum.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Oct 29, 2004 */ package net.sf.asterisk.manager; @@ -13,12 +24,15 @@ import org.apache.commons.lang.enums.Enu /** * Enumeration that represents the state of a channel. - * + * * @author srt * @version $Id$ */ public class ChannelStateEnum extends Enum { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 6436381500165485011L; public static final ChannelStateEnum DOWN = new ChannelStateEnum("Down"); public static final ChannelStateEnum OFF_HOOK = new ChannelStateEnum("OffHook"); Index: Channel.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Channel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- Channel.java 23 Feb 2005 21:33:10 -0000 1.2 +++ Channel.java 23 Feb 2005 22:50:57 -0000 1.3 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Oct 29, 2004 */ package net.sf.asterisk.manager; @@ -17,6 +28,9 @@ import org.apache.commons.lang.builder.T */ public class Channel implements Serializable { + /** + * Serializable version identifier + */ private static final long serialVersionUID = -6919877370396385380L; private AsteriskServer asteriskServer; @@ -64,6 +78,7 @@ public class Channel implements Serializ /** * Creates a new Channel. + * * @param name name of this channel, for example "SIP/1310-20da". * @param id unique id of this channel, for example "1099015093.165". */ @@ -75,6 +90,7 @@ public class Channel implements Serializ /** * Creates a new Channel on the given server. + * * @param name name of this channel, for example "SIP/1310-20da". * @param id unique id of this channel, for example "1099015093.165". * @param server the Asterisk server this channel exists on. @@ -88,6 +104,7 @@ public class Channel implements Serializ /** * Returns the Asterisk server. + * * @return the Asterisk server. */ public final AsteriskServer getAsteriskServer() @@ -97,6 +114,7 @@ public class Channel implements Serializ /** * Sets the Asterisk server. + * * @param asteriskServer the Asterisk server to set. */ public final void setAsteriskServer(final AsteriskServer asteriskServer) @@ -106,6 +124,7 @@ public class Channel implements Serializ /** * Returns the unique id of this channel, for example "1099015093.165". + * * @return the unique id of this channel. */ public final String getId() @@ -115,6 +134,7 @@ public class Channel implements Serializ /** * Returns the name of this channel, for example "SIP/1310-20da". + * * @return the name of this channel. */ public final String getName() @@ -124,6 +144,7 @@ public class Channel implements Serializ /** * Sets the name of this channel. + * * @param name the name of this channel. */ public final void setName(final String name) @@ -133,6 +154,7 @@ public class Channel implements Serializ /** * Returns the caller id of this channel. + * * @return the caller id of this channel. */ public final String getCallerId() @@ -142,6 +164,7 @@ public class Channel implements Serializ /** * Sets the caller id of this channel. + * * @param callerId the calleid id of this channel. */ public final void setCallerId(final String callerId) @@ -151,6 +174,7 @@ public class Channel implements Serializ /** * Returns the state of this channel. + * * @return the state of this channel. */ public final ChannelStateEnum getState() @@ -160,6 +184,7 @@ public class Channel implements Serializ /** * Sets the state of this channel. + * * @param state the state of this channel. */ public final void setState(final ChannelStateEnum state) @@ -169,6 +194,7 @@ public class Channel implements Serializ /** * Returns the account code used to bill this channel. + * * @return the account code used to bill this channel. */ public final String getAccount() @@ -178,6 +204,7 @@ public class Channel implements Serializ /** * Sets the account code used to bill this channel. + * * @param account the account code used to bill this channel. */ public final void setAccount(final String account) @@ -237,6 +264,7 @@ public class Channel implements Serializ /** * Returns the date this channel has been created. + * * @return the date this channel has been created. */ public final Date getDateOfCreation() @@ -246,6 +274,7 @@ public class Channel implements Serializ /** * Sets the date this channel has been created. + * * @param dateOfCreation the date this channel has been created. */ public final void setDateOfCreation(final Date dateOfCreation) @@ -254,9 +283,10 @@ public class Channel implements Serializ } /** - * Returns the channel this channel is bridged with, if any. + * Returns the channel this channel is bridged with, if any. + * * @return the channel this channel is bridged with, or <code>null</code> if this channel is - * currently not bridged to another channel. + * currently not bridged to another channel. */ public final Channel getLinkedChannel() { @@ -265,6 +295,7 @@ public class Channel implements Serializ /** * Sets the channel this channel is bridged with. + * * @param linkedChannel the channel this channel is bridged with. */ public final void setLinkedChannel(final Channel linkedChannel) Index: ManagerConnectionFactory.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerConnectionFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ManagerConnectionFactory.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ManagerConnectionFactory.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; @@ -29,8 +40,8 @@ public class ManagerConnectionFactory } /** - * Returns a new ManagerConnection to an asterisk server running on localhost with - * the call manager interface listening on its default port 5038. + * Returns a new ManagerConnection to an asterisk server running on localhost with the call + * manager interface listening on its default port 5038. * * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> @@ -45,10 +56,10 @@ public class ManagerConnectionFactory } /** - * Returns a new ManagerConnection to an asterisk server running on given host with - * the call manager interface listening on its default port 5038. - * - * @param hostname the name of the host the asterisk server is running on + * Returns a new ManagerConnection to an asterisk server running on given host with the call + * manager interface listening on its default port 5038. + * + * @param hostname the name of the host the asterisk server is running on * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> * @@ -62,11 +73,11 @@ public class ManagerConnectionFactory } /** - * Returns a new ManagerConnection to an asterisk server running on given host with - * the call manager interface listening on the given port. - * + * Returns a new ManagerConnection to an asterisk server running on given host with the call + * manager interface listening on the given port. + * * @param hostname the name of the host the asterisk server is running on - * @param port the port the call manager interface is listening on + * @param port the port the call manager interface is listening on * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> * Index: Util.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Util.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- Util.java 23 Feb 2005 12:45:20 -0000 1.1 +++ Util.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,13 +1,23 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; /** - * Utilitiy class with some static helper methods that are used in multiple - * contexts. + * Utilitiy class with some static helper methods that are used in multiple contexts. * * @author srt * @version $Id$ @@ -17,8 +27,8 @@ public class Util /** * The hex digits used to build a hex string representation of a byte array. */ - private static final char[] hexChar = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', - 'f' }; + private static final char[] hexChar = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', + 'f'}; /** * Converts a byte array to a hex string representing it. The hex digits are lower case. Index: TimeoutException.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/TimeoutException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- TimeoutException.java 23 Feb 2005 12:45:20 -0000 1.1 +++ TimeoutException.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,22 +1,40 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; /** - * A TimeoutException is thrown if a ManagerResponse is not - * received within the expected time period. + * A TimeoutException is thrown if a ManagerResponse is not received within the expected time + * period. * * @author srt * @version $Id$ */ public class TimeoutException extends Exception { + /** + * Serial version identifier + */ static final long serialVersionUID = 7674248607624140309L; - public TimeoutException(String message) + /** + * Creates a new TimeoutException with the given message. + * @param message message with details about the timeout. + */ + public TimeoutException(final String message) { super(message); } Index: ManagerConnection.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerConnection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ManagerConnection.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ManagerConnection.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; @@ -11,8 +22,8 @@ import net.sf.asterisk.manager.action.Ma import net.sf.asterisk.manager.response.ManagerResponse; /** - * The main interface to talk to an asterisk server via the manager api. - * A concrete implementation of this interface is obtained from a ManagerConnectionFactory. + * The main interface to talk to an asterisk server via the manager api. A concrete implementation + * of this interface is obtained from a ManagerConnectionFactory. * * @see net.sf.asterisk.manager.ManagerConnectionFactory * @@ -26,12 +37,11 @@ public interface ManagerConnection * was created. * * @throws IOException - * @throws AuthenticationFailedException if the username and/or password are incorrect - * or the ChallengeResponse could not be built. - * @throws TimeoutException if no response is received within the default timeout period. - * If the implementation uses challenge/response this can either be a - * timeout of the ChallengeAction or the LoginAction; otherwise it - * is always a timeout of the LoginAction. + * @throws AuthenticationFailedException if the username and/or password are incorrect or the + * ChallengeResponse could not be built. + * @throws TimeoutException if no response is received within the default timeout period. If the + * implementation uses challenge/response this can either be a timeout of the ChallengeAction or + * the LoginAction; otherwise it is always a timeout of the LoginAction. * * @see net.sf.asterisk.manager.action.LoginAction * @see net.sf.asterisk.manager.action.ChallengeAction @@ -43,7 +53,7 @@ public interface ManagerConnection * * @throws IOException * @throws TimeoutException if no response to the logoff action is received within the default - * timeout period. + * timeout period. * * @see net.sf.asterisk.manager.action.LogoffAction */ @@ -53,13 +63,13 @@ public interface ManagerConnection * Returns the protocol identifier, i.e. a string like "Asterisk Call Manager/1.0". * * @return the protocol identifier of the asterisk manager interface in use if it has already - * been received; <code>null</code> otherwise + * been received; <code>null</code> otherwise */ String getProtocolIdentifier(); /** - * Sends a ManagerAction to the asterisk manager interface and waits for the - * corresponding ManagerResponse. + * Sends a ManagerAction to the asterisk manager interface and waits for the corresponding + * ManagerResponse. * * @param action the action to send to the asterisk server * @@ -74,8 +84,8 @@ public interface ManagerConnection ManagerResponse sendAction(ManagerAction action) throws IOException, TimeoutException; /** - * Sends a ManagerAction to the asterisk manager interface and waits for the - * corresponding {@link ManagerResponse}. + * Sends a ManagerAction to the asterisk manager interface and waits for the corresponding + * {@link ManagerResponse}. * * @param action the action to send to the asterisk server * @param timeout milliseconds to wait for the reponse before throwing a TimeoutException @@ -84,14 +94,14 @@ public interface ManagerConnection * * @throws IOException * @throws TimeoutException if no reponse is received within the given timeout period. - * + * * @see #sendAction(ManagerAction, ManagerResponseHandler) */ ManagerResponse sendAction(ManagerAction action, long timeout) throws IOException, TimeoutException; /** - * Sends a ManagerAction to the asterisk manager interface and registers a callback handler - * to be called when the corresponding ManagerResponse is received. + * Sends a ManagerAction to the asterisk manager interface and registers a callback handler to + * be called when the corresponding ManagerResponse is received. * * @param action the action to send to the asterisk server * @param callbackHandler the callback handler to call when the response is received @@ -101,8 +111,8 @@ public interface ManagerConnection void sendAction(ManagerAction action, ManagerResponseHandler callbackHandler) throws IOException; /** - * Registers an event handler to be called whenever an {@link net.sf.asterisk.manager.event.ManagerEvent} - * is receiced from the asterisk server. + * Registers an event handler to be called whenever an + * {@link net.sf.asterisk.manager.event.ManagerEvent} is receiced from the asterisk server. * * @param eventHandler the handler to call whenever a manager event is received * Index: MultiAsterisksManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/MultiAsterisksManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- MultiAsterisksManager.java 23 Feb 2005 12:45:20 -0000 1.1 +++ MultiAsterisksManager.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -24,16 +24,15 @@ public class MultiAsterisksManager imple private Map managerConnections; /** - * A map of all active channel by theirs hostname of connection and unique id. - * keyMap -> "hostname:uniqueId" + * A map of all active channel by theirs hostname of connection and unique id. keyMap -> + * "hostname:uniqueId" */ private Map channels; private Map queues; private List queuedEvents; /** - * A map of all "Initiallize flag" per connection. - * keyMap -> "hostname" + * A map of all "Initiallize flag" per connection. keyMap -> "hostname" */ private Map initialized; @@ -52,7 +51,7 @@ public class MultiAsterisksManager imple Hashtable initializedBoolean = new Hashtable(3, 1); initializedBoolean.put("channelsInitialized", new Boolean(false)); - // TODO fix detection of queuesInitialized + // TODO fix detection of queuesInitialized initializedBoolean.put("queuesInitialized", new Boolean(true)); initializedBoolean.put("initialized", new Boolean(false)); @@ -88,8 +87,8 @@ public class MultiAsterisksManager imple /** * Handles all events received from the asterisk server.<br> - * Events are queued until channels and queues are initialized and then - * delegated to the dispatchEvent method. + * Events are queued until channels and queues are initialized and then delegated to the + * dispatchEvent method. */ public void handleEvent(ManagerEvent event) { @@ -312,7 +311,7 @@ public class MultiAsterisksManager imple */ private Channel getChannelByName(String name) { - //TODO must get unique + // TODO must get unique Channel channel = null; Iterator channelIterator = channels.values().iterator(); while (channelIterator.hasNext()) @@ -452,7 +451,9 @@ public class MultiAsterisksManager imple channel.setName(event.getNewname()); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see net.sf.asterisk.manager.AsteriskManager#originateCall(net.sf.asterisk.manager.action.OriginateAction) */ public String originateCall(OriginateAction originateAction) throws TimeoutException, IOException Index: ManagerEventHandler.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerEventHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ManagerEventHandler.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ManagerEventHandler.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; Index: AsteriskManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/AsteriskManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- AsteriskManager.java 23 Feb 2005 14:05:01 -0000 1.3 +++ AsteriskManager.java 23 Feb 2005 22:50:57 -0000 1.4 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Oct 28, 2004 */ package net.sf.asterisk.manager; @@ -18,10 +29,10 @@ public interface AsteriskManager { /** * Generates an outgoing call. - * + * * @param originateAction conatins the details of the call to originate * @return the unique id of the created channel (this one is also found in the cdr) - * + * * @throws TimeoutException if the originated call is not answered in time * @throws IOException if the action cannot be sent to the asterisk server */ @@ -31,6 +42,7 @@ public interface AsteriskManager * Returns a Map of active channels.<br> * The map contain the channel names as keys and objects of type * {@link net.sf.asterisk.manager.Channel} as values. + * * @return a Map of active channels. */ Map getChannels(); @@ -38,6 +50,7 @@ public interface AsteriskManager /** * Returns a Map of all queues.<br> * The map contains the queue names as keys and objects of type {@link Queue} as values. + * * @return a Map of queues. */ Map getQueues(); Index: AuthenticationFailedException.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/AuthenticationFailedException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- AuthenticationFailedException.java 23 Feb 2005 14:05:00 -0000 1.2 +++ AuthenticationFailedException.java 23 Feb 2005 22:50:57 -0000 1.3 @@ -1,23 +1,38 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; /** - * An AuthenticationFailedException is thrown when a login fails due to an - * incorrect username and/or password. - * + * An AuthenticationFailedException is thrown when a login fails due to an incorrect username and/or + * password. + * * @author srt * @version $Id$ */ public class AuthenticationFailedException extends Exception { + /** + * Serializable version identifier + */ static final long serialVersionUID = 7674248607624140309L; /** * Creates a new AuthenticationFailedException with the given message. + * * @param message message describing the authentication failure */ public AuthenticationFailedException(final String message) @@ -27,6 +42,7 @@ public class AuthenticationFailedExcepti /** * Creates a new AuthenticationFailedException with the given message and cause. + * * @param message message describing the authentication failure * @param cause exception that caused the authentication failure */ Index: ManagerResponseHandler.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerResponseHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ManagerResponseHandler.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ManagerResponseHandler.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; Index: AsteriskServer.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/AsteriskServer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- AsteriskServer.java 23 Feb 2005 21:33:10 -0000 1.2 +++ AsteriskServer.java 23 Feb 2005 22:50:57 -0000 1.3 @@ -8,12 +8,15 @@ import java.io.Serializable; /** * Represents an Asterisk server that is connected via the Manager API. - * + * * @author PY * @version $Id$ */ public class AsteriskServer implements Serializable { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 3257284738393125176L; /** @@ -47,6 +50,7 @@ public class AsteriskServer implements S /** * Creates a new Asterisk server with the given hostname and port. + * * @param hostname the hostname of the Asterisk server * @param port the port on the Asterisk server the Asterisk Manager API is listening on */ @@ -58,6 +62,7 @@ public class AsteriskServer implements S /** * Returns the hostname. + * * @return the hostname */ public final String getHostname() @@ -67,6 +72,7 @@ public class AsteriskServer implements S /** * Sets the hostname. + * * @param hostname the hostname to set */ public final void setHostname(final String hostname) @@ -76,6 +82,7 @@ public class AsteriskServer implements S /** * Returns the port. + * * @return the port */ public final int getPort() @@ -85,6 +92,7 @@ public class AsteriskServer implements S /** * Sets the port. + * * @param port the port to set. */ public final void setPort(final int port) Index: ActionBuilder.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ActionBuilder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- ActionBuilder.java 23 Feb 2005 12:55:41 -0000 1.2 +++ ActionBuilder.java 23 Feb 2005 22:50:57 -0000 1.3 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 24, 2004 */ package net.sf.asterisk.manager; @@ -20,7 +31,7 @@ import org.apache.commons.logging.LogFac /** * Transforms ManagerActions to Strings suitable to be sent to Asterisk.<br> * The attributes are determined using reflection. - * + * * @author srt * @version $Id$ */ @@ -33,9 +44,10 @@ public class ActionBuilder /** * Builds a String suitable to be sent to Asterisk based on the given action object.<br> - * Asterisk actions consist of an unordered set of key value pairs corresponding to - * the attributes of the ManagerActions. Key and value are separated by a colon (":"), key - * value pairs by a CR/NL ("\r\n"). An action is terminated by an empty line ("\r\n\r\n"). + * Asterisk actions consist of an unordered set of key value pairs corresponding to the + * attributes of the ManagerActions. Key and value are separated by a colon (":"), key value + * pairs by a CR/NL ("\r\n"). An action is terminated by an empty line ("\r\n\r\n"). + * * @param action the action to transform * @return a String representing the given action in an asterisk compatible format */ @@ -65,7 +77,7 @@ public class ActionBuilder getter = (Method) getters.get(name); try { - value = getter.invoke(action, new Object[] {}); + value = getter.invoke(action, new Object[]{}); } catch (IllegalAccessException ex) { @@ -104,10 +116,10 @@ public class ActionBuilder /** * Returns a Map of getter methods of the given class.<br> - * The key of the map contains the name of the attribute that can be accessed by the - * getter, the value the getter itself (an instance of java.lang.reflect.Method). - * A method is considered a getter if its name starts with "get", it is declared public - * and takes no arguments. + * The key of the map contains the name of the attribute that can be accessed by the getter, the + * value the getter itself (an instance of java.lang.reflect.Method). A method is considered a + * getter if its name starts with "get", it is declared public and takes no arguments. + * * @param clazz the class to return the getters for * @return a Map of attributes and their accessor methods (getters) */ Index: EventBuilder.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/EventBuilder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- EventBuilder.java 23 Feb 2005 12:45:20 -0000 1.1 +++ EventBuilder.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Sep 24, 2004 */ package net.sf.asterisk.manager; @@ -115,12 +126,12 @@ public class EventBuilder } /** - * Registers a new event class. The event this class is registered for is simply derived - * from the name of the class by stripping any package name (if present) and stripping - * the sufffix "Event". - * For example <code>net.sf.asterisk.manager.event.JoinEvent</code> is registered for the - * event "Join". - * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. + * Registers a new event class. The event this class is registered for is simply derived from + * the name of the class by stripping any package name (if present) and stripping the sufffix + * "Event". For example <code>net.sf.asterisk.manager.event.JoinEvent</code> is registered for + * the event "Join". + * + * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. */ public void registerEventClass(Class clazz) { @@ -140,8 +151,9 @@ public class EventBuilder /** * Registers a new event class for the event given by eventType. + * * @param eventType the name of the event to register the class for. For example "Join". - * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. + * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. */ public void registerEventClass(String eventType, Class clazz) { @@ -159,7 +171,7 @@ public class EventBuilder try { - defaultConstructor = clazz.getConstructor(new Class[] { Object.class }); + defaultConstructor = clazz.getConstructor(new Class[]{Object.class}); } catch (NoSuchMethodException ex) { @@ -199,7 +211,7 @@ public class EventBuilder try { - constructor = eventClass.getConstructor(new Class[] { Object.class }); + constructor = eventClass.getConstructor(new Class[]{Object.class}); } catch (NoSuchMethodException ex) { @@ -209,7 +221,7 @@ public class EventBuilder try { - event = (ManagerEvent) constructor.newInstance(new Object[] { source }); + event = (ManagerEvent) constructor.newInstance(new Object[]{source}); } catch (InstantiationException ex) { @@ -267,9 +279,8 @@ public class EventBuilder } /* - * The source property needs special handling as it is already defined - * in java.util.EventObject (the base class of ManagerEvent), so we - * have to translate it. + * The source property needs special handling as it is already defined in + * java.util.EventObject (the base class of ManagerEvent), so we have to translate it. */ if ("source".equals(name)) { @@ -296,8 +307,8 @@ public class EventBuilder { try { - Constructor constructor = dataType.getConstructor(new Class[] { String.class }); - value = constructor.newInstance(new Object[] { attributes.get(name) }); + Constructor constructor = dataType.getConstructor(new Class[]{String.class}); + value = constructor.newInstance(new Object[]{attributes.get(name)}); } catch (Exception e) { @@ -309,7 +320,7 @@ public class EventBuilder try { - setter.invoke(event, new Object[] { value }); + setter.invoke(event, new Object[]{value}); } catch (Exception e) { Index: Queue.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Queue.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- Queue.java 23 Feb 2005 12:45:20 -0000 1.1 +++ Queue.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Oct 31, 2004 */ package net.sf.asterisk.manager; @@ -16,6 +27,9 @@ import java.util.List; */ public class Queue implements Serializable { + /** + * Serial version identifier + */ private static final long serialVersionUID = -6597536667933738312L; private String name; private Integer max; Index: DefaultManagerConnection.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/DefaultManagerConnection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- DefaultManagerConnection.java 23 Feb 2005 12:45:20 -0000 1.1 +++ DefaultManagerConnection.java 23 Feb 2005 22:50:57 -0000 1.2 @@ -1,7 +1,18 @@ /* - * (c) 2004 Stefan Reuter + * Copyright 2004-2005 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; @@ -88,8 +99,8 @@ public class DefaultManagerConnection im } /** - * Sets the port to use to connect to the asterisk server. This is - * the port specified in asterisk's <code>manager.conf</code> file.<br> + * Sets the port to use to connect to the asterisk server. This is the port specified in + * asterisk's <code>manager.conf</code> file.<br> * Default is 5038. * * @param port the port to connect to @@ -100,8 +111,8 @@ public class DefaultManagerConnection im } /** - * Sets the username to use to connect to the asterisk server. This is - * the username specified in asterisk's <code>manager.conf</code> file. + * Sets the username to use to connect to the asterisk server. This is the username specified in + * asterisk's <code>manager.conf</code> file. * * @param username the username to use for login */ @@ -111,8 +122,8 @@ public class DefaultManagerConnection im } /** - * Sets the password to use to connect to the asterisk server. This is - * the password specified in asterisk's <code>manager.conf</code> file. + * Sets the password to use to connect to the asterisk server. This is the password specified in + * asterisk's <code>manager.conf</code> file. * * @param password the password to use for login */ @@ -122,9 +133,8 @@ public class DefaultManagerConnection im } /** - * Sets the time in milli seconds the synchronous method - * {@link #sendAction(ManagerAction)} will wait for a response before throwing - * a TimeoutException.<br> + * Sets the time in milli seconds the synchronous method {@link #sendAction(ManagerAction)} will + * wait for a response before throwing a TimeoutException.<br> * Default is 2000. * * @param defaultTimeout default timeout in milli seconds @@ -135,13 +145,13 @@ public class DefaultManagerConnection im } /** - * Sets the time in milli seconds the synchronous methods - * {@link #sendAction(ManagerAction)} and {@link #sendAction(ManagerAction, long)} - * will sleep between two checks for the arrival of a response. This value should - * be rather small.<br> + * Sets the time in milli seconds the synchronous methods {@link #sendAction(ManagerAction)} and + * {@link #sendAction(ManagerAction, long)} will sleep between two checks for the arrival of a + * response. This value should be rather small.<br> * Default is 50. * - * @param sleepTime time in milli seconds to sleep between two checks for the arrival of a responser + * @param sleepTime time in milli seconds to sleep between two checks for the arrival of a + * responser */ public void setSleepTime(long sleepTime) { @@ -161,14 +171,14 @@ public class DefaultManagerConnection im /* Implementation of ManagerConnection interface */ /** - * Logs in to the asterisk manager using asterisk's MD5 based challenge/response protocol. - * The login is delayed until the protocol identifier has been received by the reader. + * Logs in to the asterisk manager using asterisk's MD5 based challenge/response protocol. The + * login is delayed until the protocol identifier has been received by the reader. * * @throws AuthenticationFailedException if the username and/or password are incorrect * @throws TimeoutException if there no response is received within the specified timeout period * * @see ChallengeAction - * @see LoginAction + * @see LoginAction */ public void login() throws IOException, AuthenticationFailedException, TimeoutException { @@ -380,8 +390,8 @@ public class DefaultManagerConnection im } /** - * Creates a new unique internal action id based on the hash code of this - * connection and a sequence. + * Creates a new unique internal action id based on the hash code of this connection and a + * sequence. */ private String createInternalActionId() { @@ -422,8 +432,8 @@ public class DefaultManagerConnection im /* Callbacks for ManagerReader */ /** - * This method is called by the reader whenever a {@link ManagerResponse} - * is received. The response is dispatched to the associated {@link ManagerResponseHandler}. + * This method is called by the reader whenever a {@link ManagerResponse} is received. The + * response is dispatched to the associated {@link ManagerResponseHandler}. * * @param response the resonse received by the reader * @@ -484,8 +494,8 @@ public class DefaultManagerConnection im } /** - * This method is called by the reader whenever a ManagerEvent - * is received. The event is dispatched to all registered ManagerEventHandlers. + * This method is called by the reader whenever a ManagerEvent is received. The event is + * dispatched to all registered ManagerEventHandlers. * * @param event the event received by the reader * @@ -527,9 +537,9 @@ public class DefaultManagerConnection im } /** - * This method is called by the reader when the asterisk server - * receives the protocol identifier, i.e. a string like "Asterisk Call Manager/1.0". - * Having received a correct protocol identifier is the precodition for logging in. + * This method is called by the reader when the asterisk server receives the protocol + * identifier, i.e. a string like "Asterisk Call Manager/1.0". Having received a correct + * protocol identifier is the precodition for logging in. * * @param protocolIdentifier the protocol version received by the reader * @@ -550,11 +560,11 @@ public class DefaultManagerConnection im } /** - * This method is called by the reader if the connection to the asterisk server is lost. - * While keepAlive is <code>true</code> we will try to reconnect. Reconnection attempts - * will be stopped when the {@link #logoff()} method is called or when the login after a - * successful reconnect results in an {@link AuthenticationFailedException} suggesting that - * the manager credentials have changed and keepAliveAfterAuthenticationFailure is not set. + * This method is called by the reader if the connection to the asterisk server is lost. While + * keepAlive is <code>true</code> we will try to reconnect. Reconnection attempts will be + * stopped when the {@link #logoff()} method is called or when the login after a successful + * reconnect results in an {@link AuthenticationFailedException} suggesting that the manager + * credentials have changed and keepAliveAfterAuthenticationFailure is not set. */ void handleDisconnection() { @@ -580,7 +590,7 @@ public class DefaultManagerConnection im } else { - // slow down after 10 unsuccessful attempts asuming a + // slow down after 10 unsuccessful attempts asuming a // shutdown of the server Thread.sleep(5000); } @@ -632,10 +642,13 @@ public class DefaultManagerConnection im /* Helper classes */ /** - * A simple data object to store a ManagerResult. + * A simple data object to store a ManagerResult. */ private class ResponseHandlerResult implements Serializable { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 7831097958568769220L; private ManagerResponse response; @@ -655,11 +668,14 @@ public class DefaultManagerConnection im } /** - * A simple response handler that stores the received response in - * a ResponseHandlerResult for further processing. + * A simple response handler that stores the received response in a ResponseHandlerResult for + * further processing. */ private class DefaultResponseHandler implements ManagerResponseHandler, Serializable { + /** + * Serializable version identifier + */ private static final long serialVersionUID = 2926598671855316803L; private ResponseHandlerResult result; |
From: Stefan R. <sr...@us...> - 2005-02-23 21:33:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26097/src/java/net/sf/asterisk/manager Modified Files: AsteriskServer.java Channel.java Log Message: Index: AsteriskServer.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/AsteriskServer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AsteriskServer.java 23 Feb 2005 12:45:20 -0000 1.1 +++ AsteriskServer.java 23 Feb 2005 21:33:10 -0000 1.2 @@ -7,56 +7,87 @@ package net.sf.asterisk.manager; import java.io.Serializable; /** - * Represents an asterisk server that is connected via the manager API. - * + * Represents an Asterisk server that is connected via the Manager API. + * * @author PY * @version $Id$ */ public class AsteriskServer implements Serializable { private static final long serialVersionUID = 3257284738393125176L; - private String hostname = "localhost"; - private int port = 5038; + /** + * The hostname to use if none is provided. + */ + private static final String DEFAULT_HOSTNAME = "localhost"; + + /** + * The port to use if none is provided. + */ + private static final int DEFAULT_PORT = 5038; + + /** + * The hostname of the Asterisk server. + */ + private String hostname; + + /** + * The port on the Asterisk server the Asterisk Manager API is listening on. + */ + private int port; + + /** + * Creates a new AsteriskServer with default hostname and default port. + */ public AsteriskServer() { - + this.hostname = DEFAULT_HOSTNAME; + this.port = DEFAULT_PORT; } - public AsteriskServer(String hostname, int port) + /** + * Creates a new Asterisk server with the given hostname and port. + * @param hostname the hostname of the Asterisk server + * @param port the port on the Asterisk server the Asterisk Manager API is listening on + */ + public AsteriskServer(final String hostname, final int port) { this.hostname = hostname; this.port = port; } /** - * @return Returns the hostname. + * Returns the hostname. + * @return the hostname */ - public String getHostname() + public final String getHostname() { return hostname; } /** - * @param hostname The hostname to set. + * Sets the hostname. + * @param hostname the hostname to set */ - public void setHostname(String hostname) + public final void setHostname(final String hostname) { this.hostname = hostname; } /** - * @return Returns the port. + * Returns the port. + * @return the port */ - public int getPort() + public final int getPort() { return port; } /** - * @param port The port to set. + * Sets the port. + * @param port the port to set. */ - public void setPort(int port) + public final void setPort(final int port) { this.port = port; } Index: Channel.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Channel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- Channel.java 23 Feb 2005 12:45:20 -0000 1.1 +++ Channel.java 23 Feb 2005 21:33:10 -0000 1.2 @@ -20,31 +20,66 @@ public class Channel implements Serializ private static final long serialVersionUID = -6919877370396385380L; private AsteriskServer asteriskServer; + + /** + * Unique id of this channel. + */ private String id; + + /** + * Name of this channel. + */ private String name; + + /** + * Caller ID of this channel. + */ private String callerId; + + /** + * State of this channel. + */ private ChannelStateEnum state; + + /** + * Account code used to bill this channel. + */ private String account; private String context; private String extension; private Integer priority; private String application; private String appData; + + /** + * Date this channel has been created. + */ private Date dateOfCreation; + + /** + * If this channel is bridged to another channel, the linkedChannel contains the channel this + * channel is bridged with. + */ private Channel linkedChannel; /** - * Creates a new channel. - * @param name name of this channel, for example "SIP/1310-20da" - * @param id unique id of this channel, for example "1099015093.165" + * Creates a new Channel. + * @param name name of this channel, for example "SIP/1310-20da". + * @param id unique id of this channel, for example "1099015093.165". */ - public Channel(String name, String id) + public Channel(final String name, final String id) { this.name = name; this.id = id; } - public Channel(String name, String id, AsteriskServer server) + /** + * Creates a new Channel on the given server. + * @param name name of this channel, for example "SIP/1310-20da". + * @param id unique id of this channel, for example "1099015093.165". + * @param server the Asterisk server this channel exists on. + */ + public Channel(final String name, final String id, final AsteriskServer server) { this.name = name; this.id = id; @@ -52,153 +87,187 @@ public class Channel implements Serializ } /** - * @return Returns the asteriskServer. + * Returns the Asterisk server. + * @return the Asterisk server. */ - public AsteriskServer getAsteriskServer() + public final AsteriskServer getAsteriskServer() { return asteriskServer; } /** - * @param asteriskServer The asteriskServer to set. + * Sets the Asterisk server. + * @param asteriskServer the Asterisk server to set. */ - public void setAsteriskServer(AsteriskServer asteriskServer) + public final void setAsteriskServer(final AsteriskServer asteriskServer) { this.asteriskServer = asteriskServer; } /** * Returns the unique id of this channel, for example "1099015093.165". + * @return the unique id of this channel. */ - public String getId() + public final String getId() { return id; } /** * Returns the name of this channel, for example "SIP/1310-20da". + * @return the name of this channel. */ - public String getName() + public final String getName() { return name; } /** * Sets the name of this channel. + * @param name the name of this channel. */ - public void setName(String name) + public final void setName(final String name) { this.name = name; } /** * Returns the caller id of this channel. + * @return the caller id of this channel. */ - public String getCallerId() + public final String getCallerId() { return callerId; } /** * Sets the caller id of this channel. + * @param callerId the calleid id of this channel. */ - public void setCallerId(String callerId) + public final void setCallerId(final String callerId) { this.callerId = callerId; } /** * Returns the state of this channel. + * @return the state of this channel. */ - public ChannelStateEnum getState() + public final ChannelStateEnum getState() { return state; } /** * Sets the state of this channel. + * @param state the state of this channel. */ - public void setState(ChannelStateEnum state) + public final void setState(final ChannelStateEnum state) { this.state = state; } - public String getAccount() + /** + * Returns the account code used to bill this channel. + * @return the account code used to bill this channel. + */ + public final String getAccount() { return account; } - public void setAccount(String account) + /** + * Sets the account code used to bill this channel. + * @param account the account code used to bill this channel. + */ + public final void setAccount(final String account) { this.account = account; } - public String getContext() + public final String getContext() { return context; } - public void setContext(String context) + public final void setContext(final String context) { this.context = context; } - public String getExtension() + public final String getExtension() { return extension; } - public void setExtension(String extension) + public final void setExtension(final String extension) { this.extension = extension; } - public Integer getPriority() + public final Integer getPriority() { return priority; } - public void setPriority(Integer priority) + public final void setPriority(final Integer priority) { this.priority = priority; } - public String getApplication() + public final String getApplication() { return application; } - public void setApplication(String application) + public final void setApplication(final String application) { this.application = application; } - public String getAppData() + public final String getAppData() { return appData; } - public void setAppData(String appData) + public final void setAppData(final String appData) { this.appData = appData; } - public Date getDateOfCreation() + /** + * Returns the date this channel has been created. + * @return the date this channel has been created. + */ + public final Date getDateOfCreation() { return dateOfCreation; } - public void setDateOfCreation(Date dateOfCreation) + /** + * Sets the date this channel has been created. + * @param dateOfCreation the date this channel has been created. + */ + public final void setDateOfCreation(final Date dateOfCreation) { this.dateOfCreation = dateOfCreation; } - public Channel getLinkedChannel() + /** + * Returns the channel this channel is bridged with, if any. + * @return the channel this channel is bridged with, or <code>null</code> if this channel is + * currently not bridged to another channel. + */ + public final Channel getLinkedChannel() { return linkedChannel; } - public void setLinkedChannel(Channel linkedChannel) + /** + * Sets the channel this channel is bridged with. + * @param linkedChannel the channel this channel is bridged with. + */ + public final void setLinkedChannel(final Channel linkedChannel) { this.linkedChannel = linkedChannel; } @@ -222,5 +291,4 @@ public class Channel implements Serializ { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } - } |
From: Stefan R. <sr...@us...> - 2005-02-23 16:15:50
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9903 Modified Files: project.properties project.xml Log Message: Index: project.properties =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- project.properties 23 Feb 2005 14:03:54 -0000 1.2 +++ project.properties 23 Feb 2005 16:15:24 -0000 1.3 @@ -1,3 +1,4 @@ +maven.repo.remote = http://www.ibiblio.org/maven,http://maven.reucon.net/maven # Site generation properties maven.xdoc.date = left @@ -8,6 +9,12 @@ maven.html2xdoc.enabled = true maven.remote.group = asterisk-java maven.site.deploy.method = ssh +# Repository to deploy to +maven.repo.list = reucon +maven.repo.reucon = scpexe://maven.reucon.com +maven.repo.reucon.directory = /var/www/maven.reucon.com/htdocs/maven +maven.repo.reucon.username = ${maven.username} + maven.jar.override = on maven.jar.commons-lang = /home/srt/workspace/asterisk-java/lib/commons-lang-2.0.jar Index: project.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- project.xml 23 Feb 2005 14:03:54 -0000 1.2 +++ project.xml 23 Feb 2005 16:15:27 -0000 1.3 @@ -58,8 +58,8 @@ </mailingList> <mailingList> <name>Asterisk-java CVS Commit List</name> - <subscribe>ast...@li...</subscribe> - <unsubscribe>ast...@li...</unsubscribe> + <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-cvs</subscribe> + <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-cvs</unsubscribe> <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=43809</archive> </mailingList> </mailingLists> |
From: Stefan R. <sr...@us...> - 2005-02-23 14:05:25
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1275/src/java/net/sf/asterisk/manager Modified Files: AuthenticationFailedException.java AsteriskManager.java Log Message: Index: AuthenticationFailedException.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/AuthenticationFailedException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AuthenticationFailedException.java 23 Feb 2005 12:45:20 -0000 1.1 +++ AuthenticationFailedException.java 23 Feb 2005 14:05:00 -0000 1.2 @@ -6,9 +6,9 @@ package net.sf.asterisk.manager; /** - * An AuthenticationFailedException is thrown when a login fails due to an + * An AuthenticationFailedException is thrown when a login fails due to an * incorrect username and/or password. - * + * * @author srt * @version $Id$ */ @@ -16,12 +16,21 @@ public class AuthenticationFailedExcepti { static final long serialVersionUID = 7674248607624140309L; - public AuthenticationFailedException(String message) + /** + * Creates a new AuthenticationFailedException with the given message. + * @param message message describing the authentication failure + */ + public AuthenticationFailedException(final String message) { super(message); } - public AuthenticationFailedException(String message, Throwable cause) + /** + * Creates a new AuthenticationFailedException with the given message and cause. + * @param message message describing the authentication failure + * @param cause exception that caused the authentication failure + */ + public AuthenticationFailedException(final String message, final Throwable cause) { super(message, cause); } Index: AsteriskManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/AsteriskManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- AsteriskManager.java 23 Feb 2005 13:02:05 -0000 1.2 +++ AsteriskManager.java 23 Feb 2005 14:05:01 -0000 1.3 @@ -29,7 +29,7 @@ public interface AsteriskManager /** * Returns a Map of active channels.<br> - * The map contain the channel name as keys and objects of type + * The map contain the channel names as keys and objects of type * {@link net.sf.asterisk.manager.Channel} as values. * @return a Map of active channels. */ |
From: Stefan R. <sr...@us...> - 2005-02-23 14:04:10
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv835 Modified Files: project.properties project.xml Log Message: added site deployment Index: project.properties =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- project.properties 23 Feb 2005 12:45:22 -0000 1.1 +++ project.properties 23 Feb 2005 14:03:54 -0000 1.2 @@ -1,3 +1,13 @@ + +# Site generation properties +maven.xdoc.date = left +maven.xdoc.version = ${pom.currentVersion} +maven.html2xdoc.enabled = true + +# Deploying site +maven.remote.group = asterisk-java +maven.site.deploy.method = ssh + maven.jar.override = on maven.jar.commons-lang = /home/srt/workspace/asterisk-java/lib/commons-lang-2.0.jar Index: project.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- project.xml 23 Feb 2005 12:45:22 -0000 1.1 +++ project.xml 23 Feb 2005 14:03:54 -0000 1.2 @@ -24,21 +24,15 @@ <shortDescription>Java Connector for Asterisk PBX</shortDescription> <url>http://asterisk-java.sourceforge.net/</url> - <siteAddress>jakarta.apache.org</siteAddress> - <siteDirectory> - /www/maven.apache.org/ - </siteDirectory> - <distributionDirectory> - /www/jakarta.apache.org/builds/jakarta-turbine-maven/ - </distributionDirectory> + <siteAddress>shell.sourceforge.net</siteAddress> + <siteDirectory>/home/groups/a/as/asterisk-java/htdocs/new</siteDirectory> + <distributionSite>shell.sourceforge.net</distributionSite> + <distributionDirectory>/home/groups/a/as/asterisk-java/htdocs/maven</distributionDirectory> <repository> - <connection> - scm:cvs:pserver:ano...@cv...:/cvsroot/asterisk-java:asterisk-java - </connection> - <url> - http://cvs.sourceforge.net/viewcvs.py/asterisk-java/asterisk-java/ - </url> + <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/asterisk-java:asterisk-java</connection> + <developerConnection>scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/asterisk-java:acegisecurity</developerConnection> + <url>http://cvs.sourceforge.net/viewcvs.py/asterisk-java/asterisk-java/</url> </repository> <versions> @@ -52,39 +46,21 @@ <mailingLists> <mailingList> <name>Asterisk-java User List</name> - <subscribe> - ast...@li... - </subscribe> - <unsubscribe> - ast...@li... - </unsubscribe> - <archive> - http://www.mail-archive.com/us...@ma.../ - </archive> + <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users</subscribe> + <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users</unsubscribe> + <archive></archive> </mailingList> <mailingList> <name>Asterisk-java Developer List</name> - <subscribe> - ast...@li... - </subscribe> - <unsubscribe> - ast...@li... - </unsubscribe> - <archive> - http://www.mail-archive.com/de...@ma.../ - </archive> + <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel</subscribe> + <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel</unsubscribe> + <archive></archive> </mailingList> <mailingList> <name>Asterisk-java CVS Commit List</name> - <subscribe> - ast...@li... - </subscribe> - <unsubscribe> - ast...@li... - </unsubscribe> - <archive> - http://sourceforge.net/mailarchive/forum.php?forum_id=43809 - </archive> + <subscribe>ast...@li...</subscribe> + <unsubscribe>ast...@li...</unsubscribe> + <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=43809</archive> </mailingList> </mailingLists> @@ -93,14 +69,14 @@ <developer> <name>Stefan Reuter</name> <id>srt</id> - <email>sr...@re...</email> + <email>srt at users.sourceforge.net</email> <organization></organization> </developer> <developer> <name>Pierre-Yves Roger</name> <id>partoutatis</id> - <email>par...@us...</email> + <email>partoutatis at users.sourceforge.net</email> </developer> </developers> @@ -157,7 +133,6 @@ </nagEmailAddress> <sourceDirectory>src/java</sourceDirectory> - <unitTestSourceDirectory>src/test</unitTestSourceDirectory> <aspectSourceDirectory/> |
From: Stefan R. <sr...@us...> - 2005-02-23 13:02:15
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16076/src/java/net/sf/asterisk/manager Modified Files: AsteriskManager.java Log Message: added javadoc Index: AsteriskManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/AsteriskManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AsteriskManager.java 23 Feb 2005 12:45:20 -0000 1.1 +++ AsteriskManager.java 23 Feb 2005 13:02:05 -0000 1.2 @@ -27,7 +27,18 @@ public interface AsteriskManager */ String originateCall(OriginateAction originateAction) throws TimeoutException, IOException; + /** + * Returns a Map of active channels.<br> + * The map contain the channel name as keys and objects of type + * {@link net.sf.asterisk.manager.Channel} as values. + * @return a Map of active channels. + */ Map getChannels(); + /** + * Returns a Map of all queues.<br> + * The map contains the queue names as keys and objects of type {@link Queue} as values. + * @return a Map of queues. + */ Map getQueues(); } |
From: Stefan R. <sr...@us...> - 2005-02-23 12:55:49
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14597/src/java/net/sf/asterisk/manager Modified Files: ActionBuilder.java Log Message: fixed javadoc Index: ActionBuilder.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ActionBuilder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ActionBuilder.java 23 Feb 2005 12:45:20 -0000 1.1 +++ ActionBuilder.java 23 Feb 2005 12:55:41 -0000 1.2 @@ -19,13 +19,16 @@ import org.apache.commons.logging.LogFac /** * Transforms ManagerActions to Strings suitable to be sent to Asterisk.<br> - * The attributes are determined using reflection. + * The attributes are determined using reflection. * * @author srt * @version $Id$ */ public class ActionBuilder { + /** + * Instance logger. + */ private final Log logger = LogFactory.getLog(getClass()); /** @@ -66,12 +69,12 @@ public class ActionBuilder } catch (IllegalAccessException ex) { - logger.error("Unable to retrieve property '" + name + " of " + action.getClass(), ex); + logger.error("Unable to retrieve property '" + name + "' of " + action.getClass(), ex); continue; } catch (InvocationTargetException ex) { - logger.error("Unable to retrieve property '" + name + " of " + action.getClass(), ex); + logger.error("Unable to retrieve property '" + name + "' of " + action.getClass(), ex); continue; } |
From: Stefan R. <sr...@us...> - 2005-02-23 12:45:33
|
Update of /cvsroot/asterisk-java/asterisk-java/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/build Modified Files: global.properties Log Message: moved src and test to src/java and src/test first steps to introduce maven Index: global.properties =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/build/global.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- global.properties 15 Sep 2004 01:18:53 -0000 1.1 +++ global.properties 23 Feb 2005 12:45:23 -0000 1.2 @@ -1,4 +1,4 @@ -src.dir = src +src.dir = src/java build.dir = tmp dist.dir = dist |
From: Stefan R. <sr...@us...> - 2005-02-23 12:45:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/java/net/sf/asterisk/manager/response Added Files: ManagerResponse.java MailboxStatusResponse.java CommandResponse.java ChallengeResponse.java ManagerError.java ExtensionStateResponse.java MailboxCountResponse.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: ManagerResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.response; import java.io.Serializable; import java.util.Date; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; /** * Represents a response received from the Asterisk server as the result of a previously sent * ManagerAction.<br> * The response can be linked with the action that caused it by looking the action id * attribute that will match the action id of the corresponding action. * * @see net.sf.asterisk.manager.action.ManagerAction * @author srt * @version $Id: ManagerResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ManagerResponse implements Serializable { static final long serialVersionUID = -935845815108584292L; private Date dateReceived; private String actionId; private String response; private String message; private String uniqueId; /** * Returns the point in time this response was received from the asterisk server. */ public Date getDateReceived() { return dateReceived; } /** * Sets the point in time this response was received from the asterisk server. */ public void setDateReceived(Date dateReceived) { this.dateReceived = dateReceived; } /** * Returns the action id received with this response referencing the action * that generated this response. */ public String getActionId() { return actionId; } /** * Sets the action id. */ public void setActionId(String actionId) { this.actionId = actionId; } /** * Returns the message received with this response. * The content depends on the action that generated this response. */ public String getMessage() { return message; } /** * Sets the message. */ public void setMessage(String message) { this.message = message; } /** * Returns the value of the "Response:" line. * This typically a String like "Success" or "Error" but depends on the action that * generated this response. */ public String getResponse() { return response; } /** * Sets the response. */ public void setResponse(String response) { this.response = response; } /** * Returns the unique id received with this response. * The unique id is used to keep track of channels created by the action sent, * for example an OriginateAction. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id received with this response. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } final public String toString() { return ToStringBuilder.reflectionToString(this); } public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } } --- NEW FILE: MailboxStatusResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; /** * A MailboxStatusResponse is sent in response to a MailboxStatusAction * and indicates if a mailbox contains waiting messages. * * @see net.sf.asterisk.manager.action.MailboxStatusAction * * @author srt * @version $Id: MailboxStatusResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class MailboxStatusResponse extends ManagerResponse { private static final long serialVersionUID = -7193581424292429279L; private String mailbox; private Integer waiting; /** * Returns the name of the mailbox. */ public String getMailbox() { return mailbox; } /** * Sets the name of the mailbox. */ public void setMailbox(String mailbox) { this.mailbox = mailbox; } /** * Returns 1 if the mailbox has waiting messages; 0 otherwise. */ public Integer getWaiting() { return waiting; } /** * Set to 1 if the mailbox has waiting messages; 0 otherwise. */ public void setWaiting(Integer waiting) { this.waiting = waiting; } } --- NEW FILE: CommandResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 25, 2004 */ package net.sf.asterisk.manager.response; import java.util.List; /** * Corresponds to a CommandAction.<br> * * Asterisk's handling of the command action is generelly quite hairy. It sends a "Response: Follows" * line followed by the raw output of the command including empty lines. At the end of the command * output a line containing "--END COMMAND--" is sent. The reader parses this response into a * CommandResponse object to hide these details. * * @see net.sf.asterisk.manager.action.CommandAction * * @author srt * @version $Id: CommandResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class CommandResponse extends ManagerResponse { static final long serialVersionUID = -350763332794275049L; protected List result; /** * Returns a List containing strings representing the lines returned by * the CLI command. */ public List getResult() { return result; } /** * Sets the result. */ public void setResult(List result) { this.result = result; } } --- NEW FILE: ChallengeResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.response; /** * Corresponds to a ChallengeAction and contains the challenge needed to log in * using challenge/response. * * @see net.sf.asterisk.manager.action.ChallengeAction * @see net.sf.asterisk.manager.action.LoginAction * * @author srt * @version $Id: ChallengeResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ChallengeResponse extends ManagerResponse { static final long serialVersionUID = -7253724086340850957L; private String challenge; /** * Returns the challenge to use when creating the key for log in. * * @see net.sf.asterisk.manager.action.LoginAction#key */ public String getChallenge() { return challenge; } /** * Sets the challenge to use when creating the key for log in. */ public void setChallenge(String challenge) { this.challenge = challenge; } } --- NEW FILE: ManagerError.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.response; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; /** * Represents an "Response: Error" response received from the asterisk server. * The cause for the error is given in the message attribute. * * @author srt * @version $Id: ManagerError.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ManagerError extends ManagerResponse { static final long serialVersionUID = -8753149536715547476L; /** * */ public ManagerError() { } public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } } --- NEW FILE: ExtensionStateResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; /** * @author srt * @version $Id: ExtensionStateResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ExtensionStateResponse extends ManagerResponse { private static final long serialVersionUID = -2044248427247227390L; private String exten; private String context; private String hint; private Integer status; public String getExten() { return exten; } public void setExten(String exten) { this.exten = exten; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getHint() { return hint; } public void setHint(String hint) { this.hint = hint; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } } --- NEW FILE: MailboxCountResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; /** * A MailboxCountResponse is sent in response to a MailboxCountAction * and contains the number of old and new messages in a mailbox. * * @see net.sf.asterisk.manager.action.MailboxCountAction * * @author srt * @version $Id: MailboxCountResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class MailboxCountResponse extends ManagerResponse { private static final long serialVersionUID = 7820598941277275838L; private String mailbox; private Integer newMessages; private Integer oldMessages; /** * Returns the name of the mailbox. */ public String getMailbox() { return mailbox; } /** * Sets the name of the mailbox. */ public void setMailbox(String mailbox) { this.mailbox = mailbox; } /** * Returns the number of new messages in the mailbox. */ public Integer getNewMessages() { return newMessages; } /** * Sets the number of new messages in the mailbox. */ public void setNewMessages(Integer newMessages) { this.newMessages = newMessages; } /** * Returns the number of old messages in the mailbox. */ public Integer getOldMessages() { return oldMessages; } /** * Sets the number of old messages in the mailbox. */ public void setOldMessages(Integer oldMessages) { this.oldMessages = oldMessages; } } |
From: Stefan R. <sr...@us...> - 2005-02-23 12:45:33
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816 Modified Files: .classpath Added Files: project.xml checkstyle.xml project.properties Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: project.xml --- <?xml version="1.0"?> <project> <pomVersion>3</pomVersion> <id>asterisk-java</id> <name>asterisk-java</name> <currentVersion>0.1-SNAPSHOT</currentVersion> <organization> <name>Stefan Reuter</name> <url>http://sourceforge.net/projects/asterisk-java/</url> <logo>http://sourceforge.net/sflogo.php?group_id=118998&type=5</logo> </organization> <inceptionYear>2004</inceptionYear> <package>net.sf.asterisk</package> <!-- Gump integration --> <gumpRepositoryId>asterisk-java</gumpRepositoryId> <description> Asterisk-java consists of a set of Java classes that allow you to control an Asterisk PBX via Asterisk's Manager API from Java applications. </description> <shortDescription>Java Connector for Asterisk PBX</shortDescription> <url>http://asterisk-java.sourceforge.net/</url> <siteAddress>jakarta.apache.org</siteAddress> <siteDirectory> /www/maven.apache.org/ </siteDirectory> <distributionDirectory> /www/jakarta.apache.org/builds/jakarta-turbine-maven/ </distributionDirectory> <repository> <connection> scm:cvs:pserver:ano...@cv...:/cvsroot/asterisk-java:asterisk-java </connection> <url> http://cvs.sourceforge.net/viewcvs.py/asterisk-java/asterisk-java/ </url> </repository> <versions> <version> <id>b1</id> <name>0.1-b1</name> <tag>HEAD</tag> </version> </versions> <mailingLists> <mailingList> <name>Asterisk-java User List</name> <subscribe> ast...@li... </subscribe> <unsubscribe> ast...@li... </unsubscribe> <archive> http://www.mail-archive.com/us...@ma.../ </archive> </mailingList> <mailingList> <name>Asterisk-java Developer List</name> <subscribe> ast...@li... </subscribe> <unsubscribe> ast...@li... </unsubscribe> <archive> http://www.mail-archive.com/de...@ma.../ </archive> </mailingList> <mailingList> <name>Asterisk-java CVS Commit List</name> <subscribe> ast...@li... </subscribe> <unsubscribe> ast...@li... </unsubscribe> <archive> http://sourceforge.net/mailarchive/forum.php?forum_id=43809 </archive> </mailingList> </mailingLists> <developers> <developer> <name>Stefan Reuter</name> <id>srt</id> <email>sr...@re...</email> <organization></organization> </developer> <developer> <name>Pierre-Yves Roger</name> <id>partoutatis</id> <email>par...@us...</email> </developer> </developers> <dependencies> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.8</version> <properties> <dependencyType>lib</dependencyType> </properties> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.3</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.0</version> </dependency> <!-- <dependency> <groupId>bcel</groupId> <artifactId>bcel</artifactId> <version>5.0</version> <url>http://jakarta.apache.org/bcel/</url> </dependency> . . . <dependency> <groupId>regexp</groupId> <artifactId>regexp</artifactId> <version>1.2</version> <url>http://jakarta.apache.org/regexp/</url> </dependency> --> </dependencies> <build> <nagEmailAddress> sr...@re... </nagEmailAddress> <sourceDirectory>src/java</sourceDirectory> <unitTestSourceDirectory>src/test</unitTestSourceDirectory> <aspectSourceDirectory/> <!-- Unit test cases --> <unitTest> <includes> <include>**/*Test.java</include> </includes> <excludes> <exclude>**/RepositoryTest.java</exclude> </excludes> </unitTest> <!-- J A R R E S O U R C E S --> <!-- Resources that are packaged up inside the JAR file --> <resources> <resource> <directory>${basedir}/src/resources/misc</directory> <includes> <include>*.xsd</include> </includes> </resource> <resource> <directory>${basedir}/src/resources/logging</directory> <includes> <include>log4j.properties</include> </includes> </resource> </resources> </build> </project> --- NEW FILE: checkstyle.xml --- <?xml version="1.0"?> <!-- /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> <!-- Checkstyle configuration that checks the sun coding conventions from: - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - some best practices Checkstyle is very configurable. Be sure to read the documentation at http://checkstyle.sf.net (or in your downloaded distribution). Most Checks are configurable, be sure to consult the documentation. To completely disable a check, just comment it out or delete it from the file. Finally, it is worth reading the documentation. --> <module name="Checker"> <!-- Checks that a package.html file exists for each package. --> <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml --> <module name="PackageHtml"/> <!-- Checks whether files end with a new line. --> <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> <module name="NewlineAtEndOfFile"/> <!-- Checks that property files contain the same keys. --> <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> <module name="Translation"/> <module name="TreeWalker"> <property name="cacheFile" value="${checkstyle.cache.file}"/> <!-- ************************************************************** --> <!-- Checks that are different from the sun coding conventions ones --> <!-- ************************************************************** --> <property name="tabWidth" value="4"/> <module name="LeftCurly"> <property name="option" value="nl"/> </module> <module name="RightCurly"> <property name="option" value="alone"/> </module> <module name="LineLength"> <property name="max" value="120"/> <property name="ignorePattern" value="@version"/> </module> <module name="MemberName"> <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> </module> <!-- ************************************************************** --> <!-- Default Sun coding conventions checks --> <!-- ************************************************************** --> <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> <module name="JavadocMethod"/> <module name="JavadocType"/> <module name="JavadocVariable"/> <!-- Checks for Naming Conventions. --> <!-- See http://checkstyle.sf.net/config_naming.html --> <module name="ConstantName"/> <module name="LocalFinalVariableName"/> <module name="LocalVariableName"/> <module name="MethodName"/> <module name="PackageName"/> <module name="ParameterName"/> <module name="StaticVariableName"/> <module name="TypeName"/> <!-- Checks for Headers --> <!-- See http://checkstyle.sf.net/config_header.html --> <module name="Header"> <!-- The follow property value demonstrates the ability --> <!-- to have access to ANT properties. In this case it uses --> <!-- the ${basedir} property to allow Checkstyle to be run --> <!-- from any directory within a project. --> <property name="headerFile" value="${checkstyle.header.file}"/> <property name="ignoreLines" value="1,6"/> </module> <!-- Following interprets the header file as regular expressions. --> <!-- <module name="RegexpHeader"/> --> <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="AvoidStarImport"/> <module name="IllegalImport"/> <!-- defaults to sun.* packages --> <module name="RedundantImport"/> <module name="UnusedImports"/> <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="FileLength"/> <module name="MethodLength"/> <module name="ParameterNumber"/> <!-- Checks for whitespace --> <!-- See http://checkstyle.sf.net/config_whitespace.html --> <module name="EmptyForIteratorPad"/> <module name="NoWhitespaceAfter"/> <module name="NoWhitespaceBefore"/> <module name="OperatorWrap"/> <module name="ParenPad"/> <module name="TabCharacter"/> <module name="WhitespaceAfter"/> <module name="WhitespaceAround"/> <!-- Modifier Checks --> <!-- See http://checkstyle.sf.net/config_modifiers.html --> <module name="ModifierOrder"/> <module name="RedundantModifier"/> <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <module name="AvoidNestedBlocks"/> <module name="EmptyBlock"/> <module name="NeedBraces"/> <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> <module name="AvoidInlineConditionals"/> <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <module name="HiddenField"/> <module name="IllegalInstantiation"/> <module name="InnerAssignment"/> <module name="MagicNumber"/> <module name="MissingSwitchDefault"/> <module name="RedundantThrows"/> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> <!-- Checks for class design --> <!-- See http://checkstyle.sf.net/config_design.html --> <module name="DesignForExtension"/> <module name="FinalClass"/> <module name="HideUtilityClassConstructor"/> <module name="InterfaceIsType"/> <module name="VisibilityModifier"/> <!-- Miscellaneous other checks. --> <!-- See http://checkstyle.sf.net/config_misc.html --> <module name="ArrayTypeStyle"/> <module name="FinalParameters"/> <module name="GenericIllegalRegexp"> <property name="format" value="\s+$"/> <property name="message" value="Line has trailing spaces."/> </module> <module name="TodoComment"/> <module name="UpperEll"/> </module> </module> --- NEW FILE: project.properties --- maven.jar.override = on maven.jar.commons-lang = /home/srt/workspace/asterisk-java/lib/commons-lang-2.0.jar maven.checkstyle.properties = checkstyle.xml maven.compile.source = 1.3 maven.compile.target = 1.3 Index: .classpath =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/.classpath,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- .classpath 24 Sep 2004 09:27:07 -0000 1.2 +++ .classpath 23 Feb 2005 12:45:22 -0000 1.3 @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="src/java"/> + <classpathentry kind="src" path="src/test"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="lib/commons-logging.jar"/> - <classpathentry kind="lib" path="lib/commons-lang-2.0.jar"/> - <classpathentry kind="src" path="test"/> <classpathentry kind="var" path="JUNIT_HOME/junit.jar"/> + <classpathentry kind="lib" path="lib/commons-lang-2.0.jar"/> <classpathentry kind="output" path="bin"/> </classpath> |
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/test/net/sf/asterisk/manager Added Files: TestEventBuilder.java TestDefaultManagerConnection.java TestDefaultAsteriskManager.java TestMultiAsteriskManager.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: TestEventBuilder.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager; import java.util.HashMap; import java.util.Map; import junit.framework.TestCase; import net.sf.asterisk.manager.event.ChannelEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; import net.sf.asterisk.manager.event.ShutdownEvent; /** * @author srt * @version $Id: TestEventBuilder.java,v 1.1 2005/02/23 12:45:23 srt Exp $ */ public class TestEventBuilder extends TestCase { private EventBuilder getEventBuilder() { return new EventBuilder(); } public void testRegisterEvent() { EventBuilder eb = getEventBuilder(); eb.registerEventClass(NewChannelEvent.class); } public void testRegisterEventWithAbstractEvent() { EventBuilder eb = getEventBuilder(); try { eb.registerEventClass(ChannelEvent.class); fail("registerEvent() must not accept abstract classes"); } catch (IllegalArgumentException ex) { } } public void testRegisterEventWithWrongClass() { EventBuilder eb = getEventBuilder(); try { eb.registerEventClass(String.class); fail("registerEvent() must only accept subclasses of ManagerEvent"); } catch (IllegalArgumentException ex) { } } /* public void testGetSetters() { Map setters; EventBuilder eb = getEventBuilder(); setters = eb.getSetters(NewChannelEvent.class); assertTrue("Setter not found", setters.containsKey("callerid")); } */ public void testBuildEventWithMixedCaseSetter() { EventBuilder eb = getEventBuilder(); Map properties = new HashMap(); String callerid = "1234"; NewChannelEvent event; properties.put("event", "Newchannel"); properties.put("callerid", callerid); event = (NewChannelEvent) eb.buildEvent(this, properties); assertNotNull(event); assertEquals("Returned event is of wrong type", NewChannelEvent.class, event.getClass()); assertEquals("String property not set correctly", callerid, event.getCallerId()); assertEquals("Source not set correctly", this, event.getSource()); } public void testBuildEventWithIntegerProperty() { EventBuilder eb = getEventBuilder(); Map properties = new HashMap(); String channel = "SIP/1234"; Integer priority = new Integer(1); NewExtenEvent event; properties.put("event", "newexten"); properties.put("channel", channel); properties.put("priority", priority.toString()); event = (NewExtenEvent) eb.buildEvent(this, properties); assertNotNull(event); assertEquals("Returned event is of wrong type", NewExtenEvent.class, event.getClass()); assertEquals("String property not set correctly", channel, event.getChannel()); assertEquals("Integer property not set correctly", priority, event.getPriority()); } public void testBuildEventWithBooleanProperty() { EventBuilder eb = getEventBuilder(); Map properties = new HashMap(); ShutdownEvent event; eb.registerEventClass(ShutdownEvent.class); properties.put("event", "shutdown"); properties.put("restart", "True"); event = (ShutdownEvent) eb.buildEvent(this, properties); assertNotNull(event); assertEquals("Returned event is of wrong type", ShutdownEvent.class, event.getClass()); assertEquals("Boolean property not set correctly", Boolean.TRUE, event.getRestart()); } public void testBuildEventWithUnregisteredEvent() { EventBuilder eb = getEventBuilder(); Map properties = new HashMap(); ManagerEvent event; properties.put("event", "Nonexisting"); event = eb.buildEvent(this, properties); assertNull(event); } } --- NEW FILE: TestDefaultManagerConnection.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager; import junit.framework.TestCase; import net.sf.asterisk.manager.action.StatusAction; import net.sf.asterisk.manager.event.ManagerEvent; /** * @author srt * @version $Id: TestDefaultManagerConnection.java,v 1.1 2005/02/23 12:45:23 srt Exp $ */ public class TestDefaultManagerConnection extends TestCase { private DefaultManagerConnection getDefaultManagerConnection() { DefaultManagerConnection dmc; dmc = new DefaultManagerConnection(); dmc.setUsername("manager"); dmc.setPassword("obelisk"); dmc.setHostname("deprecated"); return dmc; } public void testLogin() throws Exception { DefaultManagerConnection dmc; dmc = getDefaultManagerConnection(); dmc.login(); dmc.addEventHandler(new ManagerEventHandler() { public void handleEvent(ManagerEvent event) { System.out.println(event); } }); dmc.sendAction(new StatusAction()); // wait for 3 seconds to receive events Thread.sleep(3000); dmc.logoff(); } } --- NEW FILE: TestDefaultAsteriskManager.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 28, 2004 */ package net.sf.asterisk.manager; import junit.framework.TestCase; /** * @author srt * @version $Id: TestDefaultAsteriskManager.java,v 1.1 2005/02/23 12:45:23 srt Exp $ */ public class TestDefaultAsteriskManager extends TestCase { protected DefaultAsteriskManager getDefaultManager() { DefaultAsteriskManager dm = new DefaultAsteriskManager(); DefaultManagerConnection dmc = new DefaultManagerConnection(); dmc.setHostname("deprecated"); dmc.setUsername("manager"); dmc.setPassword("obelisk"); dm.setManagerConnection(dmc); return dm; } public void testInit() throws Exception { DefaultAsteriskManager dm = getDefaultManager(); dm.initialize(); try { Thread.sleep(30000); } catch (InterruptedException e) { } System.out.println(dm.getChannels()); } } --- NEW FILE: TestMultiAsteriskManager.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 28, 2004 */ package net.sf.asterisk.manager; import junit.framework.TestCase; /** * @author PY * @version $Id: TestMultiAsteriskManager.java,v 1.1 2005/02/23 12:45:23 srt Exp $ */ public class TestMultiAsteriskManager extends TestCase { protected MultiAsterisksManager getDefaultManager() { MultiAsterisksManager mam = new MultiAsterisksManager(); DefaultManagerConnection dmc1 = new DefaultManagerConnection(); dmc1.setHostname("asterisk1"); dmc1.setUsername("username"); dmc1.setPassword("password"); mam.addManagerConnection(dmc1); DefaultManagerConnection dmc2 = new DefaultManagerConnection(); dmc2.setHostname("asterisk2"); dmc2.setUsername("username"); dmc2.setPassword("password"); mam.addManagerConnection(dmc2); return mam; } public void testInit() throws Exception { MultiAsterisksManager mam = getDefaultManager(); mam.initialize(); try { Thread.sleep(5000); } catch (InterruptedException e) { } System.out.println(mam.getChannels()); } } |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/java/net/sf/asterisk/manager/event Added Files: QueueEntryEvent.java PeerStatusEvent.java OriginateSuccessEvent.java AgentCallbackLogoffEvent.java StatusEvent.java ChannelEvent.java NewChannelEvent.java AgentLogoffEvent.java ReloadEvent.java QueueEvent.java UnlinkEvent.java ZapShowChannelsCompleteEvent.java RenameEvent.java StatusCompleteEvent.java HangupEvent.java ConnectEvent.java ParkedCallEvent.java LeaveEvent.java JoinEvent.java ExtensionStatusEvent.java LinkageEvent.java LinkEvent.java NewCallerIdEvent.java NewExtenEvent.java AlarmClearEvent.java NewStateEvent.java AgentCallbackLoginEvent.java QueueParamsEvent.java DisconnectEvent.java AgentLoginEvent.java QueueMemberEvent.java HoldedCallEvent.java OriginateFailureEvent.java MeetMeJoinEvent.java ZapShowChannelsEvent.java AgentCalledEvent.java MeetMeLeaveEvent.java ResponseEvent.java MessageWaitingEvent.java ParkedCallsCompleteEvent.java MeetMeEvent.java ShutdownEvent.java RegistryEvent.java CdrEvent.java ManagerEvent.java OriginateEvent.java AlarmEvent.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: QueueEntryEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A QueueEntryEvent is triggered in response to a QueueStatusAction and contains * information about an entry in a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction * * @author srt * @version $Id: QueueEntryEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class QueueEntryEvent extends ResponseEvent { private static final long serialVersionUID = 3419114730595151514L; private String queue; private Integer position; private String channel; private String callerId; private Long wait; /** * @param source */ public QueueEntryEvent(Object source) { super(source); } /** * Returns the name of the queue that contains this entry. */ public String getQueue() { return queue; } /** * Sets the name of the queue that contains this entry. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the position of this entry in the queue. */ public Integer getPosition() { return position; } /** * Sets the position of this entry in the queue. */ public void setPosition(Integer position) { this.position = position; } /** * Returns the name of the channel of this entry. */ public String getChannel() { return channel; } /** * Sets the name of the channel of this entry. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the callerid of the channel of this entry. */ public String getCallerId() { return callerId; } /** * Sets the callerid of the channel of this entry. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the number of seconds this entry has spent in the queue. */ public Long getWait() { return wait; } /** * Sets the number of seconds this entry has spent in the queue. */ public void setWait(Long wait) { this.wait = wait; } } --- NEW FILE: PeerStatusEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** * A PeerStatusEvent is triggered when a SIP or IAX client attempts to registrer * at this asterisk server.<br> * This event is implemented in <code>channels/chan_iax2.c</code> and * <code>channels/chan_sip.c</code> * * @author srt * @version $Id: PeerStatusEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class PeerStatusEvent extends ManagerEvent { private static final long serialVersionUID = 8384939771592846892L; private String peer; private String peerStatus; private String cause; private Integer time; /** * @param source */ public PeerStatusEvent(Object source) { super(source); } /** * Returns the name of the peer that registered. The peer's name starts * with "IAX2/" if it is an IAX client or "SIP/" if it is a SIP client. * It is followed by the username that is used for registration. */ public String getPeer() { return peer; } /** * Sets the name of the peer that registered. */ public void setPeer(String peer) { this.peer = peer; } /** * Returns the registration state.<br> * This may be one of * <ul> * <li>Registered</li> * <li>Unregistered</li> * <li>Reachable</li> * <li>Lagged</li> * <li>Rejected (IAX only)</li> * <li>Unreachable</li> * </ul> */ public String getPeerStatus() { return peerStatus; } /** * Sets the registration state. */ public void setPeerStatus(String peerStatus) { this.peerStatus = peerStatus; } /** * Returns the cause of a rejection or unregistration.<br> * For IAX peers this is set only if the status equals "Rejected".<br> * For SIP peers this is set if the status equals "Unregistered" and the * peer was unregistered due to an expiration. In that case the cause is set * to "Expired". */ public String getCause() { return cause; } /** * Sets the cause of the rejection or unregistration. */ public void setCause(String cause) { this.cause = cause; } /** * Returns the ping time of the client if status equals "Reachable" or "Lagged"; if * the status equals "Unreachable" it returns how long the last response took * (in ms) for IAX peers or -1 for SIP peers. */ public Integer getTime() { return time; } public void setTime(Integer time) { this.time = time; } } --- NEW FILE: OriginateSuccessEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * An OriginateSuccessEvent is triggered when the execution of an OriginateAction * succeeded. * * @see net.sf.asterisk.manager.action.OriginateAction * * @author srt * @version $Id: OriginateSuccessEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class OriginateSuccessEvent extends OriginateEvent { private static final long serialVersionUID = -5086668438614692086L; /** * @param source */ public OriginateSuccessEvent(Object source) { super(source); } } --- NEW FILE: AgentCallbackLogoffEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCallbackLogoffEvent is triggered when an agent that previously logged in * using AgentCallbackLogin is logged of.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentCallbackLoginEvent * @author srt * @version $Id: AgentCallbackLogoffEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentCallbackLogoffEvent extends ManagerEvent { private static final long serialVersionUID = 8458799161502800576L; private String agent; private String loginChan; private String loginTime; private String reason; private String uniqueId; /** * @param source */ public AgentCallbackLogoffEvent(Object source) { super(source); } /** * Returns the name of the agent that logged off. */ public String getAgent() { return agent; } /** * Sets the name of the agent that logged off. */ public void setAgent(String agent) { this.agent = agent; } public String getLoginChan() { return loginChan; } public void setLoginChan(String loginChan) { this.loginChan = loginChan; } public String getLoginTime() { return loginTime; } public void setLoginTime(String loginTime) { this.loginTime = loginTime; } /** * Returns the reason for the logoff. * The reason is set to Autologoff if the agent has been logged off due to not * answering the phone in time. * Autologoff is configured by setting <code>autologoff</code> to the appropriate * number of seconds in <code>agents.conf</code>. */ public String getReason() { return reason; } /** * Sets the reason for the logoff. */ public void setReason(String reason) { this.reason = reason; } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: StatusEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A StatusEvent is triggered for each active channel in response to a * StatusAction. * * @see net.sf.asterisk.manager.action.StatusAction * * @author srt * @version $Id: StatusEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class StatusEvent extends ResponseEvent { private static final long serialVersionUID = -3619197512835308812L; private String channel; private String callerId; private String account; private String state; private String context; private String extension; private Integer priority; private Integer seconds; private String link; private String uniqueId; /** * @param source */ public StatusEvent(Object source) { super(source); } /** * Returns the name of this channel. */ public String getChannel() { return channel; } /** * Sets the name of this channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the caller id of this channel. */ public String getCallerId() { return callerId; } /** * Sets the caller id of this channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the account code of this channel. */ public String getAccount() { return account; } /** * Sets the account code of this channel. */ public void setAccount(String account) { this.account = account; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getExtension() { return extension; } public void setExtension(String extension) { this.extension = extension; } public Integer getPriority() { return priority; } public void setPriority(Integer priority) { this.priority = priority; } /** * Returns the number of elapsed seconds. */ public Integer getSeconds() { return seconds; } /** * Sets the number of elapsed seconds. */ public void setSeconds(Integer seconds) { this.seconds = seconds; } /** * Returns the name of the linked channel if this channel is bridged. */ public String getLink() { return link; } /** * Sets the name of the linked channel. */ public void setLink(String link) { this.link = link; } /** * Returns the unique id of this channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of this channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: ChannelEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class providing common properties for * HangupEvent, NewChannelEvent and NewStateEvent. * * @author srt * @version $Id: ChannelEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public abstract class ChannelEvent extends ManagerEvent { static final long serialVersionUID = 5906599407896179295L; private String channel; private String state; private String callerId; private String uniqueId; /** * @param source */ public ChannelEvent(Object source) { super(source); } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * Returns the caller id of the channel if set or "unknown" if none has been set. */ public String getCallerId() { return callerId; } /** * Sets the caller id of the channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the (new) state of the channel.<br> * The following states are used:<br> * <ul> * <li>Down</li> * <li>OffHook</li> * <li>Dialing</li> * <li>Ring</li> * <li>Ringing</li> * <li>Up</li> * <li>Busy</li> * <ul> */ public String getState() { return state; } /** * Sets the (new) state of the channel. */ public void setState(String state) { this.state = state; } } --- NEW FILE: NewChannelEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A NewChannelEvent is triggered when a new channel is created.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: NewChannelEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class NewChannelEvent extends ChannelEvent { static final long serialVersionUID = -4503396901506287549L; /** * @param source */ public NewChannelEvent(Object source) { super(source); } } --- NEW FILE: AgentLogoffEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCallbackLogoffEvent is triggered when an agent that previously logged in * using AgentLogin is logged of.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentLoginEvent * @author srt * @version $Id: AgentLogoffEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentLogoffEvent extends ManagerEvent { private static final long serialVersionUID = -3482474719161350942L; private String agent; private String loginChan; private String loginTime; private String reason; private String uniqueId; /** * @param source */ public AgentLogoffEvent(Object source) { super(source); } /** * Returns the name of the agent that logged off. */ public String getAgent() { return agent; } /** * Sets the name of the agent that logged off. */ public void setAgent(String agent) { this.agent = agent; } public String getLoginTime() { return loginTime; } public void setLoginTime(String loginTime) { this.loginTime = loginTime; } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: ReloadEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** * A ReloadEvent is triggerd when the <code>reload</code> console command is executed * or the asterisk server is started.<br> * It is implemented in <code>manager.c</code> * * @author srt * @version $Id: ReloadEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ReloadEvent extends ManagerEvent { private static final long serialVersionUID = 7503005587022499819L; private String message; /** * @param source */ public ReloadEvent(Object source) { super(source); } /** * Always returns "Reload Requested". */ public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } --- NEW FILE: QueueEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class providing common properties for JoinEvent and LeaveEvent. * * @author srt * @version $Id: QueueEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public abstract class QueueEvent extends ManagerEvent { static final long serialVersionUID = -8554382298783676181L; private String channel; private String queue; private Integer count; /** * @param source */ public QueueEvent(Object source) { super(source); } /** * Returns the name of the channel that joines or leaves a queue. */ public String getChannel() { return channel; } /** * Sets the name of the channel that joines or leaves a queue. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the number of elements in the queue, i.e. the number of calls waiting * to be answered by an agent. */ public Integer getCount() { return count; } /** * Sets the number of elements in the queue. */ public void setCount(Integer count) { this.count = count; } /** * Returns the name of the queue. */ public String getQueue() { return queue; } /** * Sets the name of the queue. */ public void setQueue(String queue) { this.queue = queue; } } --- NEW FILE: UnlinkEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * An UnlinkEvent is triggered when a link between two voice channels is * discontinued, for example, just before call completion.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: UnlinkEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class UnlinkEvent extends LinkageEvent { static final long serialVersionUID = -2943257621137870024L; /** * @param source */ public UnlinkEvent(Object source) { super(source); } } --- NEW FILE: ZapShowChannelsCompleteEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A ZapShowChannelsCompleteEvent is triggered after the state of all zap channels has * been reported in response to a ZapShowChannelsAction. * * @see net.sf.asterisk.manager.action.ZapShowChannelsAction * @see net.sf.asterisk.manager.event.ZapShowChannelsEvent * * @author srt * @version $Id: ZapShowChannelsCompleteEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ZapShowChannelsCompleteEvent extends ResponseEvent { private static final long serialVersionUID = 6323249250335886462L; /** * @param source */ public ZapShowChannelsCompleteEvent(Object source) { super(source); } } --- NEW FILE: RenameEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A RenameEvent is triggered when the name of a channel is changed.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: RenameEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class RenameEvent extends ManagerEvent { static final long serialVersionUID = 3400165738000349767L; protected String oldname; protected String newname; protected String uniqueId; /** * @param source */ public RenameEvent(Object source) { super(source); } /** * Returns the new name of the channel. */ public String getNewname() { return newname; } /** * Sets the new name of the channel. */ public void setNewname(String newname) { this.newname = newname; } /** * Returns the old name of the channel. */ public String getOldname() { return oldname; } /** * Sets the old name of the channel. */ public void setOldname(String oldname) { this.oldname = oldname; } /** * Returns the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: StatusCompleteEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A StatusCompleteEvent is triggered after the state of all channels has been * reported in response to a StatusAction. * * @see net.sf.asterisk.manager.action.StatusAction * @see net.sf.asterisk.manager.event.StatusEvent * * @author srt * @version $Id: StatusCompleteEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class StatusCompleteEvent extends ResponseEvent { private static final long serialVersionUID = -1177773673509373296L; /** * @param source */ public StatusCompleteEvent(Object source) { super(source); } } --- NEW FILE: HangupEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A HangupEvent is triggered when a channel is hung up.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: HangupEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class HangupEvent extends ChannelEvent { static final long serialVersionUID = 650153034857116588L; private Integer cause; /** * @param source */ public HangupEvent(Object source) { super(source); } /** * Returns the cause of the hangup. */ public Integer getCause() { return cause; } /** * Sets the cause of the hangup. */ public void setCause(Integer cause) { this.cause = cause; } } --- NEW FILE: ConnectEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** * A ConnectEvent is triggered after successful login to the asterisk server.<br> * It is a pseudo event not directly related to an asterisk generated event. * * @author srt * @version $Id: ConnectEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ConnectEvent extends ManagerEvent { private static final long serialVersionUID = 3257845467831284784L; /** * @param source */ public ConnectEvent(Object source) { super(source); } } --- NEW FILE: ParkedCallEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A ParkedCallEvent is triggered when a channel is parked (in this case no action id * is set) and in response to a ParkedCallsAction.<br> * It is implemented in <code>res/res_features.c</code> * * @see net.sf.asterisk.manager.action.ParkedCallsAction * * @author srt * @version $Id: ParkedCallEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ParkedCallEvent extends ResponseEvent { private static final long serialVersionUID = -7437833328723536814L; private String exten; private String channel; private String from; private Integer timeout; private String callerId; private String uniqueId; /** * @param source */ public ParkedCallEvent(Object source) { super(source); } /** * Returns the extension the channel is parked at. */ public String getExten() { return exten; } /** * Sets the extension the channel is parked at. */ public void setExten(String exten) { this.exten = exten; } /** * Returns the name of the channel that is parked. */ public String getChannel() { return channel; } /** * Sets the name of the channel that is parked. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the channel that parked the call. */ public String getFrom() { return from; } /** * Sets the name of the channel that parked the call. */ public void setFrom(String from) { this.from = from; } /** * Returns the number of seconds this call will be parked.<br> * This corresponds to the <code>parkingtime</code> option in * <code>features.conf</code>. */ public Integer getTimeout() { return timeout; } /** * Sets the number of seconds this call will be parked. */ public void setTimeout(Integer timeout) { this.timeout = timeout; } /** * Returns the caller id of the parked channel. */ public String getCallerId() { return callerId; } /** * Sets the caller id of the parked channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the unique id of the parked channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the parked channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: LeaveEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A LeaveEvent is triggered when a channel leaves a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: LeaveEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class LeaveEvent extends QueueEvent { static final long serialVersionUID = -7450401017732634240L; /** * @param source */ public LeaveEvent(Object source) { super(source); } } --- NEW FILE: JoinEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A JoinEvent is triggered when a channel joines a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: JoinEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class JoinEvent extends QueueEvent { static final long serialVersionUID = 4961288508235470985L; protected String callerId; protected Integer position; /** * @param source */ public JoinEvent(Object source) { super(source); } /** * Returns the caller id of the channel that joined the queue if set. If the * channel has no caller id set "unknown" is returned. */ public String getCallerId() { return callerId; } /** * Sets the caller id of the channel that joined the queue. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the position of the joined channel in the queue. */ public Integer getPosition() { return position; } /** * Sets the position of the joined channel in the queue. */ public void setPosition(Integer position) { this.position = position; } } --- NEW FILE: ExtensionStatusEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * An ExtensionStatusEvent is triggered when the state of an extension changes.<br> * It is implemented in <code>manager.c</code> * * @author srt * @version $Id: ExtensionStatusEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ExtensionStatusEvent extends ManagerEvent { private static final long serialVersionUID = -6459014125704286869L; private String exten; private String context; private Integer status; /** * @param source */ public ExtensionStatusEvent(Object source) { super(source); } /** * Returns the extension. */ public String getExten() { return exten; } /** * Sets the extension. */ public void setExten(String exten) { this.exten = exten; } /** * Returns the context of the extension. */ public String getContext() { return context; } /** * Sets the context of the extension. */ public void setContext(String context) { this.context = context; } /** * Returns the state of the extension. */ public Integer getStatus() { return status; } /** * Sets the state of the extension. */ public void setStatus(Integer status) { this.status = status; } } --- NEW FILE: LinkageEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class providing common properties for LinkEvent and UnlinkEvent. * * @author srt * @version $Id: LinkageEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public abstract class LinkageEvent extends ManagerEvent { static final long serialVersionUID = 6563044930071030273L; private String uniqueId1; private String uniqueId2; private String channel1; private String channel2; /** * @param source */ public LinkageEvent(Object source) { super(source); } /** * Returns the unique id of the first channel. */ public String getUniqueId1() { return uniqueId1; } /** * Sets the unique id of the first channel. */ public void setUniqueId1(String uniqueId1) { this.uniqueId1 = uniqueId1; } /** * Returns the unique id of the second channel. */ public String getUniqueId2() { return uniqueId2; } /** * Sets the unique id of the second channel. */ public void setUniqueId2(String uniqueId2) { this.uniqueId2 = uniqueId2; } /** * Returns the name of the first channel. */ public String getChannel1() { return channel1; } /** * Sets the name of the first channel. */ public void setChannel1(String channel1) { this.channel1 = channel1; } /** * Returns the name of the second channel. */ public String getChannel2() { return channel2; } /** * Sets the name of the second channel. */ public void setChannel2(String channel2) { this.channel2 = channel2; } } --- NEW FILE: LinkEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A LinkEvent is triggered when two voice channels are linked together * and voice data exchange commences.<br> * Several Link events may be seen for a single call. This can occur when Asterisk * fails to setup a native bridge for the call.This is when Asterisk must sit * between two telephones and perform CODEC conversion on their behalf.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: LinkEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class LinkEvent extends LinkageEvent { static final long serialVersionUID = -4023240534975776225L; /** * @param source */ public LinkEvent(Object source) { super(source); } } --- NEW FILE: NewCallerIdEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A NewCallerIdEvent is triggered when the caller id of a channel changes.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: NewCallerIdEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class NewCallerIdEvent extends ManagerEvent { static final long serialVersionUID = 6639570533512201213L; private String callerId; private String channel; private String uniqueId; /** * @param source */ public NewCallerIdEvent(Object source) { super(source); } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * Returns the new caller id. */ public String getCallerId() { return callerId; } /** * Sets the new caller id. */ public void setCallerId(String callerId) { this.callerId = callerId; } } --- NEW FILE: NewExtenEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A NewExtenEvent is triggered when a channel is connected to a new extension.<br> * It is implemented in <code>pbx.c</code> * * @author srt * @version $Id: NewExtenEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class NewExtenEvent extends ManagerEvent { static final long serialVersionUID = -467486409866099387L; private String uniqueId; private String context; private String extension; private String application; private String appData; private Integer priority; private String channel; /** * @param source */ public NewExtenEvent(Object source) { super(source); } /** * Returns the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * Returns the name of the application that is executed. */ public String getApplication() { return application; } /** * Sets the name of the application that is executed. */ public void setApplication(String application) { this.application = application; } /** * Returns the parameters passed to the application that is executed. * The parameters are separated by a '|' character. */ public String getAppData() { return appData; } /** * Sets the parameters passed to the application that is executed. */ public void setAppData(String appData) { this.appData = appData; } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the context of the connected extension. */ public String getContext() { return context; } /** * Sets the name of the context of the connected extension. */ public void setContext(String context) { this.context = context; } /** * Returns the extension. */ public String getExtension() { return extension; } /** * Sets the extension. */ public void setExtension(String extension) { this.extension = extension; } /** * Returns the priority. */ public Integer getPriority() { return priority; } /** * Sets the priority. */ public void setPriority(Integer priority) { this.priority = priority; } } --- NEW FILE: AlarmClearEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AlarmEvent is triggered when a Zap channel leaves alarm state.<br> * It is implemented in <code>channels/chan_zap.c</code> * * @author srt * @version $Id: AlarmClearEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AlarmClearEvent extends ManagerEvent { private static final long serialVersionUID = -3584791971422266558L; private String alarm; private Integer channel; /** * @param source */ public AlarmClearEvent(Object source) { super(source); } /** * Returns the number of the channel that left alarm state. */ public Integer getChannel() { return channel; } /** * Sets the number of the channel that left alarm state. */ public void setChannel(Integer channel) { this.channel = channel; } } --- NEW FILE: NewStateEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A NewStateEvent is triggered when the state of a channel has changed.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: NewStateEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class NewStateEvent extends ChannelEvent { static final long serialVersionUID = -3660049241052945802L; /** * @param source */ public NewStateEvent(Object source) { super(source); } } --- NEW FILE: AgentCallbackLoginEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCallbackLoginEvent is triggered when an agent is successfully * logged in using AgentCallbackLogin.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentCallbackLogoffEvent * @author srt * @version $Id: AgentCallbackLoginEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentCallbackLoginEvent extends ManagerEvent { private static final long serialVersionUID = -3510642916347427230L; private String agent; private String loginChan; private String uniqueId; /** * @param source */ public AgentCallbackLoginEvent(Object source) { super(source); } /** * Returns the name of the agent that logged in. */ public String getAgent() { return agent; } /** * Sets the name of the agent that logged in. */ public void setAgent(String agent) { this.agent = agent; } public String getLoginChan() { return loginChan; } public void setLoginChan(String loginChan) { this.loginChan = loginChan; } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: QueueParamsEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A QueueParamsEvent is triggered in response to a QueueStatusAction and contains * the parameters of a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction * * @author srt * @version $Id: QueueParamsEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class QueueParamsEvent extends ResponseEvent { private static final long serialVersionUID = -170511596914604717L; private String queue; private Integer max; private Integer calls; private Integer holdtime; private Integer completed; private Integer abandoned; private Integer serviceLevel; private Double serviceLevelPerf; /** * @param source */ public QueueParamsEvent(Object source) { super(source); } /** * Returns the name of the queue. */ public String getQueue() { return queue; } /** * Sets the name of the queue. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the maximum number of people waiting in the queue or 0 for unlimited.<br> * This corresponds to the <code>maxlen</code> setting in <code>queues.conf</code>. */ public Integer getMax() { return max; } /** * Sets the maximum number of people waiting in the queue. */ public void setMax(Integer max) { this.max = max; } /** * Returns the number of calls currently waiting in the queue. */ public Integer getCalls() { return calls; } /** * Sets the number of calls currently waiting in the queue. */ public void setCalls(Integer calls) { this.calls = calls; } /** * Returns the current average holdtime for this queue (in seconds). */ public Integer getHoldtime() { return holdtime; } /** * Sets the current average holdtime for this queue. */ public void setHoldtime(Integer holdtime) { this.holdtime = holdtime; } /** * Returns the number of completed calls. */ public Integer getCompleted() { return completed; } /** * Sets the number of completed calls. */ public void setCompleted(Integer complete) { this.completed = complete; } /** * Returns the number of abandoned calls. */ public Integer getAbandoned() { return abandoned; } /** * Sets the number of abandoned calls. */ public void setAbandoned(Integer abandoned) { this.abandoned = abandoned; } /** * Returns the service level (in seconds) as defined by the * <code>servicelevel</code> setting in <code>queues.conf</code>. */ public Integer getServiceLevel() { return serviceLevel; } /** * Sets the service level. */ public void setServiceLevel(Integer serviceLevel) { this.serviceLevel = serviceLevel; } /** * Returns the ratio of calls answered within the specified service level * per total completed calls (in percent). */ public Double getServiceLevelPerf() { return serviceLevelPerf; } /** * Sets the ratio of calls answered within the specified service level * per total completed calls. */ public void setServiceLevelPerf(Double serviceLevelPerf) { this.serviceLevelPerf = serviceLevelPerf; } } --- NEW FILE: DisconnectEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** * A DisconnectEvent is triggered when the connection to the asterisk server is lost.<br> * It is a pseudo event not directly related to an asterisk generated event. * * @author srt * @version $Id: DisconnectEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class DisconnectEvent extends ManagerEvent { private static final long serialVersionUID = 3689355411862206518L; /** * @param source */ public DisconnectEvent(Object source) { super(source); } } --- NEW FILE: AgentLoginEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentLoginEvent is triggered when an agent is successfully * logged in using AgentLogin.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentLogoffEvent * @author srt * @version $Id: AgentLoginEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentLoginEvent extends ManagerEvent { private static final long serialVersionUID = 7125917930904957919L; private String agent; private String loginChan; private String uniqueId; /** * @param source */ public AgentLoginEvent(Object source) { super(source); } /** * Returns the name of the agent that logged in. */ public String getAgent() { return agent; } /** * Sets the name of the agent that logged in. */ public void setAgent(String agent) { this.agent = agent; } public String getLoginChan() { return loginChan; } public void setLoginChan(String loginChan) { this.loginChan = loginChan; } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: QueueMemberEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A QueueMemberEvent is triggered in response to a QueueStatusAction and contains * information about a member of a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction * * @author srt * @version $Id: QueueMemberEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class QueueMemberEvent extends ResponseEvent { private static final long serialVersionUID = -2293926744791895763L; private String queue; private String location; private String membership; private Integer penalty; private Integer callsTaken; private Long lastCall; /** * @param source */ public QueueMemberEvent(Object source) { super(source); } /** * Returns the name of the queue. */ public String getQueue() { return queue; } /** * Sets the name of the queue. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the location of this member.<br> * E.g. the channel name or agent group. */ public String getLocation() { return location; } /** * Sets the location of this member. */ public void setLocation(String location) { this.location = location; } /** * Returns "dynamic" if this member has been dynamically added by the * QueueAdd command (in the dialplan or via the manager api) or "static" * if this member is has been statically defined in <code>queues.conf</code>. */ public String getMembership() { return membership; } /** * Sets if this member has been dynamically or statically added. * @param membership either "dynamic" or "static". */ public void setMembership(String membership) { this.membership = membership; } /** * Returns the penality of this member. */ public Integer getPenalty() { return penalty; } /** * Sets the penality of this member. */ public void setPenalty(Integer penality) { this.penalty = penality; } /** * Returns the number of calls answered by this member. */ public Integer getCallsTaken() { return callsTaken; } /** * Sets the number of calls answered by this member. */ public void setCallsTaken(Integer callsTaken) { this.callsTaken = callsTaken; } /** * Returns the time (in seconds since 01/01/1970) the last successful call * answered by this member was hungup. */ public Long getLastCall() { return lastCall; } /** * Sets the time (in seconds since 01/01/1970) the last successful call * answered by this member was hungup. */ public void setLastCall(Long lastCall) { this.lastCall = lastCall; } } --- NEW FILE: HoldedCallEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A ParkedCallEvent is triggered when a channel is put on hold.<br> * It is implemented in <code>res/res_features.c</code> * * @author srt * @version $Id: HoldedCallEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class HoldedCallEvent extends ManagerEvent { private static final long serialVersionUID = 7384290590382334480L; private String uniqueId1; private String uniqueId2; private String channel1; private String channel2; /** * @param source */ public HoldedCallEvent(Object source) { super(source); } /** * Returns the unique id of the channel that put the other channel on hold. */ public String getUniqueId1() { return uniqueId1; } /** * Sets the unique id of the channel that put the other channel on hold. */ public void setUniqueId1(String uniqueId1) { this.uniqueId1 = uniqueId1; } /** * Returns the unique id of the channel that has been put on hold. */ public String getUniqueId2() { return uniqueId2; } /** * Sets the unique id of the channel that has been put on hold. */ public void setUniqueId2(String uniqueId2) { this.uniqueId2 = uniqueId2; } /** * Returns the name of the channel that put the other channel on hold. */ public String getChannel1() { return channel1; } /** * Sets the name of the channel that put the other channel on hold. */ public void setChannel1(String channel1) { this.channel1 = channel1; } /** * Returns the name of the channel that has been put on hold. */ public String getChannel2() { return channel2; } /** * Sets the name of the channel that has been put on hold. */ public void setChannel2(String channel2) { this.channel2 = channel2; } } --- NEW FILE: OriginateFailureEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * An OriginateFailureEvent is triggered when the execution of an OriginateAction * failed. * * @see net.sf.asterisk.manager.action.OriginateAction * * @author srt * @version $Id: OriginateFailureEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class OriginateFailureEvent extends OriginateEvent { private static final long serialVersionUID = -6812199688948480631L; /** * @param source */ public OriginateFailureEvent(Object source) { super(source); } } --- NEW FILE: MeetMeJoinEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A MeetMeJoinEvent is triggered if a channel joins a meet me conference.<br> * It is implemented in <code>apps/app_meetme.c</code> * * @author srt * @version $Id: MeetMeJoinEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class MeetMeJoinEvent extends MeetMeEvent { private static final long serialVersionUID = -8554403451985143184L; /** * @param source */ public MeetMeJoinEvent(Object source) { super(source); } } --- NEW FILE: ZapShowChannelsEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 30, 2004 */ package net.sf.asterisk.manager.event; /** * A ZapShowChannelsEvent is triggered in response to a ZapShowChannelsAction and * shows the state of a zap channel. * * @see net.sf.asterisk.manager.action.ZapShowChannelsAction * * @author srt * @version $Id: ZapShowChannelsEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ZapShowChannelsEvent extends ResponseEvent { private static final long serialVersionUID = -3613642267527361400L; private Integer channel; private String signalling; private String context; private String alarm; /** * @param source */ public ZapShowChannelsEvent(Object source) { super(source); } /** * Returns the number of this zap channel. */ public Integer getChannel() { return channel; } /** * Sets the number of this zap channel. */ public void setChannel(Integer channel) { this.channel = channel; } /** * Returns the signalling of this zap channel.<br> * Possible values are: * <ul> * <li>E & M Immediate</li> * <li>E & M Wink</li> * <li>E & M E1</li> * <li>Feature Group D (DTMF)</li> * <li>Feature Group D (MF)</li> * <li>Feature Group B (MF)</li> * <li>E911 (MF)</li> * <li>FXS Loopstart</li> * <li>FXS Groundstart</li> * <li>FXS Kewlstart</li> * <li>FXO Loopstart</li> * <li>FXO Groundstart</li> * <li>FXO Kewlstart</li> * <li>PRI Signalling</li> * <li>R2 Signalling</li> * <li>SF (Tone) Signalling Immediate</li> * <li>SF (Tone) Signalling Wink</li> * <li>SF (Tone) Signalling with Feature Group D (DTMF)</li> * <li>SF (Tone) Signalling with Feature Group D (MF)</li> * <li>SF (Tone) Signalling with Feature Group B (MF)</li> * <li>GR-303 Signalling with FXOKS</li> * <li>GR-303 Signalling with FXSKS</li> * <li>Pseudo Signalling</li> * </ul> */ public String getSignalling() { return signalling; } /** * Sets the signalling of this zap channel. */ public void setSignalling(String signalling) { this.signalling = signalling; } /** * Returns the context of this zap channel as defined in * <code>zapata.conf</code>. */ public String getContext() { return context; } /** * Sets the context of this zap channel. */ public void setContext(String context) { this.context = context; } /** * Returns the alarm state of this zap channel.<br> * This may be one of * <ul> * <li>Red Alarm</li> * <li>Yellow Alarm</li> * <li>Blue Alarm</li> * <li>Recovering</li> * <li>Loopback</li> * <li>Not Open</li> * <li>No Alarm</li> * </ul> */ public String getAlarm() { return alarm; } /** * Sets the alarm state of this zap channel. */ public void setAlarm(String alarm) { this.alarm = alarm; } } --- NEW FILE: AgentCalledEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCalledEvent is triggered when an agent is rung.<br> * To enable AgentCalledEvents you have to set <code>eventwhencalled = yes</code> * in <code>queues.conf</code>.<br> * This event is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: AgentCalledEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentCalledEvent extends ManagerEvent { private static final long serialVersionUID = -8736410893935374606L; private String agentCalled; private String channelCalling; private String callerId; private String context; private String extension; private String priority; /** * @param source */ public AgentCalledEvent(Object source) { super(source); } public String getAgentCalled() { return agentCalled; } public void setAgentCalled(String agentCalled) { this.agentCalled = agentCalled; } public String getChannelCalling() { return channelCalling; } public void setChannelCalling(String channelCalling) { this.channelCalling = channelCalling; } public String getCallerId() { return callerId; } public void setCallerId(String callerId) { this.callerId = callerId; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getExtension() { return extension; } public void setExtension(String extension) { this.extension = extension; } public String getPriority() { return priority; } public void setPriority(String priority) { this.priority = priority; } } --- NEW FILE: MeetMeLeaveEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A MeetMeLeaveEvent is triggered if a channel leaves a meet me conference.<br> * It is implemented in <code>apps/app_meetme.c</code> * * @author srt * @version $Id: MeetMeLeaveEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class MeetMeLeaveEvent extends MeetMeEvent { private static final long serialVersionUID = 7692361610793036224L; /** * @param source */ public MeetMeLeaveEvent(Object source) { super(source); } } --- NEW FILE: ResponseEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class for events triggered in response to an Action.<br> * All ResponseEvents contain an additional action id property that links * the event to the action that caused it. * * @see net.sf.asterisk.manager.action.ManagerAction * * @author srt * @version $Id: ResponseEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public abstract class ResponseEvent extends ManagerEvent { private String actionId; /** * @param source */ public ResponseEvent(Object source) { super(source); } /** * Returns the action id of the corresponding ManagerAction that * caused this event. */ public String getActionId() { return actionId; } /** * Sets the action id of the corresponding ManagerAction that * caused this event. */ public void setActionId(String actionId) { this.actionId = actionId; } } --- NEW FILE: MessageWaitingEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Aug 28, 2004 */ package net.sf.asterisk.manager.event; /** * A MessageWaitingEvent is triggered when someone leaves voicemail.<br> * It is implemented in <code>apps/app_voicemail.c</code> * * @author srt * @version $Id: Mes... [truncated message content] |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/java/net/sf/asterisk/manager/action Added Files: SetCDRUserFieldAction.java ZapTransferAction.java PingAction.java ParkedCallsAction.java QueueAddAction.java RedirectAction.java LogoffAction.java OriginateAction.java AbsoluteTimeoutAction.java ChangeMonitorAction.java MailboxCountAction.java GetVarAction.java ZapDialOffhookAction.java MailboxStatusAction.java QueueRemoveAction.java HangupAction.java ZapHangupAction.java StopMonitorAction.java ZapShowChannelsAction.java ZapDNDOffAction.java ManagerAction.java MonitorAction.java QueueStatusAction.java ChallengeAction.java ZapDNDOnAction.java StatusAction.java EventsAction.java ExtensionStateAction.java LoginAction.java CommandAction.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: SetCDRUserFieldAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The SetCDRUserFieldAction causes the user field of the call detail record * for the given channel to be changed.<br> * Depending on the value of the append property the value is appended or * overwritten.<br> * The SetCDRUserFieldAction is implemented in <code>apps/app_setcdruserfield.c</code> * * @author srt * @version $Id: SetCDRUserFieldAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class SetCDRUserFieldAction extends ManagerAction { private static final long serialVersionUID = -2024074141079750509L; private String channel; private String userField; private Boolean append; /** * Returns the name of the action, i.e. "SetCDRUserField". */ public String getAction() { return "SetCDRUserField"; } /** * Returns the name of the channel to set the cdr user field on. */ public String getChannel() { return channel; } /** * Sets the name of the channel to set the cdr user field on.<br> * This property is mandatory. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the value of the cdr user field to set or append. */ public String getUserField() { return userField; } /** * Sets the value of the cdr user field to set or append.<br> * This property is mandatory. */ public void setUserField(String userField) { this.userField = userField; } /** * Returns if the value of the cdr user field is appended or overwritten. */ public Boolean getAppend() { return append; } /** * Set to true to append the value to the cdr user field or false to * overwrite. */ public void setAppend(Boolean append) { this.append = append; } } --- NEW FILE: ZapTransferAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapTransferAction transfers a zap channel. * * @author srt * @version $Id: ZapTransferAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapTransferAction extends ManagerAction { private static final long serialVersionUID = -2802091639000800786L; private Integer zapChannel; /** * Returns the name of this action, i.e. "ZapTransfer". */ public String getAction() { return "ZapTransfer"; } /** * Returns the number of the zap channel to transfer. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel to transfer.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } } --- NEW FILE: PingAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The PingAction will ellicit a 'Pong' response, it is used to keep the * manager connection open and performs no operation. * * @author srt * @version $Id: PingAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class PingAction extends ManagerAction { private static final long serialVersionUID = -2930397629192323391L; /** * Returns the name of this action, i.e. "Ping". */ public String getAction() { return "Ping"; } } --- NEW FILE: ParkedCallsAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ParkedCallsAction requests a list of all currently parked calls.<br> * For each active channel a ParkedCallEvent is generated. After all parked calls * have been reported a ParkedCallsCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.ParkedCallEvent * @see net.sf.asterisk.manager.event.ParkedCallsCompleteEvent * * @author srt * @version $Id: ParkedCallsAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ParkedCallsAction extends ManagerAction { private static final long serialVersionUID = 1859575016378824743L; /** * Returns the name of this action, i.e. "ParkedCalls". */ public String getAction() { return "ParkedCalls"; } } --- NEW FILE: QueueAddAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The QueueAddAction adds a new member to a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: QueueAddAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class QueueAddAction extends ManagerAction { private static final long serialVersionUID = -7022129266332219953L; private String queue; private String iface; private Integer penality; /** * Returns the name of this action, i.e. "QueueAdd". */ public String getAction() { return "QueueAdd"; } /** * Returns the name of the queue the new member will be added to. */ public String getQueue() { return queue; } /** * Sets the name of the queue the new member will be added to.<br> * This property is mandatory. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the interface to add. */ public String getInterface() { return iface; } /** * Sets the interface to add.<br> * To add a specific channel just use the channel name, e.g. "SIP/1234".<br> * This property is mandatory. */ public void setInterface(String iface) { this.iface = iface; } /** * Returns the penality for this member. */ public Integer getPenality() { return penality; } /** * Sets the penality for this member.<br> * The penality must be a positive integer or 0 for no penality. If it is not set * 0 is assumed.<br> * When calls are distributed members with higher penalties are considered last. */ public void setPenality(Integer penality) { this.penality = penality; } } --- NEW FILE: RedirectAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * @author srt * @version $Id: RedirectAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class RedirectAction extends ManagerAction { static final long serialVersionUID = 1869279324159418150L; private String channel; private String extraChannel; private String exten; private String context; private Integer priority; /** * Returns the name of this action, i.e. "Redirect". */ public String getAction() { return "Redirect"; } /** * @return Returns the channel. */ public String getChannel() { return channel; } /** * @param channel The channel to set. */ public void setChannel(String channel) { this.channel = channel; } /** * @return Returns the context. */ public String getContext() { return context; } /** * @param context The context to set. */ public void setContext(String context) { this.context = context; } /** * @return Returns the exten. */ public String getExten() { return exten; } /** * @param exten The exten to set. */ public void setExten(String exten) { this.exten = exten; } /** * @return Returns the extraChannel. */ public String getExtraChannel() { return extraChannel; } /** * @param extraChannel The extraChannel to set. */ public void setExtraChannel(String extraChannel) { this.extraChannel = extraChannel; } /** * @return Returns the priority. */ public Integer getPriority() { return priority; } /** * @param priority The priority to set. */ public void setPriority(Integer priority) { this.priority = priority; } } --- NEW FILE: LogoffAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The LogoffAction causes the server to close the connection. * * @author srt * @version $Id: LogoffAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class LogoffAction extends ManagerAction { static final long serialVersionUID = -7576797478570238525L; /** * Returns the name of this action, i.e. "Logoff". */ public String getAction() { return "Logoff"; } } --- NEW FILE: OriginateAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The OriginateAction generates an outgoing call to the extension * in the given context with the given priority or to a given * application with optional parameters.<br> * * If you want to connect to an extension use the properties context, exten and * priority. If you want to connect to an application use the properties * application and data if needed. Note that no call detail record will be written when * directly connecting to an application, so it may be better to connect to an * extension that starts the application you wish to connect to.<br> * * The response to this action is sent when the channel has been answered and * asterisk starts connecting it to the given extension. So be careful not * to choose a too short timeout when waiting for the response.<br> * * If the origination succeeds an OriginateSuccessEvent is generated, if it * fails an OriginateFailureEvent is generated. The action id of these events * equals the action id of this OriginateAction. * * @see net.sf.asterisk.manager.event.OriginateSuccessEvent * @see net.sf.asterisk.manager.event.OriginateFailureEvent * * @author srt * @version $Id: OriginateAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class OriginateAction extends ManagerAction { static final long serialVersionUID = 8194597741743334704L; private String channel; private String exten; private String context; private Integer priority; private Integer timeout; private String callerId; private Boolean callingPres; private String variable; private String account; private String application; private String data; private Boolean async; /** * Returns the name of this action, i.e. "Originate". */ public String getAction() { return "Originate"; } /** * Returns the account code to use for the originated call. */ public String getAccount() { return account; } /** * Sets the account code to use for the originated call.<br> * The account code is included in the call detail record generated for this * call and will be used for billing. */ public void setAccount(String account) { this.account = account; } /** * Returns the caller id to set on the outgoing channel. */ public String getCallerId() { return callerId; } /** * Sets the caller id to set on the outgoing channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns <code>true</code> if Caller ID presentation is set on the outgoing channel. */ public Boolean getCallingPres() { return callingPres; } /** * Set to <code>true</code> if you want Caller ID presentation to be set on the outgoing channel. */ public void setCallingPres(Boolean callingPres) { this.callingPres = callingPres; } /** * Returns the name of the channel to connect to the outgoing call. */ public String getChannel() { return channel; } /** * Sets the name of the channel to connect to the outgoing call.<br> * This property is required. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the context of the extension to connect to. */ public String getContext() { return context; } /** * Sets the name of the context of the extension to connect to.<br> * If you set the context you also have to set the exten and * priority properties. */ public void setContext(String context) { this.context = context; } /** * Returns the extension to connect to. */ public String getExten() { return exten; } /** * Sets the extension to connect to.<br> * If you set the extension you also have to set the context and * priority properties. */ public void setExten(String exten) { this.exten = exten; } /** * Returns the priority of the extension to connect to. */ public Integer getPriority() { return priority; } /** * Sets the priority of the extension to connect to. * If you set the priority you also have to set the context and * exten properties. */ public void setPriority(Integer priority) { this.priority = priority; } /** * Returns the name of the application to connect to. */ public String getApplication() { return application; } /** * Sets the name of the application to connect to. */ public void setApplication(String application) { this.application = application; } /** * Returns the parameters to pass to the application. */ public String getData() { return data; } /** * Sets the parameters to pass to the application. */ public void setData(String data) { this.data = data; } /** * Returns the timeout for the origination. */ public Integer getTimeout() { return timeout; } /** * Sets the timeout (in milliseconds) for the origination.<br> * The channel must be answered within this time, otherwise the origination * is considered to have failed and an OriginateFailureEvent is generated.<br> * If not set, asterisk assumes a default value of 30000 meaning 30 seconds. */ public void setTimeout(Integer timeout) { this.timeout = timeout; } /** * Returns the variables to set on the originated call. */ public String getVariable() { return variable; } /** * Sets the variables to set on the originated call.<br> * Variable assignments are of the form "VARNAME=VALUE". * You can specify multiple variable assignments separated by the '|' character.<br> * Example: "VAR1=abc|VAR2=def" sets the channel variables VAR1 to "abc" and * VAR2 to "def". */ public void setVariable(String variable) { this.variable = variable; } /** * Returns true if this is a fast origination. */ public Boolean getAsync() { return async; } /** * Set to true for fast origination. */ public void setAsync(Boolean async) { this.async = async; } } --- NEW FILE: AbsoluteTimeoutAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The AbsoluteTimeoutAction sets the absolute maximum amount of time permitted * for a call on a given channel.<br> * Note that the timeout is set from the current time forward, not counting the * number of seconds the call has already been up.<br> * When setting a new timeout all previous absolute timeouts are cancelled.<br> * When the timeout is reached the call is returned to the T extension so that * you can playback an explanatory note to the calling party (the called * party will not hear that).<br> * This action corresponds the the AbsoluteTimeout command used in the dialplan. * * @author srt * @version $Id: AbsoluteTimeoutAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class AbsoluteTimeoutAction extends ManagerAction { static final long serialVersionUID = 3073237188819825503L; private String channel; private Integer timeout; /** * Returns the name of this action, i.e. "AbsoluteTimeout". */ public String getAction() { return "AbsoluteTimeout"; } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the timeout (in seconds) to set. */ public Integer getTimeout() { return timeout; } /** * Sets the timeout (in seconds) to set on channel.<br> * Setting the timeout to 0 cancels the timeout. */ public void setTimeout(Integer timeout) { this.timeout = timeout; } } --- NEW FILE: ChangeMonitorAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The ChangeMonitorAction changes the monitoring filename of a channel. * It has no effect if the channel is not monitored.<br> * It is implemented in <code>res/res_monitor.c</code> * * @author srt * @version $Id: ChangeMonitorAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ChangeMonitorAction extends ManagerAction { private static final long serialVersionUID = -798530703607827118L; private String channel; private String file; /** * Returns the name of this action, i.e. "ChangeMonitor". */ public String getAction() { return "ChangeMonitor"; } /** * Returns the name of the channel to start monitoring. */ public String getChannel() { return channel; } /** * Sets the name of the channel to start monitoring.<br> * This property is mandatory. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the file to which the voice data is written. */ public String getFile() { return file; } /** * Sets the (base) name of the file(s) to which the voice data is written.<br> * This property is mandatory. */ public void setFile(String file) { this.file = file; } } --- NEW FILE: MailboxCountAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The MailboxCountAction queries the number of unread and read messages * in a mailbox.<br> * The MailboxCountAction returns a MailboxStatusResponse. * * @see net.sf.asterisk.manager.response.MailboxCountResponse * * @author srt * @version $Id: MailboxCountAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class MailboxCountAction extends ManagerAction { static final long serialVersionUID = -6900421919824575941L; private String mailbox; /** * Returns the name of this action, i.e. "MailboxCount". */ public String getAction() { return "MailboxCount"; } /** * Returns the name of the mailbox to query. */ public String getMailbox() { return mailbox; } /** * Sets the name of the mailbox to query.<br> * This can either be only the number of the mailbox or a string of the * form mailboxnumber@context.If no context is specified "default" is * assumed.<br> * This property is mandatory. */ public void setMailbox(String mailbox) { this.mailbox = mailbox; } } --- NEW FILE: GetVarAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The GetVarAction queries for a channel variable. * * @author srt * @version $Id: GetVarAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class GetVarAction extends ManagerAction { private static final long serialVersionUID = 5239805071977668779L; private String channel; private String variable; /** * Returns the name of this action, i.e. "GetVar". */ public String getAction() { return "GetVar"; } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Retruns the name of the variable to query. */ public String getVariable() { return variable; } /** * Sets the name of the variable to query. */ public void setVariable(String variable) { this.variable = variable; } } --- NEW FILE: ZapDialOffhookAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapDialOffhookAction dials a number on a zap channel while offhook. * * @author srt * @version $Id: ZapDialOffhookAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapDialOffhookAction extends ManagerAction { private static final long serialVersionUID = -4708738122184810899L; private Integer zapChannel; private String number; /** * Returns the name of this action, i.e. "ZapDialOffhook". */ public String getAction() { return "ZapDialOffhook"; } /** * Returns the number of the zap channel. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } /** * Returns the number to dial. */ public String getNumber() { return number; } /** * Sets the number to dial.<br> * This property is mandatory. */ public void setNumber(String number) { this.number = number; } } --- NEW FILE: MailboxStatusAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The MailboxStatusAction checks if a mailbox contains waiting messages.<br> * The MailboxStatusAction returns a MailboxStatusResponse. * * @see net.sf.asterisk.manager.response.MailboxStatusResponse * * @author srt * @version $Id: MailboxStatusAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class MailboxStatusAction extends ManagerAction { static final long serialVersionUID = -3845028207155711950L; private String mailbox; /** * Returns the name of this action, i.e. "MailboxStatus". */ public String getAction() { return "MailboxStatus"; } /** * Returns the name of the mailbox to query. */ public String getMailbox() { return mailbox; } /** * Sets the name of the mailbox to query.<br> * This can either be only the number of the mailbox or a string of the * form mailboxnumber@context. If no context is specified "default" is * assumed.<br> * Multiple mailboxes may be given, separated by ','. In this case the * action checks whether at least one of the given mailboxes has waiting * messages.<br> * This property is mandatory.<br> * Example: "1234,1235@mycontext" */ public void setMailbox(String mailbox) { this.mailbox = mailbox; } } --- NEW FILE: QueueRemoveAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The QueueRemoveAction removes a member from a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: QueueRemoveAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class QueueRemoveAction extends ManagerAction { private static final long serialVersionUID = -4296471882045706821L; private String queue; private String iface; private Integer penality; /** * Returns the name of this action, i.e. "QueueRemove". */ public String getAction() { return "QueueRemove"; } /** * Returns the name of the queue the member will be removed from. */ public String getQueue() { return queue; } /** * Sets the name of the queue the member will be removed from.<br> * This property is mandatory. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the interface to remove. */ public String getInterface() { return iface; } /** * Sets the interface to remove.<br> * This property is mandatory. */ public void setInterface(String iface) { this.iface = iface; } } --- NEW FILE: HangupAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The HangupAction causes the pbx to hang up a given channel. * * @author srt * @version $Id: HangupAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class HangupAction extends ManagerAction { static final long serialVersionUID = 3479615884618713986L; private String channel; /** * Returns the name of this action, i.e. "Hangup". */ public String getAction() { return "Hangup"; } /** * Returns the channel to hangup. */ public String getChannel() { return channel; } /** * Sets the channel to hangup. */ public void setChannel(String channel) { this.channel = channel; } } --- NEW FILE: ZapHangupAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapHangupAction hangs up a zap channel. * * @author srt * @version $Id: ZapHangupAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapHangupAction extends ManagerAction { private static final long serialVersionUID = -4064616334146097495L; private Integer zapChannel; /** * Returns the name of this action, i.e. "ZapHangup". */ public String getAction() { return "ZapHangup"; } /** * Returns the number of the zap channel to hangup. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel to hangup.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } } --- NEW FILE: StopMonitorAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The StopMonitorAction ends monitoring (recording) a channel.<br> * It is implemented in <code>res/res_monitor.c</code> * * @author srt * @version $Id: StopMonitorAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class StopMonitorAction extends ManagerAction { private static final long serialVersionUID = -6316010713240389305L; private String channel; private String file; private String format; private Boolean mix; /** * Returns the name of this action, i.e. "StopMonitor". */ public String getAction() { return "StopMonitor"; } /** * Returns the name of the channel to end monitoring. */ public String getChannel() { return channel; } /** * Sets the name of the channel to end monitoring.<br> * This property is mandatory. */ public void setChannel(String channel) { this.channel = channel; } } --- NEW FILE: ZapShowChannelsAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapShowChannelsAction requests the state of all zap channels.<br> * For each zap channel a ZapShowChannelsEvent is generated. After * all zap channels have been listed a ZapShowChannelsCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.ZapShowChannelsEvent * @see net.sf.asterisk.manager.event.ZapShowChannelsCompleteEvent * * @author srt * @version $Id: ZapShowChannelsAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapShowChannelsAction extends ManagerAction { private static final long serialVersionUID = 8697000330085766825L; /** * Returns the name of this action, i.e. "ZapShowChannels". */ public String getAction() { return "ZapShowChannels"; } } --- NEW FILE: ZapDNDOffAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapDNDOnAction toggles a zap channel "Do Not Disturb" status off. * * @author srt * @version $Id: ZapDNDOffAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapDNDOffAction extends ManagerAction { private static final long serialVersionUID = 6596440995467988436L; private Integer zapChannel; /** * Returns the name of this action, i.e. "ZapDNDOff". */ public String getAction() { return "ZapDNDOff"; } /** * Returns the number of the zap channel to switch to dnd off. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel to switch to dnd off.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } } --- NEW FILE: ManagerAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; import java.io.Serializable; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; /** * Abstract base class for all Actions that can be sent to the Asterisk * server.<br> * Instances of this class represent a command sent to Asterisk, requesting * a particular Action be performed. The number of actions available to the client * are determined by the modules presently loaded in the Asterisk engine.<br> * There is one conrete subclass of ManagerAction per each supported Asterisk * Action. * * @author srt * @version $Id: ManagerAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public abstract class ManagerAction implements Serializable { static final long serialVersionUID = -7667827187378395689L; private String actionId; /** * Returns the name of the action. */ public abstract String getAction(); /** * Returns the action id. */ public String getActionId() { return actionId; } /** * Sets the action id.<br> * If the action id is set and sent to the asterisk server any response returned by * the asterisk server will include the same action id. This way the action id can * be used to track actions and their corresponding responses. */ public void setActionId(String actionId) { this.actionId = actionId; } public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } } --- NEW FILE: MonitorAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The MonitorAction starts monitoring (recording) a channel.<br> * It is implemented in <code>res/res_monitor.c</code> * * @author srt * @version $Id: MonitorAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class MonitorAction extends ManagerAction { private static final long serialVersionUID = 6840975934278794758L; private String channel; private String file; private String format; private Boolean mix; /** * Returns the name of this action, i.e. "Monitor". */ public String getAction() { return "Monitor"; } /** * Returns the name of the channel to start monitoring. */ public String getChannel() { return channel; } /** * Sets the name of the channel to start monitoring.<br> * This property is mandatory. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the file to which the voice data is written. */ public String getFile() { return file; } /** * Sets the (base) name of the file(s) to which the voice data is written.<br> * If this property is not set it defaults to to the channel name as per CLI * with the '/' replaced by '-'. */ public void setFile(String file) { this.file = file; } /** * Returns the format to use for encoding the voice files. */ public String getFormat() { return format; } /** * Sets the format to use for encoding the voice files.<br> * If this property is not set it defaults to "wav". */ public void setFormat(String format) { this.format = format; } /** * Returns true if the two voice files should be joined at the end of the call. */ public Boolean getMix() { return mix; } /** * Set to true if the two voice files should be joined at the end of the call. */ public void setMix(Boolean mix) { this.mix = mix; } } --- NEW FILE: QueueStatusAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The QueueStatusAction requests the state of all defined queues their * members (agents) and entries (callers).<br> * * For each queue a QueueParamsEvent is generated, followed by * a QueueMemberEvent for each member of that queue and a QueueEntryEvent * for each entry in the queue.<br> * * Note: Currently asterisk does not send a special event to denote the end of the * generated dump.<br> * * This action is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.event.QueueParamsEvent * @see net.sf.asterisk.manager.event.QueueMemberEvent * @see net.sf.asterisk.manager.event.QueueEntryEvent * * @author srt * @version $Id: QueueStatusAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class QueueStatusAction extends ManagerAction { private static final long serialVersionUID = -8599401015517232869L; /** * Returns the name of this action, i.e. "QueueStatus". */ public String getAction() { return "QueueStatus"; } } --- NEW FILE: ChallengeAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ChallengeAction requests a challenge from the server to use when logging in * using challenge/response. * Sending this action to the asterisk server results in a ChallengeResponse * being received from the server. * * @see net.sf.asterisk.manager.action.LoginAction * @see net.sf.asterisk.manager.response.ChallengeResponse * * @author srt * @version $Id: ChallengeAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ChallengeAction extends ManagerAction { static final long serialVersionUID = 7240516124871953971L; private String authType; /** * Returns Returns the name of this action, i.e. "Challenge". */ public String getAction() { return "Challenge"; } /** * Returns the digest alogrithm to use. */ public String getAuthType() { return authType; } /** * Sets the digest alogrithm to use. * Currently asterisk only supports "MD5". */ public void setAuthType(String authType) { this.authType = authType; } } --- NEW FILE: ZapDNDOnAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapDNDOnAction toggles a zap channel "Do Not Disturb" status on. * * @author srt * @version $Id: ZapDNDOnAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapDNDOnAction extends ManagerAction { private static final long serialVersionUID = -4669362344411680132L; private Integer zapChannel; /** * Returns the name of this action, i.e. "ZapDNDOn". */ public String getAction() { return "ZapDNDOn"; } /** * Returns the number of the zap channel to switch to dnd on. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel to switch to dnd on.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } } --- NEW FILE: StatusAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The StatusAction requests the state of all active channels.<br> * For each active channel a StatusEvent is generated. After the state * of all channels has been reported a StatusCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.StatusEvent * @see net.sf.asterisk.manager.event.StatusCompleteEvent * * @author srt * @version $Id: StatusAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class StatusAction extends ManagerAction { static final long serialVersionUID = -320228893513973367L; /** * Returns the name of this action, i.e. "Status". */ public String getAction() { return "Status"; } } --- NEW FILE: EventsAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * With the EventsAction you can specify what kind of events should be sent * to this manager connection. * * @author srt * @version $Id: EventsAction.java,v 1.1 2005/02/23 12:45:21 srt Exp $ */ public class EventsAction extends ManagerAction { static final long serialVersionUID = -8042435402644984875L; private String eventMask; /** * Returns the name of this action, i.e. "Events". */ public String getAction() { return "Events"; } /** * Returns the event mask. */ public String getEventMask() { return eventMask; } /** * Sets the event mask.<br> * Set to "on" if all events should be send, "off" if not events should be sent * or a combination of "system", "call" and "log" (separated by ',') to specify * what kind of events should be sent. */ public void setEventMask(String eventMask) { this.eventMask = eventMask; } } --- NEW FILE: ExtensionStateAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ExtensionStateAction queries the state of an extension in a given context. * * @author srt * @version $Id: ExtensionStateAction.java,v 1.1 2005/02/23 12:45:21 srt Exp $ */ public class ExtensionStateAction extends ManagerAction { static final long serialVersionUID = 6537408784388696403L; private String exten; private String context; /** * Returns the name of this action, i.e. "ExtensionState". */ public String getAction() { return "ExtensionState"; } /** * Returns the extension to query. */ public String getExten() { return exten; } /** * Sets the extension to query. */ public void setExten(String exten) { this.exten = exten; } /** * Returns the name of the context that contains the extension to query. */ public String getContext() { return context; } /** * Sets the name of the context that contains the extension to query. */ public void setContext(String context) { this.context = context; } } --- NEW FILE: LoginAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The LoginAction authenticates the connection.<br> * A successful login is the precondition for sending any other action except for * the ChallengeAction.<br> * An unsuccessful login results in an ManagerError being received from the server * with a message set to "Authentication failed" and the socket being closed * by asterisk. * * @see net.sf.asterisk.manager.action.ChallengeAction * @see net.sf.asterisk.manager.response.ManagerError * * @author srt * @version $Id: LoginAction.java,v 1.1 2005/02/23 12:45:21 srt Exp $ */ public class LoginAction extends ManagerAction { static final long serialVersionUID = -2600694249339115032L; private String username; private String secret; private String authType; private String key; private String events; /** * Returns the name of this action, i.e. "Login". */ public String getAction() { return "Login"; } /** * Returns the username. */ public String getUsername() { return username; } /** * Sets the username as configured in asterik's <code>manager.conf</code>. */ public void setUsername(String username) { this.username = username; } /** * Returns the secret. */ public String getSecret() { return secret; } /** * Sets the secret to use when using clear text login.<br> * The secret contains the user's password as configured in * asterisk's <code>manager.conf</code>.<br> * The secret and key properties are mutually exclusive. */ public void setSecret(String secret) { this.secret = secret; } /** * Returns the digest alogrithm when using challenge/response. */ public String getAuthType() { return authType; } /** * Sets the digest alogrithm when using challenge/response.<br> * The digest algorithm is used to create the key based on the challenge * and the user's password.<br> * Currently asterisk supports only "MD5". */ public void setAuthType(String authType) { this.authType = authType; } /** * @return Returns the key. */ public String getKey() { return key; } /** * @param key The key to set. */ public void setKey(String key) { this.key = key; } /** * @return Returns the events. */ public String getEvents() { return events; } /** * @param events The events to set. */ public void setEvents(String events) { this.events = events; } } --- NEW FILE: CommandAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The CommandAction sends a command line interface (CLI) command to the * asterisk server.<br> * For a list of supported commands type <code>help</code> on * asterisk's command line. * * @author srt * @version $Id: CommandAction.java,v 1.1 2005/02/23 12:45:21 srt Exp $ */ public class CommandAction extends ManagerAction { static final long serialVersionUID = 4753117770471622025L; protected String command; /** * Returns the name of this action, i.e. "Command". */ public String getAction() { return "Command"; } /** * Returns the command. */ public String getCommand() { return command; } /** * Sets the CLI command to send to the asterisk server. */ public void setCommand(String command) { this.command = command; } } |
Update of /cvsroot/asterisk-java/asterisk-java/src/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/net/sf/asterisk/manager/event Removed Files: HoldedCallEvent.java AgentCallbackLogoffEvent.java ManagerEvent.java ConnectEvent.java QueueEntryEvent.java PeerStatusEvent.java ResponseEvent.java ExtensionStatusEvent.java NewStateEvent.java AgentCalledEvent.java NewExtenEvent.java AgentLogoffEvent.java ReloadEvent.java MeetMeEvent.java AgentLoginEvent.java LinkEvent.java StatusEvent.java ShutdownEvent.java QueueEvent.java ParkedCallEvent.java RenameEvent.java ChannelEvent.java MessageWaitingEvent.java HangupEvent.java LinkageEvent.java QueueParamsEvent.java NewChannelEvent.java AgentCallbackLoginEvent.java MeetMeJoinEvent.java OriginateSuccessEvent.java StatusCompleteEvent.java AlarmClearEvent.java NewCallerIdEvent.java UnlinkEvent.java MeetMeLeaveEvent.java JoinEvent.java RegistryEvent.java ParkedCallsCompleteEvent.java AlarmEvent.java LeaveEvent.java ZapShowChannelsEvent.java QueueMemberEvent.java ZapShowChannelsCompleteEvent.java OriginateEvent.java DisconnectEvent.java CdrEvent.java OriginateFailureEvent.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- HoldedCallEvent.java DELETED --- --- AgentCallbackLogoffEvent.java DELETED --- --- ManagerEvent.java DELETED --- --- ConnectEvent.java DELETED --- --- QueueEntryEvent.java DELETED --- --- PeerStatusEvent.java DELETED --- --- ResponseEvent.java DELETED --- --- ExtensionStatusEvent.java DELETED --- --- NewStateEvent.java DELETED --- --- AgentCalledEvent.java DELETED --- --- NewExtenEvent.java DELETED --- --- AgentLogoffEvent.java DELETED --- --- ReloadEvent.java DELETED --- --- MeetMeEvent.java DELETED --- --- AgentLoginEvent.java DELETED --- --- LinkEvent.java DELETED --- --- StatusEvent.java DELETED --- --- ShutdownEvent.java DELETED --- --- QueueEvent.java DELETED --- --- ParkedCallEvent.java DELETED --- --- RenameEvent.java DELETED --- --- ChannelEvent.java DELETED --- --- MessageWaitingEvent.java DELETED --- --- HangupEvent.java DELETED --- --- LinkageEvent.java DELETED --- --- QueueParamsEvent.java DELETED --- --- NewChannelEvent.java DELETED --- --- AgentCallbackLoginEvent.java DELETED --- --- MeetMeJoinEvent.java DELETED --- --- OriginateSuccessEvent.java DELETED --- --- StatusCompleteEvent.java DELETED --- --- AlarmClearEvent.java DELETED --- --- NewCallerIdEvent.java DELETED --- --- UnlinkEvent.java DELETED --- --- MeetMeLeaveEvent.java DELETED --- --- JoinEvent.java DELETED --- --- RegistryEvent.java DELETED --- --- ParkedCallsCompleteEvent.java DELETED --- --- AlarmEvent.java DELETED --- --- LeaveEvent.java DELETED --- --- ZapShowChannelsEvent.java DELETED --- --- QueueMemberEvent.java DELETED --- --- ZapShowChannelsCompleteEvent.java DELETED --- --- OriginateEvent.java DELETED --- --- DisconnectEvent.java DELETED --- --- CdrEvent.java DELETED --- --- OriginateFailureEvent.java DELETED --- |
Update of /cvsroot/asterisk-java/asterisk-java/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/test/net/sf/asterisk/manager Removed Files: TestEventBuilder.java TestMultiAsteriskManager.java TestDefaultManagerConnection.java TestDefaultAsteriskManager.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- TestEventBuilder.java DELETED --- --- TestMultiAsteriskManager.java DELETED --- --- TestDefaultManagerConnection.java DELETED --- --- TestDefaultAsteriskManager.java DELETED --- |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/java/net/sf/asterisk/manager Added Files: DefaultAsteriskManager.java Channel.java ManagerConnection.java AuthenticationFailedException.java AsteriskServer.java EventBuilder.java Queue.java ManagerReader.java ChannelStateEnum.java ManagerConnectionFactory.java Util.java TimeoutException.java MultiAsterisksManager.java ManagerEventHandler.java AsteriskManager.java ManagerResponseHandler.java ActionBuilder.java DefaultManagerConnection.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: DefaultAsteriskManager.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 28, 2004 */ package net.sf.asterisk.manager; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import net.sf.asterisk.manager.action.OriginateAction; import net.sf.asterisk.manager.action.QueueStatusAction; import net.sf.asterisk.manager.action.StatusAction; import net.sf.asterisk.manager.event.ConnectEvent; import net.sf.asterisk.manager.event.DisconnectEvent; import net.sf.asterisk.manager.event.HangupEvent; import net.sf.asterisk.manager.event.LinkEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; import net.sf.asterisk.manager.event.NewStateEvent; import net.sf.asterisk.manager.event.QueueEntryEvent; import net.sf.asterisk.manager.event.QueueMemberEvent; import net.sf.asterisk.manager.event.QueueParamsEvent; import net.sf.asterisk.manager.event.RenameEvent; import net.sf.asterisk.manager.event.StatusCompleteEvent; import net.sf.asterisk.manager.event.StatusEvent; import net.sf.asterisk.manager.event.UnlinkEvent; import net.sf.asterisk.manager.response.ManagerResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author srt * @version $Id: DefaultAsteriskManager.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class DefaultAsteriskManager implements AsteriskManager, ManagerEventHandler { private final Log log = LogFactory.getLog(this.getClass()); private ManagerConnection connection; /** * A map of all active channel by their unique id. */ private Map channels; private Map queues; private List queuedEvents; private boolean channelsInitialized; private boolean queuesInitialized; private boolean initialized; public DefaultAsteriskManager() { this.channels = Collections.synchronizedMap(new HashMap()); this.queues = Collections.synchronizedMap(new HashMap()); this.queuedEvents = Collections.synchronizedList(new ArrayList()); this.channelsInitialized = false; //TODO fix detection of queuesInitialized this.queuesInitialized = true; this.initialized = false; } public void setManagerConnection(ManagerConnection connection) { this.connection = connection; } public void initialize() throws TimeoutException, IOException, AuthenticationFailedException { connection.addEventHandler(this); connection.login(); connection.sendAction(new StatusAction()); connection.sendAction(new QueueStatusAction()); } public String originateCall(OriginateAction originateAction) throws TimeoutException, IOException { ManagerResponse response; response = connection.sendAction(originateAction); return response == null ? null : response.getUniqueId(); } /** * Returns a map of all active channel by their unique id. */ public Map getChannels() { return channels; } public Map getQueues() { return queues; } /** * Handles all events received from the asterisk server.<br> * Events are queued until channels and queues are initialized and then * delegated to the dispatchEvent method. */ public void handleEvent(ManagerEvent event) { System.out.println("received: " + event); if (event instanceof ConnectEvent) { handleConnectEvent((ConnectEvent) event); } else if (event instanceof DisconnectEvent) { handleDisconnectEvent((DisconnectEvent) event); } // build initial state if not yet initialized, dispatch otherwise. if (!initialized) { if (event instanceof StatusEvent) { handleStatusEvent((StatusEvent) event); } else if (event instanceof StatusCompleteEvent) { handleStatusCompleteEvent((StatusCompleteEvent) event); } else if (event instanceof QueueParamsEvent) { handleQueueParamsEvent((QueueParamsEvent) event); } else if (event instanceof QueueMemberEvent) { handleQueueMemberEvent((QueueMemberEvent) event); } else if (event instanceof QueueEntryEvent) { handleQueueEntryEvent((QueueEntryEvent) event); } else { queuedEvents.add(event); } if (channelsInitialized && queuesInitialized) { Iterator i = queuedEvents.iterator(); while (i.hasNext()) { ManagerEvent queuedEvent = (ManagerEvent) i.next(); dispatchEvent(queuedEvent); i.remove(); } this.initialized = true; } } else { dispatchEvent(event); } } protected void dispatchEvent(ManagerEvent event) { if (event instanceof NewChannelEvent) { handleNewChannelEvent((NewChannelEvent) event); } else if (event instanceof NewExtenEvent) { handleNewExtenEvent((NewExtenEvent) event); } else if (event instanceof NewStateEvent) { handleNewStateEvent((NewStateEvent) event); } else if (event instanceof LinkEvent) { handleLinkEvent((LinkEvent) event); } else if (event instanceof UnlinkEvent) { handleUnlinkEvent((UnlinkEvent) event); } else if (event instanceof RenameEvent) { handleRenameEvent((RenameEvent) event); } else if (event instanceof HangupEvent) { handleHangupEvent((HangupEvent) event); } } protected void addChannel(Channel channel) { channels.put(channel.getId(), channel); } protected void removeChannel(Channel channel) { channels.remove(channel.getId()); } protected void addQueue(Queue queue) { queues.put(queue.getName(), queue); } protected void removeQueue(Queue queue) { queues.remove(queue.getName()); } protected void handleStatusEvent(StatusEvent event) { Channel channel; boolean isNew = false; channel = (Channel) channels.get(event.getUniqueId()); if (channel == null) { channel = new Channel(event.getChannel(), event.getUniqueId()); if (event.getSeconds() != null) { channel .setDateOfCreation(new Date(System.currentTimeMillis() - (event.getSeconds().intValue() * 1000))); } isNew = true; } synchronized (channel) { channel.setCallerId(event.getCallerId()); channel.setAccount(event.getAccount()); channel.setState(ChannelStateEnum.getEnum(event.getState())); channel.setContext(event.getContext()); channel.setExtension(event.getExtension()); channel.setPriority(event.getPriority()); if (event.getLink() != null) { Channel linkedChannel = getChannelByName(event.getLink()); if (linkedChannel != null) { channel.setLinkedChannel(linkedChannel); synchronized (linkedChannel) { linkedChannel.setLinkedChannel(channel); } } } } if (isNew) { log.info("Adding new channel " + channel.getName()); addChannel(channel); } } protected void handleStatusCompleteEvent(StatusCompleteEvent event) { log.info("Channels are now initialized"); this.channelsInitialized = true; } /** * Resets the internal state when the connection to the asterisk server is lost. */ protected void handleDisconnectEvent(DisconnectEvent disconnectEvent) { this.channels.clear(); this.queues.clear(); this.queuedEvents.clear(); this.channelsInitialized = false; //TODO fix detection of queuesInitialized this.queuesInitialized = true; this.initialized = false; } /** * Requests the current state from the asterisk server after the connection to the asterisk * server is restored. */ protected void handleConnectEvent(ConnectEvent connectEvent) { try { connection.sendAction(new StatusAction()); } catch (Exception e) { log.error("Unable to request channel status from asterisk server after reconnect.", e); } try { connection.sendAction(new QueueStatusAction()); } catch (Exception e) { log.error("Unable to request queue status from asterisk server after reconnect.", e); } } protected void handleQueueParamsEvent(QueueParamsEvent event) { Queue queue; boolean isNew = false; queue = (Queue) queues.get(event.getQueue()); if (queue == null) { queue = new Queue(event.getQueue()); isNew = true; } synchronized (queue) { queue.setMax(event.getMax()); } if (isNew) { log.info("Adding new queue " + queue.getName()); addQueue(queue); } } protected void handleQueueMemberEvent(QueueMemberEvent event) { } protected void handleQueueEntryEvent(QueueEntryEvent event) { Queue queue = (Queue) queues.get(event.getQueue()); Channel channel = getChannelByName(event.getChannel()); if (queue == null) { log.error("ignored QueueEntryEvent for unknown queue " + event.getQueue()); return; } if (channel == null) { log.error("ignored QueueEntryEvent for unknown channel " + event.getChannel()); return; } if (!queue.getEntries().contains(channel)) { queue.addEntry(channel); } } /** * Returns a channel by its name. * * @param name name of the channel to return * @return the channel with the given name */ private Channel getChannelByName(String name) { //TODO must get unique Channel channel = null; Iterator channelIterator = channels.values().iterator(); while (channelIterator.hasNext()) { Channel tmp = (Channel) channelIterator.next(); if (tmp.getName() != null && tmp.getName().equals(name)) { channel = tmp; } } return channel; } protected void handleNewChannelEvent(NewChannelEvent event) { Channel channel = new Channel(event.getChannel(), event.getUniqueId()); channel.setCallerId(event.getCallerId()); channel.setState(ChannelStateEnum.getEnum(event.getState())); log.info("Adding channel " + channel.getName()); addChannel(channel); } protected void handleNewExtenEvent(NewExtenEvent event) { Channel channel = (Channel) channels.get(event.getUniqueId()); if (channel == null) { log.error("Ignored NewExtenEvent for unknown channel " + event.getChannel()); return; } synchronized (channel) { channel.setContext(event.getContext()); channel.setExtension(event.getExtension()); channel.setPriority(event.getPriority()); channel.setApplication(event.getApplication()); channel.setAppData(event.getAppData()); } } protected void handleNewStateEvent(NewStateEvent event) { Channel channel = (Channel) channels.get(event.getUniqueId()); if (channel == null) { log.error("Ignored NewStateEvent for unknown channel " + event.getChannel()); return; } channel.setState(ChannelStateEnum.getEnum(event.getState())); } protected void handleHangupEvent(HangupEvent event) { Channel channel = (Channel) channels.get(event.getUniqueId()); if (channel == null) { log.error("Ignored HangupEvent for unknown channel " + event.getChannel()); return; } synchronized (channel) { channel.setState(ChannelStateEnum.HUNGUP); } log.info("Removing channel " + channel.getName() + " due to hangup"); removeChannel(channel); } protected void handleLinkEvent(LinkEvent event) { Channel channel1 = (Channel) channels.get(event.getUniqueId1()); Channel channel2 = (Channel) channels.get(event.getUniqueId2()); if (channel1 == null) { log.error("Ignored LinkEvent for unknown channel " + event.getChannel1()); return; } if (channel2 == null) { log.error("Ignored LinkEvent for unknown channel " + event.getChannel2()); return; } log.info("Linking channels " + channel1.getName() + " and " + channel2.getName()); synchronized (this) { channel1.setLinkedChannel(channel2); channel2.setLinkedChannel(channel1); } } protected void handleUnlinkEvent(UnlinkEvent event) { Channel channel1 = getChannelByName(event.getChannel1()); Channel channel2 = getChannelByName(event.getChannel2()); if (channel1 == null) { log.error("Ignored UnlinkEvent for unknown channel " + event.getChannel1()); return; } if (channel2 == null) { log.error("Ignored UnlinkEvent for unknown channel " + event.getChannel2()); return; } log.info("Unlinking channels " + channel1.getName() + " and " + channel2.getName()); synchronized (channel1) { channel1.setLinkedChannel(null); } synchronized (channel2) { channel2.setLinkedChannel(null); } } protected void handleRenameEvent(RenameEvent event) { Channel channel = (Channel) channels.get(event.getUniqueId()); log.info("Renaming channel '" + channel.getName() + "' to '" + event.getNewname() + "'"); channel.setName(event.getNewname()); } } --- NEW FILE: Channel.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 29, 2004 */ package net.sf.asterisk.manager; import java.io.Serializable; import java.util.Date; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; /** * @author srt * @version $Id: Channel.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class Channel implements Serializable { private static final long serialVersionUID = -6919877370396385380L; private AsteriskServer asteriskServer; private String id; private String name; private String callerId; private ChannelStateEnum state; private String account; private String context; private String extension; private Integer priority; private String application; private String appData; private Date dateOfCreation; private Channel linkedChannel; /** * Creates a new channel. * @param name name of this channel, for example "SIP/1310-20da" * @param id unique id of this channel, for example "1099015093.165" */ public Channel(String name, String id) { this.name = name; this.id = id; } public Channel(String name, String id, AsteriskServer server) { this.name = name; this.id = id; this.asteriskServer = server; } /** * @return Returns the asteriskServer. */ public AsteriskServer getAsteriskServer() { return asteriskServer; } /** * @param asteriskServer The asteriskServer to set. */ public void setAsteriskServer(AsteriskServer asteriskServer) { this.asteriskServer = asteriskServer; } /** * Returns the unique id of this channel, for example "1099015093.165". */ public String getId() { return id; } /** * Returns the name of this channel, for example "SIP/1310-20da". */ public String getName() { return name; } /** * Sets the name of this channel. */ public void setName(String name) { this.name = name; } /** * Returns the caller id of this channel. */ public String getCallerId() { return callerId; } /** * Sets the caller id of this channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the state of this channel. */ public ChannelStateEnum getState() { return state; } /** * Sets the state of this channel. */ public void setState(ChannelStateEnum state) { this.state = state; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getExtension() { return extension; } public void setExtension(String extension) { this.extension = extension; } public Integer getPriority() { return priority; } public void setPriority(Integer priority) { this.priority = priority; } public String getApplication() { return application; } public void setApplication(String application) { this.application = application; } public String getAppData() { return appData; } public void setAppData(String appData) { this.appData = appData; } public Date getDateOfCreation() { return dateOfCreation; } public void setDateOfCreation(Date dateOfCreation) { this.dateOfCreation = dateOfCreation; } public Channel getLinkedChannel() { return linkedChannel; } public void setLinkedChannel(Channel linkedChannel) { this.linkedChannel = linkedChannel; } public boolean equals(Object obj) { if (!(obj instanceof Channel)) { return false; } return id.equals(((Channel) obj).getId()); } public int hashCode() { return id.hashCode(); } public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } } --- NEW FILE: ManagerConnection.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; import java.io.IOException; import net.sf.asterisk.manager.action.ManagerAction; import net.sf.asterisk.manager.response.ManagerResponse; /** * The main interface to talk to an asterisk server via the manager api. * A concrete implementation of this interface is obtained from a ManagerConnectionFactory. * * @see net.sf.asterisk.manager.ManagerConnectionFactory * * @author srt * @version $Id: ManagerConnection.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public interface ManagerConnection { /** * Logs in to the asterisk server with the username and password specified when this connection * was created. * * @throws IOException * @throws AuthenticationFailedException if the username and/or password are incorrect * or the ChallengeResponse could not be built. * @throws TimeoutException if no response is received within the default timeout period. * If the implementation uses challenge/response this can either be a * timeout of the ChallengeAction or the LoginAction; otherwise it * is always a timeout of the LoginAction. * * @see net.sf.asterisk.manager.action.LoginAction * @see net.sf.asterisk.manager.action.ChallengeAction */ void login() throws IOException, AuthenticationFailedException, TimeoutException; /** * Sends a LogoffAction to the asterisk server and disconnects. * * @throws IOException * @throws TimeoutException if no response to the logoff action is received within the default * timeout period. * * @see net.sf.asterisk.manager.action.LogoffAction */ void logoff() throws IOException, TimeoutException; /** * Returns the protocol identifier, i.e. a string like "Asterisk Call Manager/1.0". * * @return the protocol identifier of the asterisk manager interface in use if it has already * been received; <code>null</code> otherwise */ String getProtocolIdentifier(); /** * Sends a ManagerAction to the asterisk manager interface and waits for the * corresponding ManagerResponse. * * @param action the action to send to the asterisk server * * @return the corresponding response received from the asterisk server * * @throws IOException * @throws TimeoutException if no reponse is received within the default timeout period. * * @see #sendAction(ManagerAction, long) * @see #sendAction(ManagerAction, ManagerResponseHandler) */ ManagerResponse sendAction(ManagerAction action) throws IOException, TimeoutException; /** * Sends a ManagerAction to the asterisk manager interface and waits for the * corresponding {@link ManagerResponse}. * * @param action the action to send to the asterisk server * @param timeout milliseconds to wait for the reponse before throwing a TimeoutException * * @return the corresponding response received from the asterisk server * * @throws IOException * @throws TimeoutException if no reponse is received within the given timeout period. * * @see #sendAction(ManagerAction, ManagerResponseHandler) */ ManagerResponse sendAction(ManagerAction action, long timeout) throws IOException, TimeoutException; /** * Sends a ManagerAction to the asterisk manager interface and registers a callback handler * to be called when the corresponding ManagerResponse is received. * * @param action the action to send to the asterisk server * @param callbackHandler the callback handler to call when the response is received * * @throws IOException */ void sendAction(ManagerAction action, ManagerResponseHandler callbackHandler) throws IOException; /** * Registers an event handler to be called whenever an {@link net.sf.asterisk.manager.event.ManagerEvent} * is receiced from the asterisk server. * * @param eventHandler the handler to call whenever a manager event is received * * @see #removeEventHandler(ManagerEventHandler) */ void addEventHandler(ManagerEventHandler eventHandler); /** * Unregisters a previously registered event handler.<br> * Does nothing if the given event handler hasn't be been regiered before. * * @param eventHandler the event handle to unregister * * @see #addEventHandler(ManagerEventHandler) */ void removeEventHandler(ManagerEventHandler eventHandler); /** * Return Asterisk server of connection * */ AsteriskServer getAsteriskServer(); } --- NEW FILE: AuthenticationFailedException.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; /** * An AuthenticationFailedException is thrown when a login fails due to an * incorrect username and/or password. * * @author srt * @version $Id: AuthenticationFailedException.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class AuthenticationFailedException extends Exception { static final long serialVersionUID = 7674248607624140309L; public AuthenticationFailedException(String message) { super(message); } public AuthenticationFailedException(String message, Throwable cause) { super(message, cause); } } --- NEW FILE: AsteriskServer.java --- /* * Created on 3 févr. 2005 by Pierre-Yves ROGER. * */ package net.sf.asterisk.manager; import java.io.Serializable; /** * Represents an asterisk server that is connected via the manager API. * * @author PY * @version $Id: AsteriskServer.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class AsteriskServer implements Serializable { private static final long serialVersionUID = 3257284738393125176L; private String hostname = "localhost"; private int port = 5038; public AsteriskServer() { } public AsteriskServer(String hostname, int port) { this.hostname = hostname; this.port = port; } /** * @return Returns the hostname. */ public String getHostname() { return hostname; } /** * @param hostname The hostname to set. */ public void setHostname(String hostname) { this.hostname = hostname; } /** * @return Returns the port. */ public int getPort() { return port; } /** * @param port The port to set. */ public void setPort(int port) { this.port = port; } } --- NEW FILE: EventBuilder.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import net.sf.asterisk.manager.event.AgentCallbackLoginEvent; import net.sf.asterisk.manager.event.AgentCallbackLogoffEvent; import net.sf.asterisk.manager.event.AgentCalledEvent; import net.sf.asterisk.manager.event.AgentLoginEvent; import net.sf.asterisk.manager.event.AgentLogoffEvent; import net.sf.asterisk.manager.event.AlarmClearEvent; import net.sf.asterisk.manager.event.AlarmEvent; import net.sf.asterisk.manager.event.CdrEvent; import net.sf.asterisk.manager.event.ExtensionStatusEvent; import net.sf.asterisk.manager.event.HangupEvent; import net.sf.asterisk.manager.event.HoldedCallEvent; import net.sf.asterisk.manager.event.JoinEvent; import net.sf.asterisk.manager.event.LeaveEvent; import net.sf.asterisk.manager.event.LinkEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.MeetMeJoinEvent; import net.sf.asterisk.manager.event.MeetMeLeaveEvent; import net.sf.asterisk.manager.event.MessageWaitingEvent; import net.sf.asterisk.manager.event.NewCallerIdEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; import net.sf.asterisk.manager.event.NewStateEvent; import net.sf.asterisk.manager.event.OriginateFailureEvent; import net.sf.asterisk.manager.event.OriginateSuccessEvent; import net.sf.asterisk.manager.event.ParkedCallEvent; import net.sf.asterisk.manager.event.ParkedCallsCompleteEvent; import net.sf.asterisk.manager.event.PeerStatusEvent; import net.sf.asterisk.manager.event.QueueEntryEvent; import net.sf.asterisk.manager.event.QueueMemberEvent; import net.sf.asterisk.manager.event.QueueParamsEvent; import net.sf.asterisk.manager.event.RegistryEvent; import net.sf.asterisk.manager.event.ReloadEvent; import net.sf.asterisk.manager.event.RenameEvent; import net.sf.asterisk.manager.event.ResponseEvent; import net.sf.asterisk.manager.event.ShutdownEvent; import net.sf.asterisk.manager.event.StatusCompleteEvent; import net.sf.asterisk.manager.event.StatusEvent; import net.sf.asterisk.manager.event.UnlinkEvent; import net.sf.asterisk.manager.event.ZapShowChannelsCompleteEvent; import net.sf.asterisk.manager.event.ZapShowChannelsEvent; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author srt * @version $Id: EventBuilder.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class EventBuilder { private final Log logger = LogFactory.getLog(getClass()); private Map registeredEventClasses; public EventBuilder() { this.registeredEventClasses = new HashMap(); registerBuiltinEventClasses(); } private void registerBuiltinEventClasses() { registerEventClass(AgentCallbackLoginEvent.class); registerEventClass(AgentCallbackLogoffEvent.class); registerEventClass(AgentCalledEvent.class); registerEventClass(AgentLoginEvent.class); registerEventClass(AgentLogoffEvent.class); registerEventClass(AlarmEvent.class); registerEventClass(AlarmClearEvent.class); registerEventClass(CdrEvent.class); registerEventClass(ExtensionStatusEvent.class); registerEventClass(HangupEvent.class); registerEventClass(HoldedCallEvent.class); registerEventClass(JoinEvent.class); registerEventClass(LeaveEvent.class); registerEventClass(LinkEvent.class); registerEventClass(MeetMeJoinEvent.class); registerEventClass(MeetMeLeaveEvent.class); registerEventClass(MessageWaitingEvent.class); registerEventClass(NewCallerIdEvent.class); registerEventClass(NewChannelEvent.class); registerEventClass(NewExtenEvent.class); registerEventClass(NewStateEvent.class); registerEventClass(OriginateFailureEvent.class); registerEventClass(OriginateSuccessEvent.class); registerEventClass(ParkedCallEvent.class); registerEventClass(ParkedCallsCompleteEvent.class); registerEventClass(PeerStatusEvent.class); registerEventClass(QueueEntryEvent.class); registerEventClass(QueueMemberEvent.class); registerEventClass(QueueParamsEvent.class); registerEventClass(RegistryEvent.class); registerEventClass(ReloadEvent.class); registerEventClass(RenameEvent.class); registerEventClass(ShutdownEvent.class); registerEventClass(StatusEvent.class); registerEventClass(StatusCompleteEvent.class); registerEventClass(UnlinkEvent.class); registerEventClass(ZapShowChannelsEvent.class); registerEventClass(ZapShowChannelsCompleteEvent.class); } /** * Registers a new event class. The event this class is registered for is simply derived * from the name of the class by stripping any package name (if present) and stripping * the sufffix "Event". * For example <code>net.sf.asterisk.manager.event.JoinEvent</code> is registered for the * event "Join". * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. */ public void registerEventClass(Class clazz) { String className; String eventType; className = clazz.getName(); eventType = className.substring(className.lastIndexOf('.') + 1).toLowerCase(); if (eventType.endsWith("event")) { eventType = eventType.substring(0, eventType.length() - "event".length()); } registerEventClass(eventType, clazz); } /** * Registers a new event class for the event given by eventType. * @param eventType the name of the event to register the class for. For example "Join". * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. */ public void registerEventClass(String eventType, Class clazz) { Constructor defaultConstructor; if (!ManagerEvent.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException(clazz + " is not a ManagerEvent"); } if ((clazz.getModifiers() & Modifier.ABSTRACT) != 0) { throw new IllegalArgumentException(clazz + " is abstract"); } try { defaultConstructor = clazz.getConstructor(new Class[] { Object.class }); } catch (NoSuchMethodException ex) { throw new IllegalArgumentException(clazz + " has no usable constructor"); } if ((defaultConstructor.getModifiers() & Modifier.PUBLIC) == 0) { throw new IllegalArgumentException(clazz + " has no public default constructor"); } registeredEventClasses.put(eventType.toLowerCase(), clazz); logger.info("Registered event type '" + eventType + "' (" + clazz + ")"); } public ManagerEvent buildEvent(Object source, Map attributes) { ManagerEvent event; String eventType; Class eventClass; Constructor constructor; if (attributes.get("event") == null) { logger.error("No event event type in properties"); return null; } eventType = ((String) attributes.get("event")).toLowerCase(); eventClass = (Class) registeredEventClasses.get(eventType); if (eventClass == null) { logger.warn("No event class registered for event type '" + eventType + "', attributes: " + attributes); return null; } try { constructor = eventClass.getConstructor(new Class[] { Object.class }); } catch (NoSuchMethodException ex) { logger.error("Unable to get constructor of " + eventClass, ex); return null; } try { event = (ManagerEvent) constructor.newInstance(new Object[] { source }); } catch (InstantiationException ex) { logger.error("Unable to create new instance of " + eventClass, ex); return null; } catch (IllegalAccessException ex) { logger.error("Unable to create new instance of " + eventClass, ex); return null; } catch (InvocationTargetException ex) { logger.error("Unable to create new instance of " + eventClass, ex); return null; } setAttributes(event, attributes); if (event instanceof ResponseEvent) { ResponseEvent responseEvent; String actionId; responseEvent = (ResponseEvent) event; actionId = responseEvent.getActionId(); if (actionId != null) { responseEvent.setActionId(Util.stripInternalActionId(actionId)); } } return event; } private void setAttributes(ManagerEvent event, Map attributes) { Map setters; setters = getSetters(event.getClass()); Iterator i = attributes.keySet().iterator(); while (i.hasNext()) { String name; Object value; Class dataType; Method setter; name = (String) i.next(); if ("event".equals(name)) { continue; } /* * The source property needs special handling as it is already defined * in java.util.EventObject (the base class of ManagerEvent), so we * have to translate it. */ if ("source".equals(name)) { setter = (Method) setters.get("src"); } else { setter = (Method) setters.get(name); } if (setter == null) { logger.error("Unable to set property '" + name + "' on " + event.getClass() + ": no setter"); continue; } dataType = setter.getParameterTypes()[0]; if (dataType.isAssignableFrom(String.class)) { value = attributes.get(name); } else { try { Constructor constructor = dataType.getConstructor(new Class[] { String.class }); value = constructor.newInstance(new Object[] { attributes.get(name) }); } catch (Exception e) { logger.error("Unable to convert value '" + attributes.get(name) + "' of property '" + name + "' on " + event.getClass() + " to required type " + dataType, e); continue; } } try { setter.invoke(event, new Object[] { value }); } catch (Exception e) { logger.error("Unable to set property '" + name + "' on " + event.getClass(), e); continue; } } } private Map getSetters(Class clazz) { Map accessors = new HashMap(); Method[] methods = clazz.getMethods(); for (int i = 0; i < methods.length; i++) { String name; String methodName; Method method = methods[i]; methodName = method.getName(); if (!methodName.startsWith("set")) { continue; } // skip non public methods if ((method.getModifiers() & Modifier.PUBLIC) == 0) { continue; } // skip methods with != 1 parameters if (method.getParameterTypes().length != 1) { continue; } // ok seems to be an accessor name = methodName.substring("set".length()).toLowerCase(); accessors.put(name, method); } return accessors; } } --- NEW FILE: Queue.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 31, 2004 */ package net.sf.asterisk.manager; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * @author srt * @version $Id: Queue.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class Queue implements Serializable { private static final long serialVersionUID = -6597536667933738312L; private String name; private Integer max; private List entries; public Queue(String name) { this.name = name; this.entries = Collections.synchronizedList(new ArrayList()); } public String getName() { return name; } public Integer getMax() { return max; } public void setMax(Integer max) { this.max = max; } public List getEntries() { return entries; } public void addEntry(Channel entry) { entries.add(entry); } public void removeEntry(Channel entry) { entries.remove(entry); } } --- NEW FILE: ManagerReader.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; import java.io.BufferedReader; import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.response.ChallengeResponse; import net.sf.asterisk.manager.response.CommandResponse; import net.sf.asterisk.manager.response.ExtensionStateResponse; import net.sf.asterisk.manager.response.MailboxCountResponse; import net.sf.asterisk.manager.response.MailboxStatusResponse; import net.sf.asterisk.manager.response.ManagerError; import net.sf.asterisk.manager.response.ManagerResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * The ManagerReader is a Thread that reads events and responses from an asterisk * server, parses them to the corresponding ManagerEvent and ManagerResponse objects and * dispatches them via the associated DefaultManagerConnection. * <br> * This class is intended to be used only by the DefaultManagerConnection. * * @see net.sf.asterisk.manager.event.ManagerEvent * @see net.sf.asterisk.manager.response.ManagerResponse * @see net.sf.asterisk.manager.DefaultManagerConnection * * @author srt * @version $Id: ManagerReader.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ class ManagerReader extends Thread { private Log log = LogFactory.getLog(getClass()); private static int threadCount = 0; private EventBuilder eventBuilder; private boolean die = false; private BufferedReader reader; private DefaultManagerConnection connection; ManagerReader(DefaultManagerConnection connection, BufferedReader reader) { int i = threadCount++; setName("ManagerReader-" + i); this.connection = connection; this.reader = reader; this.eventBuilder = new EventBuilder(); } /** * Reads line by line from the asterisk server, sets the protocol identifier * as soon as it is received and dispatches the received * events and responses via the associated connection. * * @see DefaultManagerConnection#dispatchEvent(ManagerEvent) * @see DefaultManagerConnection#dispatchResponse(ManagerResponse) * @see DefaultManagerConnection#setProtocolIdentifier(String) */ public void run() { String line; List commandResult = new ArrayList(); boolean processingCommandResult = false; Map buffer = new HashMap(); try { while ((line = reader.readLine()) != null && !die) { // dirty hack for handling the CommandAction. Needs fix when manager protocol is enhanced. if (processingCommandResult) { if ("--END COMMAND--".equals(line)) { CommandResponse commandResponse = new CommandResponse(); if (!commandResult.isEmpty() && ((String) commandResult.get(0)).startsWith("ActionID")) { String tmp = (String) commandResult.get(0); int delimiterIndex = tmp.indexOf(":"); if (delimiterIndex > 0 && tmp.length() > delimiterIndex + 2) { commandResult.remove(0); commandResponse.setActionId(tmp.substring(delimiterIndex + 2)); } } commandResponse.setResponse("Follows"); commandResponse.setDateReceived(new Date()); commandResponse.setResult(commandResult); connection.dispatchResponse(commandResponse); commandResult = new ArrayList(); processingCommandResult = false; } else { commandResult.add(line); } continue; } if ("Response: Follows".equalsIgnoreCase(line)) { processingCommandResult = true; continue; } // maybe we will find a better way to identify the protocol identifier but for now // this works quite well. if (line.startsWith("Asterisk Call Manager/") && connection.getProtocolIdentifier() == null) { connection.setProtocolIdentifier(line); continue; } // an empty line indicates a normal response's or event's end so we build // the corresponding value object and dispatch it through the ManagerConnection. if (line.length() == 0) { if (buffer.containsKey("response")) { ManagerResponse response = buildResponse(buffer); if (response != null) { connection.dispatchResponse(response); } } else if (buffer.containsKey("event")) { ManagerEvent event = buildEvent(connection.getAsteriskServer(), buffer); if (event != null) { connection.dispatchEvent(event); } } buffer.clear(); } else { int delimiterIndex; delimiterIndex = line.indexOf(":"); if (delimiterIndex > 0 && line.length() > delimiterIndex + 2) { String name; String value; name = line.substring(0, delimiterIndex).toLowerCase(); value = line.substring(delimiterIndex + 2); buffer.put(name, value); } } } connection.handleDisconnection(); } catch (IOException e) { log.warn("IOException while reading from asterisk server, terminating thread.", e); } finally { log.info("Disconnected, closing reader"); try { reader.close(); } catch (IOException ex) { log.warn("Unable to close reader", ex); } } } public void die() { this.die = true; } private ManagerResponse buildResponse(Map buffer) { ManagerResponse response; String responseType = (String) buffer.get("response"); // determine type if ("error".equals(responseType)) { response = new ManagerError(); } else if (buffer.containsKey("challenge")) { ChallengeResponse challengeResponse = new ChallengeResponse(); challengeResponse.setChallenge((String) buffer.get("challenge")); response = challengeResponse; } else if (buffer.containsKey("mailbox") && buffer.containsKey("waiting")) { MailboxStatusResponse mailboxStatusResponse = new MailboxStatusResponse(); mailboxStatusResponse.setMailbox((String) buffer.get("mailbox")); mailboxStatusResponse.setWaiting(new Integer((String) buffer.get("mailbox"))); response = mailboxStatusResponse; } else if (buffer.containsKey("mailbox") && buffer.containsKey("newmessages") && buffer.containsKey("oldmessages")) { MailboxCountResponse mailboxCountResponse = new MailboxCountResponse(); mailboxCountResponse.setMailbox((String) buffer.get("mailbox")); mailboxCountResponse.setNewMessages(new Integer((String) buffer.get("newmessages"))); mailboxCountResponse.setOldMessages(new Integer((String) buffer.get("oldmessages"))); response = mailboxCountResponse; } else if (buffer.containsKey("exten") && buffer.containsKey("context") && buffer.containsKey("hint") && buffer.containsKey("status")) { ExtensionStateResponse extensionStateResponse = new ExtensionStateResponse(); extensionStateResponse.setExten((String) buffer.get("exten")); extensionStateResponse.setContext((String) buffer.get("context")); extensionStateResponse.setHint((String) buffer.get("hint")); extensionStateResponse.setStatus(new Integer((String) buffer.get("status"))); response = extensionStateResponse; } else { response = new ManagerResponse(); } // fill known attributes response.setResponse(responseType); if (buffer.containsKey("actionid")) { response.setActionId((String) buffer.get("actionid")); } if (buffer.containsKey("message")) { response.setMessage((String) buffer.get("message")); } if (buffer.containsKey("uniqueid")) { response.setUniqueId((String) buffer.get("uniqueid")); } response.setDateReceived(new Date()); return response; } private ManagerEvent buildEvent(Object source, Map buffer) { ManagerEvent event; event = this.eventBuilder.buildEvent(source, buffer); if (event != null) { event.setDateReceived(new Date()); } return event; } } --- NEW FILE: ChannelStateEnum.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 29, 2004 */ package net.sf.asterisk.manager; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.commons.lang.enums.Enum; /** * Enumeration that represents the state of a channel. * * @author srt * @version $Id: ChannelStateEnum.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ChannelStateEnum extends Enum { private static final long serialVersionUID = 6436381500165485011L; public static final ChannelStateEnum DOWN = new ChannelStateEnum("Down"); public static final ChannelStateEnum OFF_HOOK = new ChannelStateEnum("OffHook"); public static final ChannelStateEnum DIALING = new ChannelStateEnum("Dialing"); public static final ChannelStateEnum RING = new ChannelStateEnum("Ring"); public static final ChannelStateEnum RINGING = new ChannelStateEnum("Ringing"); public static final ChannelStateEnum UP = new ChannelStateEnum("Up"); public static final ChannelStateEnum BUSY = new ChannelStateEnum("Busy"); public static final ChannelStateEnum RSRVD = new ChannelStateEnum("Rsrvd"); public static final ChannelStateEnum HUNGUP = new ChannelStateEnum("Hungup"); private ChannelStateEnum(String state) { super(state); } public static ChannelStateEnum getEnum(String state) { return (ChannelStateEnum) getEnum(ChannelStateEnum.class, state); } public static Map getEnumMap() { return getEnumMap(ChannelStateEnum.class); } public static List getEnumList() { return getEnumList(ChannelStateEnum.class); } public static Iterator iterator() { return iterator(ChannelStateEnum.class); } } --- NEW FILE: ManagerConnectionFactory.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; import java.io.IOException; /** * This factory is used to obtain new ManagerConnections. * * @see net.sf.asterisk.manager.ManagerConnection * * @author srt * @version $Id: ManagerConnectionFactory.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ManagerConnectionFactory { private static final String DEFAULT_HOSTNAME = "localhost"; private static final int DEFAULT_PORT = 5038; /** * Creates a new ManagerConnectionFactory. */ public ManagerConnectionFactory() { } /** * Returns a new ManagerConnection to an asterisk server running on localhost with * the call manager interface listening on its default port 5038. * * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> * * @return the created connection to the asterisk call manager * * @throws IOException if the connection cannot be established. */ public ManagerConnection getManagerConnection(String username, String password) throws IOException { return new DefaultManagerConnection(DEFAULT_HOSTNAME, DEFAULT_PORT, username, password); } /** * Returns a new ManagerConnection to an asterisk server running on given host with * the call manager interface listening on its default port 5038. * * @param hostname the name of the host the asterisk server is running on * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> * * @return the created connection to the asterisk call manager * * @throws IOException if the connection cannot be established. */ public ManagerConnection getManagerConnection(String hostname, String username, String password) throws IOException { return new DefaultManagerConnection(hostname, DEFAULT_PORT, username, password); } /** * Returns a new ManagerConnection to an asterisk server running on given host with * the call manager interface listening on the given port. * * @param hostname the name of the host the asterisk server is running on * @param port the port the call manager interface is listening on * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> * * @return the created connection to the asterisk call manager * * @throws IOException if the connection cannot be established. */ public ManagerConnection getManagerConnection(String hostname, int port, String username, String password) throws IOException { return new DefaultManagerConnection(hostname, port, username, password); } } --- NEW FILE: Util.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; /** * Utilitiy class with some static helper methods that are used in multiple * contexts. * * @author srt * @version $Id: Util.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class Util { /** * The hex digits used to build a hex string representation of a byte array. */ private static final char[] hexChar = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; /** * Converts a byte array to a hex string representing it. The hex digits are lower case. * * @param b the byte array to convert * * @return the hex representation of b */ public static String toHexString(byte[] b) { StringBuffer sb = new StringBuffer(b.length * 2); for (int i = 0; i < b.length; i++) { sb.append(hexChar[(b[i] & 0xf0) >>> 4]); sb.append(hexChar[b[i] & 0x0f]); } return sb.toString(); } public static String getInternalActionId(String actionId) { int delimiterIndex; delimiterIndex = actionId.indexOf('-'); if (delimiterIndex > 0) { return actionId.substring(0, delimiterIndex); } else { return null; } } public static String stripInternalActionId(String actionId) { int delimiterIndex; delimiterIndex = actionId.indexOf('-'); if (delimiterIndex > 0) { if (actionId.length() > delimiterIndex + 1) { return actionId.substring(delimiterIndex + 1); } else { return null; } } else { return null; } } } --- NEW FILE: TimeoutException.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; /** * A TimeoutException is thrown if a ManagerResponse is not * received within the expected time period. * * @author srt * @version $Id: TimeoutException.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class TimeoutException extends Exception { static final long serialVersionUID = 7674248607624140309L; public TimeoutException(String message) { super(message); } } --- NEW FILE: MultiAsterisksManager.java --- /* * Created on 1 févr. 2005 by Pierre-Yves ROGER. * */ package net.sf.asterisk.manager; import java.io.IOException; import java.util.*; import net.sf.asterisk.manager.action.*; import net.sf.asterisk.manager.event.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author PY */ public class MultiAsterisksManager implements AsteriskManager, ManagerEventHandler { private final Log log = LogFactory.getLog(this.getClass()); /** * A map of all Asterisk servers connections by their unique hostname. */ private Map managerConnections; /** * A map of all active channel by theirs hostname of connection and unique id. * keyMap -> "hostname:uniqueId" */ private Map channels; private Map queues; private List queuedEvents; /** * A map of all "Initiallize flag" per connection. * keyMap -> "hostname" */ private Map initialized; public MultiAsterisksManager() { this.channels = Collections.synchronizedMap(new HashMap()); this.queues = Collections.synchronizedMap(new HashMap()); this.queuedEvents = Collections.synchronizedList(new ArrayList()); this.managerConnections = Collections.synchronizedMap(new HashMap()); this.initialized = Collections.synchronizedMap(new HashMap()); } public void addManagerConnection(ManagerConnection connection) { managerConnections.put(connection.getAsteriskServer(), connection); Hashtable initializedBoolean = new Hashtable(3, 1); initializedBoolean.put("channelsInitialized", new Boolean(false)); // TODO fix detection of queuesInitialized initializedBoolean.put("queuesInitialized", new Boolean(true)); initializedBoolean.put("initialized", new Boolean(false)); initialized.put(connection.getAsteriskServer(), initializedBoolean); } public void initialize() throws TimeoutException, IOException, AuthenticationFailedException { Iterator iterConnect = managerConnections.values().iterator(); while (iterConnect.hasNext()) { ManagerConnection connection = (ManagerConnection) iterConnect.next(); connection.addEventHandler(this); connection.login(); connection.sendAction(new StatusAction()); connection.sendAction(new QueueStatusAction()); } } /** * Returns a map of all active channel by their unique id: "hostname:ChannelId". */ public Map getChannels() { return channels; } public Map getQueues() { return queues; } /** * Handles all events received from the asterisk server... [truncated message content] |
Update of /cvsroot/asterisk-java/asterisk-java/src/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/net/sf/asterisk/manager Removed Files: AsteriskServer.java ManagerReader.java AuthenticationFailedException.java MultiAsterisksManager.java ActionBuilder.java TimeoutException.java DefaultAsteriskManager.java Channel.java ChannelStateEnum.java AsteriskManager.java ManagerConnectionFactory.java ManagerEventHandler.java EventBuilder.java DefaultManagerConnection.java ManagerConnection.java Util.java ManagerResponseHandler.java Queue.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- AsteriskServer.java DELETED --- --- ManagerReader.java DELETED --- --- AuthenticationFailedException.java DELETED --- --- MultiAsterisksManager.java DELETED --- --- ActionBuilder.java DELETED --- --- TimeoutException.java DELETED --- --- DefaultAsteriskManager.java DELETED --- --- Channel.java DELETED --- --- ChannelStateEnum.java DELETED --- --- AsteriskManager.java DELETED --- --- ManagerConnectionFactory.java DELETED --- --- ManagerEventHandler.java DELETED --- --- EventBuilder.java DELETED --- --- DefaultManagerConnection.java DELETED --- --- ManagerConnection.java DELETED --- --- Util.java DELETED --- --- ManagerResponseHandler.java DELETED --- --- Queue.java DELETED --- |