com.interstarinc.xmedius.sendfax.model
Class Gateway

java.lang.Object
  extended by com.interstarinc.xmedius.sendfax.model.Gateway

public final class Gateway
extends Object

This type safe enum class defines the gateways the fax server may used to send a notification.

Version:
$Revision: 1.5 $
Author:
André Morin
See Also:
IFaxOptions.getNotificationGateway()

Field Summary
static Gateway EXCHANGE
           
private  String gateway
           
static Gateway SMTP
           
 
Constructor Summary
private Gateway(String gateway)
           
 
Method Summary
static Gateway getValueFor(String gateway)
          A utility method to convert a String into a Gateway.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SMTP

public static final Gateway SMTP

EXCHANGE

public static final Gateway EXCHANGE

gateway

private String gateway
Constructor Detail

Gateway

private Gateway(String gateway)
Method Detail

toString

public String toString()
Overrides:
toString in class Object
Returns:
This gateway string representation
The XML builder uses this value when converting the fax model to the XML document.

getValueFor

public static Gateway getValueFor(String gateway)
                           throws IllegalArgumentException
A utility method to convert a String into a Gateway.
This is the inverse of toString().

Parameters:
gateway - a gateway id to be converted.
Expected values : any value returned by toString() applied on a instance of this class.
Returns:
The Gateway instance that matches the input parameter.
Comparison is case insensitive.
Throws:
IllegalArgumentException - if the input parameter is not an expected value.
See Also:
toString()