com.pkrete.jsip2.variables
Class AlertTypeFactory

java.lang.Object
  extended by com.pkrete.jsip2.variables.AlertTypeFactory

public class AlertTypeFactory
extends Object

This class generates AlertType objects based on the alert code. This class implements the Singleton design pattern, which means that only one instance is created at run time.

Author:
Petteri Kivimäki

Method Summary
 AlertType getAlertType(String code)
          Returns the alert type that matches the given code.
static AlertTypeFactory getInstance()
          Returns a reference to the singleton object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AlertTypeFactory getInstance()
Returns a reference to the singleton object. The object is created when this method is called for the first time.

Returns:
reference to the singleton object

getAlertType

public AlertType getAlertType(String code)
                       throws InvalidSIP2ResponseValueException
Returns the alert type that matches the given code.

Parameters:
code - alert type code
Returns:
alert type that matches the given code
Throws:
InvalidSIP2ResponseValueException


Copyright © 2012-2014. All Rights Reserved.