It creates new connections in state {@link org.asteriskjava.manager.ManagerConnectionState#INITIAL}. Before you can start using such a connection (i.e. sending {@link org.asteriskjava.manager.action.ManagerAction}s you must {@link org.asteriskjava.manager.ManagerConnection#login()} to change its stateto {@link org.asteriskjava.manager.ManagerConnectionState#CONNECTED}.
Example:
ManagerConnectionFactory factory; ManagerConnection connection; factory = new ManagerConnectionFactory("localhost", "manager", "secret"); connection = factory.createManagerConnection(); connection.login(); ... connection.logoff();If want you can use the factory to create multiple connections to the same server by calling {@link #createManagerConnection()} multiple times.
@see org.asteriskjava.manager.ManagerConnection @author srt @version $Id$
|
|
|
|
|
|