org.xins.server.ResultCode Maven / Gradle / Ivy
/*
* $Id: ResultCode.java,v 1.29 2007/09/18 08:45:06 agoubard Exp $
*
* Copyright 2003-2007 Orange Nederland Breedband B.V.
* See the COPYRIGHT file for redistribution and use restrictions.
*/
package org.xins.server;
import org.xins.common.MandatoryArgumentChecker;
/**
* Abstraction of an error code returned by a function. Result codes are
* either generic or API-specific.
*
* Result codes do not automatically apply to all functions of an API if
* they have been defined for that API. Instead they are associated with each
* individual function.
*
* @version $Revision: 1.29 $ $Date: 2007/09/18 08:45:06 $
* @author Ernst de Haan
* @author Anthony Goubard
*
* @since XINS 1.0.0
*/
public final class ResultCode {
/**
* The symbolic name of this result code. Can be null
.
*/
private final String _name;
/**
* Constructs a new generic ResultCode
.
*
* @param name
* the symbolic name, can be null
.
*
* @throws IllegalArgumentException
* if name == null
.
*/
public ResultCode(String name) throws IllegalArgumentException {
MandatoryArgumentChecker.check("name", name);
_name = name;
}
/**
* Returns the symbolic name of this result code.
*
* @return
* the symbolic name, can be null
.
*/
public final String getName() {
return _name;
}
}