summaryrefslogtreecommitdiff
path: root/java/src/IceSSL/ConnectorI.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/IceSSL/ConnectorI.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/IceSSL/ConnectorI.java')
-rw-r--r--java/src/IceSSL/ConnectorI.java123
1 files changed, 0 insertions, 123 deletions
diff --git a/java/src/IceSSL/ConnectorI.java b/java/src/IceSSL/ConnectorI.java
deleted file mode 100644
index b1b4edb64c4..00000000000
--- a/java/src/IceSSL/ConnectorI.java
+++ /dev/null
@@ -1,123 +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 IceSSL;
-
-final class ConnectorI implements IceInternal.Connector
-{
- @Override
- public IceInternal.Transceiver connect()
- {
- //
- // The plug-in may not be fully initialized.
- //
- if(!_instance.initialized())
- {
- Ice.PluginInitializationException ex = new Ice.PluginInitializationException();
- ex.reason = "IceSSL: plug-in is not initialized";
- throw ex;
- }
-
- IceInternal.StreamSocket stream = new IceInternal.StreamSocket(_instance, _proxy, _addr, _sourceAddr);
- try
- {
- javax.net.ssl.SSLEngine engine = _instance.createSSLEngine(false, _addr);
- return new TransceiverI(_instance, engine, stream, _host, "");
- }
- catch(RuntimeException ex)
- {
- stream.close();
- throw ex;
- }
- }
-
- @Override
- public short type()
- {
- return _instance.type();
- }
-
- @Override
- public String toString()
- {
- return IceInternal.Network.addrToString(_proxy == null ? _addr : _proxy.getAddress());
- }
-
- @Override
- public int hashCode()
- {
- return _hashCode;
- }
-
- //
- // Only for use by EndpointI.
- //
- ConnectorI(Instance instance, String host, java.net.InetSocketAddress addr, IceInternal.NetworkProxy proxy,
- java.net.InetSocketAddress sourceAddr, int timeout, String connectionId)
- {
- _instance = instance;
- _host = host;
- _addr = addr;
- _sourceAddr = sourceAddr;
- _proxy = proxy;
- _timeout = timeout;
- _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 , _timeout);
- _hashCode = IceInternal.HashUtil.hashAdd(_hashCode , _connectionId);
- }
-
- @Override
- public boolean equals(java.lang.Object obj)
- {
- if(!(obj instanceof ConnectorI))
- {
- return false;
- }
-
- if(this == obj)
- {
- return true;
- }
-
- ConnectorI p = (ConnectorI)obj;
- if(_timeout != p._timeout)
- {
- return false;
- }
-
- if(!_connectionId.equals(p._connectionId))
- {
- return false;
- }
-
- if(IceInternal.Network.compareAddress(_sourceAddr, p._sourceAddr) != 0)
- {
- return false;
- }
-
- return IceInternal.Network.compareAddress(_addr, p._addr) == 0;
- }
-
- private Instance _instance;
- private String _host;
- private java.net.InetSocketAddress _addr;
- private IceInternal.NetworkProxy _proxy;
- private java.net.InetSocketAddress _sourceAddr;
- private int _timeout;
- private String _connectionId;
- private int _hashCode;
-}