net.sf.asterisk.manager.action
Class DBGetAction

java.lang.Object
  extended by net.sf.asterisk.manager.action.AbstractManagerAction
      extended by net.sf.asterisk.manager.action.DBGetAction
All Implemented Interfaces:
java.io.Serializable, EventGeneratingAction, ManagerAction

public class DBGetAction
extends AbstractManagerAction
implements EventGeneratingAction

Retrieves an entry in the Asterisk database for a given family and key.
If an entry is found a DBGetResponseEvent is sent by Asterisk containing the value, otherwise a ManagerError indicates that no entry matches.
Available since Asterisk 1.2

Since:
0.2
Version:
$Id: DBGetAction.java,v 1.4 2005/08/07 00:09:42 srt Exp $
Author:
srt
See Also:
DBGetResponseEvent, Serialized Form

Constructor Summary
DBGetAction()
          Creates a new empty DBGetAction.
DBGetAction(java.lang.String family, java.lang.String key)
          Creates a new DBGetAction that retrieves the value of the database entry with the given key in the given family.
 
Method Summary
 java.lang.String getAction()
          Returns the name of the action.
 java.lang.Class getActionCompleteEventClass()
          Returns the event type that indicates that Asterisk is finished sending response events for this action.
 java.lang.String getFamily()
          Returns the family of the key.
 java.lang.String getKey()
          Returns the the key of the entry to retrieve.
 void setFamily(java.lang.String family)
          Sets the family of the key.
 void setKey(java.lang.String key)
          Sets the key of the entry to retrieve.
 
Methods inherited from class net.sf.asterisk.manager.action.AbstractManagerAction
getActionId, setActionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.asterisk.manager.action.ManagerAction
getActionId, setActionId
 

Constructor Detail

DBGetAction

public DBGetAction()
Creates a new empty DBGetAction.


DBGetAction

public DBGetAction(java.lang.String family,
                   java.lang.String key)
Creates a new DBGetAction that retrieves the value of the database entry with the given key in the given family.

Parameters:
family - the family of the key
key - the key of the entry to retrieve
Since:
0.2
Method Detail

getAction

public java.lang.String getAction()
Description copied from interface: ManagerAction
Returns the name of the action.

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction

getFamily

public java.lang.String getFamily()
Returns the family of the key.

Returns:
the family of the key.

setFamily

public void setFamily(java.lang.String family)
Sets the family of the key.

Parameters:
family - the family of the key.

getKey

public java.lang.String getKey()
Returns the the key of the entry to retrieve.

Returns:
the key of the entry to retrieve.

setKey

public void setKey(java.lang.String key)
Sets the key of the entry to retrieve.

Parameters:
key - the key of the entry to retrieve.

getActionCompleteEventClass

public java.lang.Class getActionCompleteEventClass()
Description copied from interface: EventGeneratingAction
Returns the event type that indicates that Asterisk is finished sending response events for this action.

Specified by:
getActionCompleteEventClass in interface EventGeneratingAction
Returns:
a Class that is an instance of ResponseEvent.
See Also:
ResponseEvent


Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.