Package org.asteriskjava.manager.event

Examples of org.asteriskjava.manager.event.DisconnectEvent


    }

    @Test
    public void testReconnect() throws Exception
    {
        DisconnectEvent disconnectEvent;

        replay(mockSocket);
        disconnectEvent = new DisconnectEvent(this);

        // fake successful login
        mc.setState(ManagerConnectionState.CONNECTED);

        mc.setUsername("username");
View Full Code Here


    }

    @Test
    public void testReconnectWithIOException() throws Exception
    {
        DisconnectEvent disconnectEvent;

        replay(mockSocket);
        disconnectEvent = new DisconnectEvent(this);

        // fake successful login
        mc.setState(ManagerConnectionState.CONNECTED);

        mc.setThrowIOExceptionOnFirstSocketCreate(true);
View Full Code Here

    }

    @Test
    public void testReconnectWithTimeoutException() throws Exception
    {
        DisconnectEvent disconnectEvent;

        mockSocket.close();
        replay(mockSocket);
        disconnectEvent = new DisconnectEvent(this);

        // fake successful login
        mc.setState(ManagerConnectionState.CONNECTED);

        mc.setThrowTimeoutExceptionOnFirstLogin(true);
View Full Code Here

        }
        finally
        {
            this.dead = true;
            // cleans resources and reconnects if needed
            DisconnectEvent disconnectEvent = new DisconnectEvent(source);
            disconnectEvent.setDateReceived(DateUtil.getDate());
            dispatcher.dispatchEvent(disconnectEvent);
        }
    }
View Full Code Here

        }
        finally
        {
            this.dead = true;
            // cleans resources and reconnects if needed
            DisconnectEvent disconnectEvent = new DisconnectEvent(source);
            disconnectEvent.setDateReceived(DateUtil.getDate());
            dispatcher.dispatchEvent(disconnectEvent);
        }
    }
View Full Code Here

TOP

Related Classes of org.asteriskjava.manager.event.DisconnectEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.