summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/UdpConnector.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2014-10-20 11:40:05 -0230
committerMatthew Newhook <matthew@zeroc.com>2014-10-20 11:40:05 -0230
commitb51469b41167fb86ae2059a15cf0475c53fdda7b (patch)
treefc85d6ca2efd89c67e1e4e7438f437c3e08313f4 /java/src/IceInternal/UdpConnector.java
parentFixed (ICE-5695) - IceSSL: misleading exception (diff)
downloadice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.bz2
ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.xz
ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.zip
Down with ant. From the gradle to the grave.
Diffstat (limited to 'java/src/IceInternal/UdpConnector.java')
-rw-r--r--java/src/IceInternal/UdpConnector.java113
1 files changed, 0 insertions, 113 deletions
diff --git a/java/src/IceInternal/UdpConnector.java b/java/src/IceInternal/UdpConnector.java
deleted file mode 100644
index e42e75561de..00000000000
--- a/java/src/IceInternal/UdpConnector.java
+++ /dev/null
@@ -1,113 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-package IceInternal;
-
-final class UdpConnector implements Connector
-{
- @Override
- public Transceiver connect()
- {
- return new UdpTransceiver(_instance, _addr, _sourceAddr, _mcastInterface, _mcastTtl);
- }
-
- public java.nio.channels.SelectableChannel fd()
- {
- assert(false); // Shouldn't be called, startConnect always completes immediately.
- return null;
- }
-
- @Override
- public short type()
- {
- return _instance.type();
- }
-
- @Override
- public String toString()
- {
- return Network.addrToString(_addr);
- }
-
- @Override
- public int hashCode()
- {
- return _hashCode;
- }
-
- //
- // Only for use by UdpEndpointI
- //
- UdpConnector(ProtocolInstance instance, java.net.InetSocketAddress addr, java.net.InetSocketAddress sourceAddr,
- String mcastInterface, int mcastTtl, String connectionId)
- {
- _instance = instance;
- _addr = addr;
- _sourceAddr = sourceAddr;
- _mcastInterface = mcastInterface;
- _mcastTtl = mcastTtl;
- _connectionId = connectionId;
-
- _hashCode = 5381;
- _hashCode = IceInternal.HashUtil.hashAdd(_hashCode , _addr.getAddress().getHostAddress());
- _hashCode = IceInternal.HashUtil.hashAdd(_hashCode , _addr.getPort());
- if(_sourceAddr != null)
- {
- _hashCode = IceInternal.HashUtil.hashAdd(_hashCode , _sourceAddr.getAddress().getHostAddress());
- }
- _hashCode = IceInternal.HashUtil.hashAdd(_hashCode , _mcastInterface);
- _hashCode = IceInternal.HashUtil.hashAdd(_hashCode , _mcastTtl);
- _hashCode = IceInternal.HashUtil.hashAdd(_hashCode , _connectionId);
- }
-
- @Override
- public boolean equals(java.lang.Object obj)
- {
- if(!(obj instanceof UdpConnector))
- {
- return false;
- }
-
- if(this == obj)
- {
- return true;
- }
-
- UdpConnector p = (UdpConnector)obj;
- if(!_connectionId.equals(p._connectionId))
- {
- return false;
- }
-
- if(_mcastTtl != p._mcastTtl)
- {
- return false;
- }
-
- if(_mcastInterface.compareTo(p._mcastInterface) != 0)
- {
- return false;
- }
-
- if(Network.compareAddress(_sourceAddr, p._sourceAddr) != 0)
- {
- return false;
- }
-
- return Network.compareAddress(_addr, p._addr) == 0;
- }
-
- private ProtocolInstance _instance;
- private java.net.InetSocketAddress _addr;
- private java.net.InetSocketAddress _sourceAddr;
- private String _mcastInterface;
- private int _mcastTtl;
- private String _connectionId;
- private int _hashCode;
-}