[Asterisk-java-cvs] CVS: asterisk-java/src/java/net/sf/asterisk/manager Channel.java,1.12,1.13
Brought to you by:
srt
From: Stefan R. <sr...@us...> - 2005-09-01 19:13:27
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14489/src/java/net/sf/asterisk/manager Modified Files: Channel.java Log Message: Readded getContext(), getExtension(), getPriority() as convenience methods to Channel (AJ-12) Index: Channel.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Channel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -p -r1.12 -r1.13 --- Channel.java 16 Aug 2005 16:23:47 -0000 1.12 +++ Channel.java 1 Sep 2005 19:13:20 -0000 1.13 @@ -289,6 +289,48 @@ public class Channel implements Serializ } /** + * Returns the context of the current extension. This is a shortcut for + * <code>getCurrentExtension().getContext()</code>. + * + * @return the context of the current extension. + */ + public String getContext() + { + Extension currentExtension; + + currentExtension = getCurrentExtension(); + return currentExtension == null ? null : currentExtension.getContext(); + } + + /** + * Returns the extension of the current extension. This is a shortcut for + * <code>getCurrentExtension().getExtension()</code>. + * + * @return the extension of the current extension. + */ + public String getExtension() + { + Extension currentExtension; + + currentExtension = getCurrentExtension(); + return currentExtension == null ? null : currentExtension.getExtension(); + } + + /** + * Returns the priority of the current extension. This is a shortcut for + * <code>getCurrentExtension().getPriority()</code>. + * + * @return the priority of the current extension. + */ + public Integer getPriority() + { + Extension currentExtension; + + currentExtension = getCurrentExtension(); + return currentExtension == null ? null : currentExtension.getPriority(); + } + + /** * Returns a list of all visited dialplan entries. * * @return a list of all visited dialplan entries. |