Example usage for org.apache.commons.configuration ConfigurationException ConfigurationException

List of usage examples for org.apache.commons.configuration ConfigurationException ConfigurationException

Introduction

In this page you can find the example usage for org.apache.commons.configuration ConfigurationException ConfigurationException.

Prototype

public ConfigurationException(Throwable cause) 

Source Link

Document

Constructs a new ConfigurationException with specified nested Throwable.

Usage

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param localAS the localAS to set/*from   www.java 2  s  .co  m*/
 */
void setLocalAS(int localAS) throws ConfigurationException {
    if (localAS <= 0)
        throw new ConfigurationException("negative AS number not allowed");

    this.localAS = localAS;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param remoteAS the remoteAS to set//from   ww w  .  j  ava2  s .co m
 * @throws ConfigurationException 
 */
void setRemoteAS(int remoteAS) throws ConfigurationException {
    if (remoteAS <= 0)
        throw new ConfigurationException("negative AS number not allowed");

    this.remoteAS = remoteAS;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param name the name to set/*from w w  w.j  a  va 2 s  . c o  m*/
 * @throws ConfigurationException 
 */
void setPeerName(String name) throws ConfigurationException {
    if (StringUtils.isBlank(name))
        throw new ConfigurationException("blank name not allowed");

    this.peerName = name;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param localBgpIdentifier the localBgpIdentifier to set
 *///from  w ww.  j  a  v a  2  s  .  com
void setLocalBgpIdentifier(long localBgpIdentifier) throws ConfigurationException {
    if (localBgpIdentifier <= 0)
        throw new ConfigurationException("Illegal local BGP identifier: " + localBgpIdentifier);
    this.localBgpIdentifier = localBgpIdentifier;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param remoteBgpIdentifier the remoteBgpIdentifier to set
 *//*from w w  w  .jav  a2  s  .  co  m*/
void setRemoteBgpIdentifier(long remoteBgpIdentifier) throws ConfigurationException {
    if (remoteBgpIdentifier <= 0)
        throw new ConfigurationException("Illegal remote BGP identifier: " + remoteBgpIdentifier);
    this.remoteBgpIdentifier = remoteBgpIdentifier;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param holdTime the holdTime to set/* w ww  . j  ava  2  s .  c  om*/
 */
void setHoldTime(int holdTime) throws ConfigurationException {
    if (holdTime < 0)
        throw new ConfigurationException("Illegal hold time given: " + holdTime);

    this.holdTime = holdTime;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param connectRetryInterval the connectRetryInterval to set
 *//*from  w  w w .  j ava 2  s  .c om*/
void setIdleHoldTime(int connectRetryInterval) throws ConfigurationException {
    if (connectRetryInterval < 0)
        throw new ConfigurationException("Illegal connect retry interval given: " + connectRetryInterval);

    this.idleHoldTime = connectRetryInterval;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param delayOpenTime the delayOpenTime to set
 * @throws ConfigurationException /*w w  w.j a v  a2s.c om*/
 */
void setDelayOpenTime(int delayOpenTime) throws ConfigurationException {
    if (delayOpenTime < 0)
        throw new ConfigurationException("Illegal delay open time given: " + delayOpenTime);

    this.delayOpenTime = delayOpenTime;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param connectRetryTime the connectRetryTime to set
 *///from  w  w w  . j a  va  2 s . c  o m
void setConnectRetryTime(int connectRetryTime) throws ConfigurationException {
    if (connectRetryTime < 0)
        throw new ConfigurationException("Illegal connect retry time given: " + connectRetryTime);

    this.connectRetryTime = connectRetryTime;
}

From source file:org.bgp4j.config.nodes.impl.PeerConfigurationImpl.java

/**
 * @param automaticStartInterval the automaticStartInterval to set
 *///from   w  w w.  j a v a 2  s .  co m
void setAutomaticStartInterval(int automaticStartInterval) throws ConfigurationException {
    if (automaticStartInterval < 0)
        throw new ConfigurationException("Illegal automatic start interval given: " + connectRetryTime);

    this.automaticStartInterval = automaticStartInterval;
}