Java Code Examples for com.sun.nio.sctp.Association#equals()

The following examples show how to use com.sun.nio.sctp.Association#equals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SctpMultiChannelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 2
Source File: SctpChannelImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void checkAssociation(Association sendAssociation) {
    synchronized (stateLock) {
        if (sendAssociation != null && !sendAssociation.equals(association)) {
            throw new IllegalArgumentException(
                    "Cannot send to another association");
        }
    }
}
 
Example 3
Source File: SctpMultiChannelImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 4
Source File: SctpChannelImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private void checkAssociation(Association sendAssociation) {
    synchronized (stateLock) {
        if (sendAssociation != null && !sendAssociation.equals(association)) {
            throw new IllegalArgumentException(
                    "Cannot send to another association");
        }
    }
}
 
Example 5
Source File: SctpMultiChannelImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 6
Source File: SctpChannelImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void checkAssociation(Association sendAssociation) {
    synchronized (stateLock) {
        if (sendAssociation != null && !sendAssociation.equals(association)) {
            throw new IllegalArgumentException(
                    "Cannot send to another association");
        }
    }
}
 
Example 7
Source File: SctpMultiChannelImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 8
Source File: SctpMultiChannelImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 9
Source File: SctpMultiChannelImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 10
Source File: SctpChannelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void checkAssociation(Association sendAssociation) {
    synchronized (stateLock) {
        if (sendAssociation != null && !sendAssociation.equals(association)) {
            throw new IllegalArgumentException(
                    "Cannot send to another association");
        }
    }
}
 
Example 11
Source File: SctpMultiChannelImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 12
Source File: SctpChannelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void checkAssociation(Association sendAssociation) {
    synchronized (stateLock) {
        if (sendAssociation != null && !sendAssociation.equals(association)) {
            throw new IllegalArgumentException(
                    "Cannot send to another association");
        }
    }
}
 
Example 13
Source File: SctpMultiChannelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 14
Source File: SctpChannelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void checkAssociation(Association sendAssociation) {
    synchronized (stateLock) {
        if (sendAssociation != null && !sendAssociation.equals(association)) {
            throw new IllegalArgumentException(
                    "Cannot send to another association");
        }
    }
}
 
Example 15
Source File: SctpMultiChannelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 16
Source File: SctpMultiChannelImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 17
Source File: SctpMultiChannelImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 18
Source File: SctpChannelImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void checkAssociation(Association sendAssociation) {
    synchronized (stateLock) {
        if (sendAssociation != null && !sendAssociation.equals(association)) {
            throw new IllegalArgumentException(
                    "Cannot send to another association");
        }
    }
}
 
Example 19
Source File: SctpMultiChannelImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @throws  IllegalArgumentException
 *          If the given association is not controlled by this channel
 *
 * @return  {@code true} if, and only if, the given association is one
 *          of the current associations controlled by this channel
 */
private boolean checkAssociation(Association messageAssoc) {
    synchronized (stateLock) {
        for (Association association : associationMap.keySet()) {
            if (messageAssoc.equals(association)) {
                return true;
            }
        }
    }
    throw new IllegalArgumentException(
          "Given Association is not controlled by this channel");
}
 
Example 20
Source File: SctpChannelImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void checkAssociation(Association sendAssociation) {
    synchronized (stateLock) {
        if (sendAssociation != null && !sendAssociation.equals(association)) {
            throw new IllegalArgumentException(
                    "Cannot send to another association");
        }
    }
}