com.pkrete.jsip2.messages
Class SIP2ResponseFactory

java.lang.Object
  extended by com.pkrete.jsip2.messages.SIP2ResponseFactory

public class SIP2ResponseFactory
extends Object

This class generates SIP2MessageResponse objects based on the data received from the ILS SIP server. This class implements the Singleton design pattern, which means that only one instance is created at run time.

Author:
Petteri Kivimäki

Method Summary
 SIP2MessageResponse create(String data)
          Creates a new SIP2MessageResponse object based on the given data.
static SIP2ResponseFactory 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 SIP2ResponseFactory 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

create

public SIP2MessageResponse create(String data)
                           throws InvalidSIP2ResponseException,
                                  InvalidSIP2ResponseValueException
Creates a new SIP2MessageResponse object based on the given data. The data contains the command identifier which defines the actual type of the response message.

Parameters:
data - message response data
Returns:
SIP2MessageResponse object parsed from the data
Throws:
InvalidSIP2ResponseException
InvalidSIP2ResponseValueException


Copyright © 2012-2014. All Rights Reserved.