org.asteriskjava.manager.event.ShutdownEvent Maven / Gradle / Ivy
Show all versions of asterisk-java Show documentation
/*
* Copyright 2004-2006 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 org.asteriskjava.manager.event;
/**
* A ShutdownEvent is triggered when the asterisk server is shut down or restarted.
* It is implemented in asterisk.c
*
* @author srt
* @version $Id$
*/
public class ShutdownEvent extends ManagerEvent
{
/**
* Serial version identifier
*/
static final long serialVersionUID = 2028136082664018423L;
private Boolean restart = Boolean.FALSE;
private String shutdown;
/**
* @param source
*/
public ShutdownEvent(Object source)
{
super(source);
}
/**
* Returns the kind of shutdown or restart. Possible values are "Uncleanly" and "Cleanly". A
* shutdown is considered unclean if there are any active channels when the system is shut down.
*/
public String getShutdown()
{
return shutdown;
}
public void setShutdown(String shutdown)
{
this.shutdown = shutdown;
}
/**
* Returns true
if the server has been restarted; false
if it has
* been halted.
*/
public Boolean getRestart()
{
return restart;
}
public void setRestart(Boolean restart)
{
this.restart = restart;
}
}