Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19002/src/java/net/sf/asterisk/manager/action
Modified Files:
DBGetAction.java
Added Files:
SIPPeersAction.java SIPShowPeerAction.java
Log Message:
Added SIPPeersAction and SIPShowPeerAction and corresponding events PeerEntryEvent and PeerlistCompleteEvent
--- NEW FILE: SIPPeersAction.java ---
/*
* 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.
*
*/
package net.sf.asterisk.manager.action;
import net.sf.asterisk.manager.event.PeerlistCompleteEvent;
/**
* Retrieves a list of all defined SIP peers.<br>
* For each peer that is found a PeerEntryEvent is sent by Asterisk containing
* the details. When all peers have been reported a PeerlistCompleteEvent is sent.<br>
* Available since Asterisk 1.2
*
* @see net.sf.asterisk.manager.event.PeerEntryEvent
* @see net.sf.asterisk.manager.event.PeerlistCompleteEvent
* @author srt
* @version $Id: SIPPeersAction.java,v 1.1 2005/07/18 14:53:24 srt Exp $
* @since 0.2
*/
public class SIPPeersAction extends AbstractManagerAction implements EventGeneratingAction
{
/**
* Serial version identifier
*/
private static final long serialVersionUID = 921037572305993779L;
public String getAction()
{
return "SIPPeers";
}
public Class getActionCompleteEventClass()
{
return PeerlistCompleteEvent.class;
}
}
--- NEW FILE: SIPShowPeerAction.java ---
/*
* 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.
*
*/
package net.sf.asterisk.manager.action;
import net.sf.asterisk.manager.event.PeerlistCompleteEvent;
/**
* Retrieves a the details about a given SIP peer.<br>
* For a PeerEntryEvent is sent by Asterisk containing the details of the peer followed by a
* PeerlistCompleteEvent.<br>
* Available since Asterisk 1.2
*
* @see net.sf.asterisk.manager.event.PeerEntryEvent
* @see net.sf.asterisk.manager.event.PeerlistCompleteEvent
* @author srt
* @version $Id: SIPShowPeerAction.java,v 1.1 2005/07/18 14:53:25 srt Exp $
* @since 0.2
*/
public class SIPShowPeerAction extends AbstractManagerAction implements EventGeneratingAction
{
/**
* Serial version identifier
*/
private static final long serialVersionUID = 921037572305993779L;
private String peer;
public String getAction()
{
return "SIPPeer";
}
/**
* Returns the name of the peer to retrieve.<br>
* This parameter is mandatory.
*
* @return the name of the peer to retrieve.
*/
public String getPeer()
{
return peer;
}
/**
* Sets the name of the peer to retrieve.<br>
* This parameter is mandatory.
*
* @param peer the name of the peer to retrieve.
*/
public void setPeer(String peer)
{
this.peer = peer;
}
public Class getActionCompleteEventClass()
{
return PeerlistCompleteEvent.class;
}
}
Index: DBGetAction.java
===================================================================
RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/DBGetAction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -p -r1.2 -r1.3
--- DBGetAction.java 16 Jul 2005 14:25:48 -0000 1.2
+++ DBGetAction.java 18 Jul 2005 14:53:08 -0000 1.3
@@ -24,6 +24,7 @@ import net.sf.asterisk.manager.event.DBG
* the value, otherwise a ManagerError indicates that no entry matches.<br>
* Available since Asterisk 1.2
*
+ * @see net.sf.asterisk.manager.event.DBGetResponseEvent
* @author srt
* @version $Id$
* @since 0.2
|