summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp167
-rw-r--r--cpp/src/Ice/ConnectionFactory.h1
-rw-r--r--cpp/src/Ice/EndpointI.h1
-rw-r--r--cpp/src/Ice/IPEndpointI.cpp53
-rw-r--r--cpp/src/Ice/IPEndpointI.h3
-rw-r--r--cpp/src/Ice/OpaqueEndpointI.cpp7
-rw-r--r--cpp/src/Ice/OpaqueEndpointI.h1
-rw-r--r--cpp/src/Ice/ProtocolInstance.cpp7
-rw-r--r--cpp/src/Ice/ProtocolInstance.h1
-rw-r--r--cpp/src/Ice/Reference.cpp227
-rw-r--r--cpp/src/Ice/Reference.h4
-rw-r--r--cpp/src/Ice/WSEndpoint.cpp11
-rw-r--r--cpp/src/Ice/WSEndpoint.h1
-rw-r--r--cpp/test/Ice/background/EndpointI.cpp12
-rw-r--r--cpp/test/Ice/background/EndpointI.h2
-rw-r--r--cs/src/Ice/ConnectionFactory.cs173
-rw-r--r--cs/src/Ice/ConnectionRequestHandler.cs18
-rw-r--r--cs/src/Ice/EndpointHostResolver.cs62
-rw-r--r--cs/src/Ice/EndpointI.cs1
-rw-r--r--cs/src/Ice/IPEndpointI.cs15
-rw-r--r--cs/src/Ice/OpaqueEndpointI.cs5
-rw-r--r--cs/src/Ice/ProtocolInstance.cs5
-rw-r--r--cs/src/Ice/Reference.cs216
-rw-r--r--cs/src/Ice/WSEndpoint.cs11
-rw-r--r--cs/test/Ice/background/EndpointI.cs11
-rw-r--r--java/src/Ice/src/main/java/IceInternal/EndpointHostResolver.java61
-rw-r--r--java/src/Ice/src/main/java/IceInternal/EndpointI.java1
-rw-r--r--java/src/Ice/src/main/java/IceInternal/FixedReference.java10
-rw-r--r--java/src/Ice/src/main/java/IceInternal/IPEndpointI.java6
-rw-r--r--java/src/Ice/src/main/java/IceInternal/OpaqueEndpointI.java6
-rw-r--r--java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java5
-rw-r--r--java/src/Ice/src/main/java/IceInternal/WSEndpoint.java12
-rw-r--r--java/test/src/main/java/test/Ice/background/EndpointI.java13
33 files changed, 81 insertions, 1048 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index db378242b6a..0fa44c14a95 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -157,173 +157,6 @@ IceInternal::OutgoingConnectionFactory::waitUntilFinished()
}
}
-ConnectionIPtr
-IceInternal::OutgoingConnectionFactory::create(const vector<EndpointIPtr>& endpts, bool hasMore,
- Ice::EndpointSelectionType selType, bool& compress)
-{
- assert(!endpts.empty());
-
- //
- // Apply the overrides.
- //
- vector<EndpointIPtr> endpoints = applyOverrides(endpts);
-
- //
- // Try to find a connection to one of the given endpoints.
- //
- Ice::ConnectionIPtr connection = findConnection(endpoints, compress);
- if(connection)
- {
- return connection;
- }
-
- IceUtil::UniquePtr<Ice::LocalException> exception;
-
- //
- // If we didn't find a connection with the endpoints, we create the connectors
- // for the endpoints.
- //
- vector<ConnectorInfo> connectors;
- for(vector<EndpointIPtr>::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p)
- {
- //
- // Create connectors for the endpoint.
- //
- try
- {
- vector<ConnectorPtr> cons = (*p)->connectors(selType);
- assert(!cons.empty());
- for(vector<ConnectorPtr>::const_iterator r = cons.begin(); r != cons.end(); ++r)
- {
- assert(*r);
- connectors.push_back(ConnectorInfo(*r, *p));
- }
- }
- catch(const Ice::LocalException& ex)
- {
- exception.reset(ex.ice_clone());
- handleException(ex, hasMore || p != endpoints.end() - 1);
- }
- }
-
- if(connectors.empty())
- {
- assert(exception.get());
- exception->ice_throw();
- }
-
- //
- // Try to get a connection to one of the connectors. A null result indicates that no
- // connection was found and that we should try to establish the connection (and that
- // the connectors were added to _pending to prevent other threads from establishing
- // the connection).
- //
- connection = getConnection(connectors, 0, compress);
- if(connection)
- {
- return connection;
- }
-
- //
- // Try to establish the connection to the connectors.
- //
- DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
- const CommunicatorObserverPtr& obsv = _instance->initializationData().observer;
- vector<ConnectorInfo>::const_iterator q;
- for(q = connectors.begin(); q != connectors.end(); ++q)
- {
- ObserverPtr observer;
- if(obsv)
- {
- observer = obsv->getConnectionEstablishmentObserver(q->endpoint, q->connector->toString());
- if(observer)
- {
- observer->attach();
- }
- }
-
- try
- {
- if(_instance->traceLevels()->network >= 2)
- {
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
- out << "trying to establish " << q->endpoint->protocol() << " connection to "
- << q->connector->toString();
- }
- connection = createConnection(q->connector->connect(), *q);
- connection->start(0);
-
- if(observer)
- {
- observer->detach();
- }
-
- if(defaultsAndOverrides->overrideCompress)
- {
- compress = defaultsAndOverrides->overrideCompressValue;
- }
- else
- {
- compress = q->endpoint->compress();
- }
-
- connection->activate();
- break;
- }
- catch(const Ice::CommunicatorDestroyedException& ex)
- {
- if(observer)
- {
- observer->failed(ex.ice_name());
- observer->detach();
- }
- exception.reset(ex.ice_clone());
- handleConnectionException(*exception.get(), hasMore || q != connectors.end() - 1);
- connection = 0;
- break; // No need to continue
- }
- catch(const Ice::LocalException& ex)
- {
- if(_instance->traceLevels()->network >= 2)
- {
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
- out << "failed to establish " << q->endpoint->protocol() << " connection to "
- << q->connector->toString() << "\n" << ex;
- }
-
- if(observer)
- {
- observer->failed(ex.ice_name());
- observer->detach();
- }
- exception.reset(ex.ice_clone());
- handleConnectionException(*exception.get(), hasMore || q != connectors.end() - 1);
- connection = 0;
- }
- }
-
- //
- // Finish creating the connection (this removes the connectors from the _pending
- // list and notifies any waiting threads).
- //
- if(connection)
- {
- finishGetConnection(connectors, *q, connection, 0);
- }
- else
- {
- finishGetConnection(connectors, *exception.get(), 0);
- }
-
- if(!connection)
- {
- assert(exception.get());
- exception->ice_throw();
- }
-
- return connection;
-}
-
void
IceInternal::OutgoingConnectionFactory::create(const vector<EndpointIPtr>& endpts, bool hasMore,
Ice::EndpointSelectionType selType,
diff --git a/cpp/src/Ice/ConnectionFactory.h b/cpp/src/Ice/ConnectionFactory.h
index 1026027d87e..9370bb45a23 100644
--- a/cpp/src/Ice/ConnectionFactory.h
+++ b/cpp/src/Ice/ConnectionFactory.h
@@ -62,7 +62,6 @@ public:
void waitUntilFinished();
- Ice::ConnectionIPtr create(const std::vector<EndpointIPtr>&, bool, Ice::EndpointSelectionType, bool&);
void create(const std::vector<EndpointIPtr>&, bool, Ice::EndpointSelectionType,
const CreateConnectionCallbackPtr&);
void setRouterInfo(const RouterInfoPtr&);
diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h
index 8806e0790ea..4088597db3f 100644
--- a/cpp/src/Ice/EndpointI.h
+++ b/cpp/src/Ice/EndpointI.h
@@ -109,7 +109,6 @@ public:
// returning connectors sorted according to the endpoint selection
// type.
//
- virtual std::vector<ConnectorPtr> connectors(Ice::EndpointSelectionType) const = 0;
virtual void connectors_async(Ice::EndpointSelectionType, const EndpointI_connectorsPtr&) const = 0;
//
diff --git a/cpp/src/Ice/IPEndpointI.cpp b/cpp/src/Ice/IPEndpointI.cpp
index b8df1f4da07..306f975c879 100644
--- a/cpp/src/Ice/IPEndpointI.cpp
+++ b/cpp/src/Ice/IPEndpointI.cpp
@@ -123,12 +123,6 @@ IceInternal::IPEndpointI::connectionId(const string& connectionId) const
}
}
-vector<ConnectorPtr>
-IceInternal::IPEndpointI::connectors(Ice::EndpointSelectionType selType) const
-{
- return _instance->resolve(_host, _port, selType, const_cast<IPEndpointI*>(this));
-}
-
const std::string&
IceInternal::IPEndpointI::host() const
{
@@ -531,53 +525,6 @@ IceInternal::EndpointHostResolver::EndpointHostResolver(const InstancePtr& insta
__setNoDelete(false);
}
-vector<ConnectorPtr>
-IceInternal::EndpointHostResolver::resolve(const string& host, int port, Ice::EndpointSelectionType selType,
- const IPEndpointIPtr& endpoint)
-{
- //
- // Try to get the addresses without DNS lookup. If this doesn't
- // work, we retry with DNS lookup (and observer).
- //
- NetworkProxyPtr networkProxy = _instance->networkProxy();
- if(!networkProxy)
- {
- vector<Address> addrs = getAddresses(host, port, _protocol, selType, _preferIPv6, false);
- if(!addrs.empty())
- {
- return endpoint->connectors(addrs, 0);
- }
- }
-
- ObserverHelperT<> observer;
- const CommunicatorObserverPtr& obsv = _instance->initializationData().observer;
- if(obsv)
- {
- observer.attach(obsv->getEndpointLookupObserver(endpoint));
- }
-
- vector<ConnectorPtr> connectors;
- try
- {
- ProtocolSupport protocol = _protocol;
- if(networkProxy)
- {
- networkProxy = networkProxy->resolveHost(_protocol);
- if(networkProxy)
- {
- protocol = networkProxy->getProtocolSupport();
- }
- }
- connectors = endpoint->connectors(getAddresses(host, port, protocol, selType, _preferIPv6, true), networkProxy);
- }
- catch(const Ice::LocalException& ex)
- {
- observer.failed(ex.ice_name());
- throw;
- }
- return connectors;
-}
-
void
IceInternal::EndpointHostResolver::resolve(const string& host, int port, Ice::EndpointSelectionType selType,
const IPEndpointIPtr& endpoint, const EndpointI_connectorsPtr& callback)
diff --git a/cpp/src/Ice/IPEndpointI.h b/cpp/src/Ice/IPEndpointI.h
index f63a137f3b3..a4b24fc6d69 100644
--- a/cpp/src/Ice/IPEndpointI.h
+++ b/cpp/src/Ice/IPEndpointI.h
@@ -55,7 +55,6 @@ public:
virtual const std::string& connectionId() const;
virtual EndpointIPtr connectionId(const ::std::string&) const;
- virtual std::vector<ConnectorPtr> connectors(Ice::EndpointSelectionType) const;
virtual void connectors_async(Ice::EndpointSelectionType, const EndpointI_connectorsPtr&) const;
virtual std::vector<EndpointIPtr> expand() const;
virtual bool equivalent(const EndpointIPtr&) const;
@@ -73,7 +72,6 @@ public:
virtual void hashInit(Ice::Int&) const;
virtual void fillEndpointInfo(Ice::IPEndpointInfo*) const;
- using EndpointI::connectors;
using EndpointI::connectionId;
virtual void initWithOptions(std::vector<std::string>&, bool);
@@ -113,7 +111,6 @@ public:
EndpointHostResolver(const InstancePtr&);
- std::vector<ConnectorPtr> resolve(const std::string&, int, Ice::EndpointSelectionType, const IPEndpointIPtr&);
void resolve(const std::string&, int, Ice::EndpointSelectionType, const IPEndpointIPtr&,
const EndpointI_connectorsPtr&);
void destroy();
diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp
index ff495474d3c..da117e01172 100644
--- a/cpp/src/Ice/OpaqueEndpointI.cpp
+++ b/cpp/src/Ice/OpaqueEndpointI.cpp
@@ -175,13 +175,6 @@ IceInternal::OpaqueEndpointI::transceiver() const
return 0;
}
-vector<ConnectorPtr>
-IceInternal::OpaqueEndpointI::connectors(Ice::EndpointSelectionType) const
-{
- vector<ConnectorPtr> ret;
- return ret;
-}
-
void
IceInternal::OpaqueEndpointI::connectors_async(Ice::EndpointSelectionType, const EndpointI_connectorsPtr& cb) const
{
diff --git a/cpp/src/Ice/OpaqueEndpointI.h b/cpp/src/Ice/OpaqueEndpointI.h
index 03fe3066f06..5d3da611f98 100644
--- a/cpp/src/Ice/OpaqueEndpointI.h
+++ b/cpp/src/Ice/OpaqueEndpointI.h
@@ -38,7 +38,6 @@ public:
virtual bool secure() const;
virtual TransceiverPtr transceiver() const;
- virtual std::vector<ConnectorPtr> connectors(Ice::EndpointSelectionType) const;
virtual void connectors_async(Ice::EndpointSelectionType, const EndpointI_connectorsPtr&) const;
virtual AcceptorPtr acceptor(const std::string&) const;
virtual std::vector<EndpointIPtr> expand() const;
diff --git a/cpp/src/Ice/ProtocolInstance.cpp b/cpp/src/Ice/ProtocolInstance.cpp
index 2c27bb2c0c2..530a6b8a230 100644
--- a/cpp/src/Ice/ProtocolInstance.cpp
+++ b/cpp/src/Ice/ProtocolInstance.cpp
@@ -89,13 +89,6 @@ IceInternal::ProtocolInstance::messageSizeMax() const
return _instance->messageSizeMax();
}
-vector<ConnectorPtr>
-IceInternal::ProtocolInstance::resolve(const string& host, int port, EndpointSelectionType type,
- const IPEndpointIPtr& endpt) const
-{
- return _instance->endpointHostResolver()->resolve(host, port, type, endpt);
-}
-
void
IceInternal::ProtocolInstance::resolve(const string& host, int port, EndpointSelectionType type,
const IPEndpointIPtr& endpt, const EndpointI_connectorsPtr& cb) const
diff --git a/cpp/src/Ice/ProtocolInstance.h b/cpp/src/Ice/ProtocolInstance.h
index 60ce51426f2..ecb9601626f 100644
--- a/cpp/src/Ice/ProtocolInstance.h
+++ b/cpp/src/Ice/ProtocolInstance.h
@@ -68,7 +68,6 @@ public:
size_t messageSizeMax() const;
int defaultTimeout() const;
- std::vector<ConnectorPtr> resolve(const std::string&, int, Ice::EndpointSelectionType, const IPEndpointIPtr&) const;
void resolve(const std::string&, int, Ice::EndpointSelectionType, const IPEndpointIPtr&,
const EndpointI_connectorsPtr&) const;
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index c4e11579114..f6110157721 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -750,11 +750,13 @@ IceInternal::FixedReference::toProperty(const string&) const
return PropertyDict(); // To keep the compiler from complaining.
}
-ConnectionIPtr
-IceInternal::FixedReference::getConnection(bool& compress) const
+void
+IceInternal::FixedReference::getConnection(const GetConnectionCallbackPtr& callback) const
{
- switch(getMode())
+ try
{
+ switch(getMode())
+ {
case Reference::ModeTwoway:
case Reference::ModeOneway:
case Reference::ModeBatchOneway:
@@ -775,52 +777,43 @@ IceInternal::FixedReference::getConnection(bool& compress) const
}
break;
}
- }
-
- //
- // If a secure connection is requested or secure overrides is set,
- // check if the connection is secure.
- //
- bool secure;
- DefaultsAndOverridesPtr defaultsAndOverrides = getInstance()->defaultsAndOverrides();
- if(defaultsAndOverrides->overrideSecure)
- {
- secure = defaultsAndOverrides->overrideSecureValue;
- }
- else
- {
- secure = getSecure();
- }
- if(secure && !_fixedConnection->endpoint()->secure())
- {
- throw NoEndpointException(__FILE__, __LINE__, "");
- }
-
- _fixedConnection->throwException(); // Throw in case our connection is already destroyed.
+ }
- if(defaultsAndOverrides->overrideCompress)
- {
- compress = defaultsAndOverrides->overrideCompressValue;
- }
- else if(_overrideCompress)
- {
- compress = _compress;
- }
- else
- {
- compress = _fixedConnection->endpoint()->compress();
- }
- return _fixedConnection;
-}
+ //
+ // If a secure connection is requested or secure overrides is set,
+ // check if the connection is secure.
+ //
+ bool secure;
+ DefaultsAndOverridesPtr defaultsAndOverrides = getInstance()->defaultsAndOverrides();
+ if(defaultsAndOverrides->overrideSecure)
+ {
+ secure = defaultsAndOverrides->overrideSecureValue;
+ }
+ else
+ {
+ secure = getSecure();
+ }
+ if(secure && !_fixedConnection->endpoint()->secure())
+ {
+ throw NoEndpointException(__FILE__, __LINE__, "");
+ }
-void
-IceInternal::FixedReference::getConnection(const GetConnectionCallbackPtr& callback) const
-{
- try
- {
+ _fixedConnection->throwException(); // Throw in case our connection is already destroyed.
+
bool compress;
- ConnectionIPtr connection = getConnection(compress);
- callback->setConnection(connection, compress);
+ if(defaultsAndOverrides->overrideCompress)
+ {
+ compress = defaultsAndOverrides->overrideCompressValue;
+ }
+ else if(_overrideCompress)
+ {
+ compress = _compress;
+ }
+ else
+ {
+ compress = _fixedConnection->endpoint()->compress();
+ }
+ callback->setConnection(_fixedConnection, compress);
}
catch(const Ice::LocalException& ex)
{
@@ -1508,79 +1501,6 @@ IceInternal::RoutableReference::clone() const
return new RoutableReference(*this);
}
-ConnectionIPtr
-IceInternal::RoutableReference::getConnection(bool& comp) const
-{
- if(_routerInfo)
- {
- //
- // If we route, we send everything to the router's client
- // proxy endpoints.
- //
- vector<EndpointIPtr> endpts = _routerInfo->getClientEndpoints();
- if(!endpts.empty())
- {
- applyOverrides(endpts);
- return createConnection(endpts, comp);
- }
- }
-
- if(!_endpoints.empty())
- {
- return createConnection(_endpoints, comp);
- }
-
- while(true)
- {
- bool cached = false;
- vector<EndpointIPtr> endpts;
- if(_locatorInfo)
- {
- endpts = _locatorInfo->getEndpoints(const_cast<RoutableReference*>(this), _locatorCacheTimeout, cached);
- applyOverrides(endpts);
- }
-
- if(endpts.empty())
- {
- throw Ice::NoEndpointException(__FILE__, __LINE__, toString());
- }
-
- try
- {
- return createConnection(endpts, comp);
- }
- catch(const NoEndpointException&)
- {
- throw; // No need to retry if there's no endpoints.
- }
- catch(const LocalException& ex)
- {
- assert(_locatorInfo);
- _locatorInfo->clearCache(const_cast<RoutableReference*>(this));
-
- if(cached)
- {
- // COMPILERFIX: Braces needed to prevent BCB from causing TraceLevels refCount from
- // being decremented twice when loop continues.
- {
- TraceLevelsPtr traceLevels = getInstance()->traceLevels();
- if(traceLevels->retry >= 2)
- {
- Trace out(getInstance()->initializationData().logger, traceLevels->retryCat);
- out << "connection to cached endpoints failed\n"
- << "removing endpoints from cache and trying one more time\n" << ex;
- }
- }
- continue;
- }
- throw;
- }
- }
-
- assert(false);
- return 0;
-}
-
void
IceInternal::RoutableReference::getConnection(const GetConnectionCallbackPtr& callback) const
{
@@ -1742,75 +1662,6 @@ IceInternal::RoutableReference::getConnectionNoRouterInfo(const GetConnectionCal
}
}
-ConnectionIPtr
-IceInternal::RoutableReference::createConnection(const vector<EndpointIPtr>& allEndpoints, bool& comp) const
-{
- vector<EndpointIPtr> endpoints = filterEndpoints(allEndpoints);
- if(endpoints.empty())
- {
- throw Ice::NoEndpointException(__FILE__, __LINE__, toString());
- }
-
- OutgoingConnectionFactoryPtr factory = getInstance()->outgoingConnectionFactory();
- Ice::ConnectionIPtr connection;
- if(getCacheConnection() || endpoints.size() == 1)
- {
- //
- // Get an existing connection or create one if there's no
- // existing connection to one of the given endpoints.
- //
- connection = factory->create(endpoints, false, getEndpointSelection(), comp);
- }
- else
- {
- //
- // Go through the list of endpoints and try to create the
- // connection until it succeeds. This is different from just
- // calling create() with the given endpoints since this might
- // create a new connection even if there's an existing
- // connection for one of the endpoints.
- //
-
- IceUtil::UniquePtr<LocalException> exception;
- vector<EndpointIPtr> endpoint;
- endpoint.push_back(0);
-
- for(vector<EndpointIPtr>::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p)
- {
- try
- {
- endpoint.back() = *p;
- connection = factory->create(endpoint, p + 1 == endpoints.end(), getEndpointSelection(), comp);
- break;
- }
- catch(const LocalException& ex)
- {
- exception.reset(ex.ice_clone());
- }
- }
-
- if(!connection)
- {
- assert(exception.get());
- exception->ice_throw();
- }
- }
-
- assert(connection);
-
- //
- // If we have a router, set the object adapter for this router
- // (if any) to the new connection, so that callbacks from the
- // router can be received over this new connection.
- //
- if(_routerInfo && _routerInfo->getAdapter())
- {
- connection->setAdapter(_routerInfo->getAdapter());
- }
-
- return connection;
-}
-
void
IceInternal::RoutableReference::createConnection(const vector<EndpointIPtr>& allEndpoints,
const GetConnectionCallbackPtr& callback) const
diff --git a/cpp/src/Ice/Reference.h b/cpp/src/Ice/Reference.h
index ff27cb6d638..7da0a673eb7 100644
--- a/cpp/src/Ice/Reference.h
+++ b/cpp/src/Ice/Reference.h
@@ -130,7 +130,6 @@ public:
//
// Get a suitable connection for this reference.
//
- virtual Ice::ConnectionIPtr getConnection(bool&) const = 0;
virtual void getConnection(const GetConnectionCallbackPtr&) const = 0;
virtual bool operator==(const Reference&) const;
@@ -206,7 +205,6 @@ public:
virtual std::string toString() const;
virtual Ice::PropertyDict toProperty(const std::string&) const;
- virtual Ice::ConnectionIPtr getConnection(bool&) const;
virtual void getConnection(const GetConnectionCallbackPtr&) const;
virtual bool operator==(const Reference&) const;
@@ -270,11 +268,9 @@ public:
virtual ReferencePtr clone() const;
- virtual Ice::ConnectionIPtr getConnection(bool&) const;
virtual void getConnection(const GetConnectionCallbackPtr&) const;
virtual void getConnectionNoRouterInfo(const GetConnectionCallbackPtr&) const;
- Ice::ConnectionIPtr createConnection(const std::vector<EndpointIPtr>&, bool&) const;
void createConnection(const std::vector<EndpointIPtr>&, const GetConnectionCallbackPtr&) const;
void applyOverrides(std::vector<EndpointIPtr>&) const;
diff --git a/cpp/src/Ice/WSEndpoint.cpp b/cpp/src/Ice/WSEndpoint.cpp
index f9eabad59d9..3cba801d782 100644
--- a/cpp/src/Ice/WSEndpoint.cpp
+++ b/cpp/src/Ice/WSEndpoint.cpp
@@ -179,17 +179,6 @@ IceInternal::WSEndpoint::transceiver() const
return 0;
}
-vector<ConnectorPtr>
-IceInternal::WSEndpoint::connectors(Ice::EndpointSelectionType selType) const
-{
- vector<ConnectorPtr> connectors = _delegate->connectors(selType);
- for(vector<ConnectorPtr>::iterator p = connectors.begin(); p != connectors.end(); ++p)
- {
- *p = new WSConnector(_instance, *p, _delegate->host(), _delegate->port(), _resource);
- }
- return connectors;
-}
-
void
IceInternal::WSEndpoint::connectors_async(Ice::EndpointSelectionType selType,
const EndpointI_connectorsPtr& callback) const
diff --git a/cpp/src/Ice/WSEndpoint.h b/cpp/src/Ice/WSEndpoint.h
index a5aa3af5908..5d00f243e60 100644
--- a/cpp/src/Ice/WSEndpoint.h
+++ b/cpp/src/Ice/WSEndpoint.h
@@ -43,7 +43,6 @@ public:
virtual bool secure() const;
virtual TransceiverPtr transceiver() const;
- virtual std::vector<ConnectorPtr> connectors(Ice::EndpointSelectionType) const;
virtual void connectors_async(Ice::EndpointSelectionType, const EndpointI_connectorsPtr&) const;
virtual AcceptorPtr acceptor(const std::string&) const;
diff --git a/cpp/test/Ice/background/EndpointI.cpp b/cpp/test/Ice/background/EndpointI.cpp
index 55ed99e5f26..ea30c568870 100644
--- a/cpp/test/Ice/background/EndpointI.cpp
+++ b/cpp/test/Ice/background/EndpointI.cpp
@@ -139,18 +139,6 @@ EndpointI::transceiver() const
}
}
-vector<IceInternal::ConnectorPtr>
-EndpointI::connectors(Ice::EndpointSelectionType selType) const
-{
- _configuration->checkConnectorsException();
- vector<IceInternal::ConnectorPtr> c = _endpoint->connectors(selType);
- for(vector<IceInternal::ConnectorPtr>::iterator p = c.begin(); p != c.end(); ++p)
- {
- *p = new Connector(*p);
- }
- return c;
-}
-
void
EndpointI::connectors_async(Ice::EndpointSelectionType selType, const IceInternal::EndpointI_connectorsPtr& cb) const
{
diff --git a/cpp/test/Ice/background/EndpointI.h b/cpp/test/Ice/background/EndpointI.h
index a3b3e74b3d0..9947d388f9d 100644
--- a/cpp/test/Ice/background/EndpointI.h
+++ b/cpp/test/Ice/background/EndpointI.h
@@ -32,7 +32,6 @@ public:
virtual IceInternal::EndpointIPtr connectionId(const ::std::string&) const;
virtual IceInternal::EndpointIPtr compress(bool) const;
virtual IceInternal::TransceiverPtr transceiver() const;
- virtual std::vector<IceInternal::ConnectorPtr> connectors(Ice::EndpointSelectionType) const;
virtual void connectors_async(Ice::EndpointSelectionType, const IceInternal::EndpointI_connectorsPtr&) const;
virtual IceInternal::AcceptorPtr acceptor(const std::string&) const;
@@ -58,7 +57,6 @@ public:
EndpointIPtr endpoint(const IceInternal::EndpointIPtr&) const;
using IceInternal::EndpointI::connectionId;
- using IceInternal::EndpointI::connectors;
private:
diff --git a/cs/src/Ice/ConnectionFactory.cs b/cs/src/Ice/ConnectionFactory.cs
index 28f0701b0cf..a1b2b1eae4b 100644
--- a/cs/src/Ice/ConnectionFactory.cs
+++ b/cs/src/Ice/ConnectionFactory.cs
@@ -148,179 +148,6 @@ namespace IceInternal
}
}
- public Ice.ConnectionI create(EndpointI[] endpts, bool hasMore, Ice.EndpointSelectionType selType,
- out bool compress)
- {
- Debug.Assert(endpts.Length > 0);
-
- //
- // Apply the overrides.
- //
- List<EndpointI> endpoints = applyOverrides(endpts);
-
- //
- // Try to find a connection to one of the given endpoints.
- //
- Ice.ConnectionI connection = findConnection(endpoints, out compress);
- if(connection != null)
- {
- return connection;
- }
-
- Ice.LocalException exception = null;
-
- //
- // If we didn't find a connection with the endpoints, we create the connectors
- // for the endpoints.
- //
- List<ConnectorInfo> connectors = new List<ConnectorInfo>();
- for(int i = 0; i < endpoints.Count; ++i)
- {
- EndpointI endpoint = endpoints[i];
-
- try
- {
- //
- // Create connectors for the endpoint.
- //
- List<Connector> cons = endpoint.connectors(selType);
- Debug.Assert(cons.Count > 0);
- foreach(Connector conn in cons)
- {
- connectors.Add(new ConnectorInfo(conn, endpoint));
- }
- }
- catch(Ice.LocalException ex)
- {
- exception = ex;
- handleException(exception, hasMore || i < endpoints.Count - 1);
- }
- }
-
- if(connectors.Count == 0)
- {
- Debug.Assert(exception != null);
- throw exception;
- }
-
- //
- // Try to get a connection to one of the connectors. A null result indicates that no
- // connection was found and that we should try to establish the connection (and that
- // the connectors were added to _pending to prevent other threads from establishing
- // the connection).
- //
- connection = getConnection(connectors, null, out compress);
- if(connection != null)
- {
- return connection;
- }
-
- //
- // Try to establish the connection to the connectors.
- //
- DefaultsAndOverrides defaultsAndOverrides = _instance.defaultsAndOverrides();
- Ice.Instrumentation.CommunicatorObserver obsv = _instance.initializationData().observer;
- ConnectorInfo ci = null;
- for(int i = 0; i < connectors.Count; ++i)
- {
- ci = connectors[i];
-
- Ice.Instrumentation.Observer observer = null;
- if(obsv != null)
- {
- observer = obsv.getConnectionEstablishmentObserver(ci.endpoint, ci.connector.ToString());
- if(observer != null)
- {
- observer.attach();
- }
- }
-
- try
- {
- if(_instance.traceLevels().network >= 2)
- {
- StringBuilder s = new StringBuilder("trying to establish ");
- s.Append(ci.endpoint.protocol());
- s.Append(" connection to ");
- s.Append(ci.connector.ToString());
- _instance.initializationData().logger.trace(_instance.traceLevels().networkCat, s.ToString());
- }
-
- connection = createConnection(ci.connector.connect(), ci);
- connection.start(null);
-
- if(observer != null)
- {
- observer.detach();
- }
-
- if(defaultsAndOverrides.overrideCompress)
- {
- compress = defaultsAndOverrides.overrideCompressValue;
- }
- else
- {
- compress = ci.endpoint.compress();
- }
- connection.activate();
- break;
- }
- catch(Ice.CommunicatorDestroyedException ex)
- {
- if(observer != null)
- {
- observer.failed(ex.ice_name());
- observer.detach();
- }
- exception = ex;
- handleConnectionException(exception, hasMore || i < connectors.Count - 1);
- connection = null;
- break; // No need to continue
- }
- catch(Ice.LocalException ex)
- {
- if(_instance.traceLevels().network >= 2)
- {
- StringBuilder s = new StringBuilder("failed to establish ");
- s.Append(ci.endpoint.protocol());
- s.Append(" connection to ");
- s.Append(ci.connector.ToString());
- s.Append(ex);
- _instance.initializationData().logger.trace(_instance.traceLevels().networkCat, s.ToString());
- }
-
- if(observer != null)
- {
- observer.failed(ex.ice_name());
- observer.detach();
- }
- exception = ex;
- handleConnectionException(exception, hasMore || i < connectors.Count - 1);
- connection = null;
- }
- }
-
- //
- // Finish creating the connection (this removes the connectors from the _pending
- // list and notifies any waiting threads).
- //
- if(connection != null)
- {
- finishGetConnection(connectors, ci, connection, null);
- }
- else
- {
- finishGetConnection(connectors, exception, null);
- }
-
- if(connection == null)
- {
- Debug.Assert(exception != null);
- throw exception;
- }
-
- return connection;
- }
public void create(EndpointI[] endpts, bool hasMore, Ice.EndpointSelectionType selType,
CreateConnectionCallback callback)
diff --git a/cs/src/Ice/ConnectionRequestHandler.cs b/cs/src/Ice/ConnectionRequestHandler.cs
index 683fefabc5e..e0430bc9a3f 100644
--- a/cs/src/Ice/ConnectionRequestHandler.cs
+++ b/cs/src/Ice/ConnectionRequestHandler.cs
@@ -86,24 +86,6 @@ namespace IceInternal
return _connection;
}
- public ConnectionRequestHandler(Reference @ref, Ice.ObjectPrx proxy)
- {
- _reference = @ref;
- _response = _reference.getMode() == Reference.Mode.ModeTwoway;
-
- _connection = _reference.getConnection(out _compress);
-
- //
- // If this proxy is for a non-local object, and we are using a router, then
- // add this proxy to the router info object.
- //
- IceInternal.RouterInfo ri = _reference.getRouterInfo();
- if(ri != null)
- {
- ri.addProxy(proxy);
- }
- }
-
public ConnectionRequestHandler(Reference @ref, Ice.ConnectionI connection, bool compress)
{
_reference = @ref;
diff --git a/cs/src/Ice/EndpointHostResolver.cs b/cs/src/Ice/EndpointHostResolver.cs
index c4230daa473..c5f314b265b 100644
--- a/cs/src/Ice/EndpointHostResolver.cs
+++ b/cs/src/Ice/EndpointHostResolver.cs
@@ -37,68 +37,6 @@ namespace IceInternal
}
}
-
- public List<Connector> resolve(string host, int port, Ice.EndpointSelectionType selType, IPEndpointI endpoint)
- {
- //
- // Try to get the addresses without DNS lookup. If this doesn't
- // work, we retry with DNS lookup (and observer).
- //
- NetworkProxy networkProxy = _instance.networkProxy();
- if(networkProxy == null)
- {
- List<EndPoint> addrs = Network.getAddresses(host, port, _protocol, selType, _preferIPv6, false);
- if(addrs.Count > 0)
- {
- return endpoint.connectors(addrs, null);
- }
- }
-
- Ice.Instrumentation.CommunicatorObserver obsv = _instance.initializationData().observer;
- Ice.Instrumentation.Observer observer = null;
- if(obsv != null)
- {
- observer = obsv.getEndpointLookupObserver(endpoint);
- if(observer != null)
- {
- observer.attach();
- }
- }
-
- List<Connector> connectors = null;
- try
- {
- int protocol = _protocol;
- if(networkProxy != null)
- {
- networkProxy = networkProxy.resolveHost(protocol);
- if(networkProxy != null)
- {
- protocol = networkProxy.getProtocolSupport();
- }
- }
-
- connectors = endpoint.connectors(Network.getAddresses(host, port, protocol, selType, _preferIPv6, true),
- networkProxy);
- }
- catch(Ice.LocalException ex)
- {
- if(observer != null)
- {
- observer.failed(ex.ice_name());
- }
- throw ex;
- }
- finally
- {
- if(observer != null)
- {
- observer.detach();
- }
- }
- return connectors;
- }
-
public void resolve(string host, int port, Ice.EndpointSelectionType selType, IPEndpointI endpoint,
EndpointI_connectors callback)
{
diff --git a/cs/src/Ice/EndpointI.cs b/cs/src/Ice/EndpointI.cs
index ad3dffe4382..7fa0038b0a9 100644
--- a/cs/src/Ice/EndpointI.cs
+++ b/cs/src/Ice/EndpointI.cs
@@ -128,7 +128,6 @@ namespace IceInternal
// Return a connector for this endpoint, or empty list if no connector
// is available.
//
- public abstract List<Connector> connectors(Ice.EndpointSelectionType selType);
public abstract void connectors_async(Ice.EndpointSelectionType selType, EndpointI_connectors callback);
//
diff --git a/cs/src/Ice/IPEndpointI.cs b/cs/src/Ice/IPEndpointI.cs
index a47a40bbb64..9ae23449beb 100644
--- a/cs/src/Ice/IPEndpointI.cs
+++ b/cs/src/Ice/IPEndpointI.cs
@@ -114,21 +114,6 @@ namespace IceInternal
}
}
- public override List<Connector> connectors(Ice.EndpointSelectionType selType)
- {
-#if SILVERLIGHT
- return connectors(Network.getAddresses(host_,
- port_,
- instance_.protocolSupport(),
- selType,
- instance_.preferIPv6(),
- false),
- instance_.networkProxy());
-#else
- return instance_.resolve(host_, port_, selType, this);
-#endif
- }
-
public override void connectors_async(Ice.EndpointSelectionType selType, EndpointI_connectors callback)
{
#if SILVERLIGHT
diff --git a/cs/src/Ice/OpaqueEndpointI.cs b/cs/src/Ice/OpaqueEndpointI.cs
index b99499ccd9e..437d7f1dcc7 100644
--- a/cs/src/Ice/OpaqueEndpointI.cs
+++ b/cs/src/Ice/OpaqueEndpointI.cs
@@ -204,11 +204,6 @@ namespace IceInternal
// Return connectors for this endpoint, or empty list if no connector
// is available.
//
- public override List<Connector> connectors(Ice.EndpointSelectionType endSel)
- {
- return new List<Connector>();
- }
-
public override void connectors_async(Ice.EndpointSelectionType endSel, EndpointI_connectors callback)
{
callback.connectors(new List<Connector>());
diff --git a/cs/src/Ice/ProtocolInstance.cs b/cs/src/Ice/ProtocolInstance.cs
index 1ac96df7955..f9fbfc01db7 100644
--- a/cs/src/Ice/ProtocolInstance.cs
+++ b/cs/src/Ice/ProtocolInstance.cs
@@ -107,11 +107,6 @@ namespace IceInternal
}
#if !SILVERLIGHT
- public List<Connector> resolve(string host, int port, Ice.EndpointSelectionType type, IPEndpointI endpt)
- {
- return instance_.endpointHostResolver().resolve(host, port, type, endpt);
- }
-
public void resolve(string host, int port, Ice.EndpointSelectionType type, IPEndpointI endpt,
EndpointI_connectors callback)
{
diff --git a/cs/src/Ice/Reference.cs b/cs/src/Ice/Reference.cs
index 0f427cec53a..6bb3b94876e 100644
--- a/cs/src/Ice/Reference.cs
+++ b/cs/src/Ice/Reference.cs
@@ -394,7 +394,6 @@ namespace IceInternal
public abstract Dictionary<string, string> toProperty(string prefix);
- public abstract Ice.ConnectionI getConnection(out bool comp);
public abstract void getConnection(GetConnectionCallback callback);
public override bool Equals(object obj)
@@ -665,10 +664,12 @@ namespace IceInternal
throw new Ice.FixedProxyException();
}
- public override Ice.ConnectionI getConnection(out bool compress)
+ public override void getConnection(GetConnectionCallback callback)
{
- switch(getMode())
+ try
{
+ switch(getMode())
+ {
case Reference.Mode.ModeTwoway:
case Reference.Mode.ModeOneway:
case Reference.Mode.ModeBatchOneway:
@@ -689,51 +690,43 @@ namespace IceInternal
}
break;
}
- }
-
- //
- // If a secure connection is requested or secure overrides is set,
- // check if the connection is secure.
- //
- bool secure;
- DefaultsAndOverrides defaultsAndOverrides = getInstance().defaultsAndOverrides();
- if(defaultsAndOverrides.overrideSecure)
- {
- secure = defaultsAndOverrides.overrideSecureValue;
- }
- else
- {
- secure = getSecure();
- }
- if(secure && !_fixedConnection.endpoint().secure())
- {
- throw new Ice.NoEndpointException("");
- }
+ }
- _fixedConnection.throwException(); // Throw in case our connection is already destroyed.
+ //
+ // If a secure connection is requested or secure overrides is set,
+ // check if the connection is secure.
+ //
+ bool secure;
+ DefaultsAndOverrides defaultsAndOverrides = getInstance().defaultsAndOverrides();
+ if(defaultsAndOverrides.overrideSecure)
+ {
+ secure = defaultsAndOverrides.overrideSecureValue;
+ }
+ else
+ {
+ secure = getSecure();
+ }
+ if(secure && !_fixedConnection.endpoint().secure())
+ {
+ throw new Ice.NoEndpointException("");
+ }
- if(defaultsAndOverrides.overrideCompress)
- {
- compress = defaultsAndOverrides.overrideCompressValue;
- }
- else if(overrideCompress_)
- {
- compress = compress_;
- }
- else
- {
- compress = _fixedConnection.endpoint().compress();
- }
- return _fixedConnection;
- }
+ _fixedConnection.throwException(); // Throw in case our connection is already destroyed.
- public override void getConnection(GetConnectionCallback callback)
- {
- try
- {
bool compress;
- Ice.ConnectionI connection = getConnection(out compress);
- callback.setConnection(connection, compress);
+ if(defaultsAndOverrides.overrideCompress)
+ {
+ compress = defaultsAndOverrides.overrideCompressValue;
+ }
+ else if(overrideCompress_)
+ {
+ compress = compress_;
+ }
+ else
+ {
+ compress = _fixedConnection.endpoint().compress();
+ }
+ callback.setConnection(_fixedConnection, compress);
}
catch(Ice.LocalException ex)
{
@@ -1199,69 +1192,6 @@ namespace IceInternal
return true;
}
- public override Ice.ConnectionI getConnection(out bool comp)
- {
- if(_routerInfo != null)
- {
- //
- // If we route, we send everything to the router's client
- // proxy endpoints.
- //
- EndpointI[] endpts = _routerInfo.getClientEndpoints();
- if(endpts.Length > 0)
- {
- applyOverrides(ref endpts);
- return createConnection(endpts, out comp);
- }
- }
-
- if(_endpoints.Length > 0)
- {
- return createConnection(_endpoints, out comp);
- }
-
- while(true)
- {
- bool cached = false;
- EndpointI[] endpts = null;
- if(_locatorInfo != null)
- {
- endpts = _locatorInfo.getEndpoints(this, _locatorCacheTimeout, out cached);
- applyOverrides(ref endpts);
- }
-
- if(endpts == null || endpts.Length == 0)
- {
- throw new Ice.NoEndpointException(ToString());
- }
-
- try
- {
- return createConnection(endpts, out comp);
- }
- catch(Ice.NoEndpointException)
- {
- throw; // No need to retry if there's no endpoints.
- }
- catch(Ice.LocalException ex)
- {
- Debug.Assert(_locatorInfo != null);
- _locatorInfo.clearCache(this);
- if(cached)
- {
- TraceLevels traceLevels = getInstance().traceLevels();
- if(traceLevels.retry >= 2)
- {
- String s = "connection to cached endpoints failed\n" +
- "removing endpoints from cache and trying one more time\n" + ex;
- getInstance().initializationData().logger.trace(traceLevels.retryCat, s);
- }
- continue; // Try again if the endpoints were cached.
- }
- throw;
- }
- }
- }
private sealed class RouterEndpointsCallback : RouterInfo.GetClientEndpointsCallback
{
@@ -1594,78 +1524,6 @@ namespace IceInternal
return arr;
}
- protected Ice.ConnectionI createConnection(EndpointI[] allEndpoints, out bool compress)
- {
- compress = false; // Satisfy the compiler
-
- EndpointI[] endpoints = filterEndpoints(allEndpoints);
- if(endpoints.Length == 0)
- {
- throw new Ice.NoEndpointException(ToString());
- }
-
- //
- // Finally, create the connection.
- //
- OutgoingConnectionFactory factory = getInstance().outgoingConnectionFactory();
- Ice.ConnectionI connection = null;
- if(getCacheConnection() || endpoints.Length == 1)
- {
- //
- // Get an existing connection or create one if there's no
- // existing connection to one of the given endpoints.
- //
- connection = factory.create(endpoints, false, getEndpointSelection(), out compress);
- }
- else
- {
- //
- // Go through the list of endpoints and try to create the
- // connection until it succeeds. This is different from just
- // calling create() with the given endpoints since this might
- // create a new connection even if there's an existing
- // connection for one of the endpoints.
- //
-
- Ice.LocalException exception = null;
- EndpointI[] endpoint = new EndpointI[1];
- for(int i = 0; i < endpoints.Length; ++i)
- {
- try
- {
- endpoint[0] = endpoints[i];
- bool more = i != endpoints.Length - 1;
- connection = factory.create(endpoint, more, getEndpointSelection(), out compress);
- break;
- }
- catch(Ice.LocalException ex)
- {
- exception = ex;
- }
- }
-
- if(connection == null)
- {
- Debug.Assert(exception != null);
- throw exception;
- }
- }
-
- Debug.Assert(connection != null);
-
- //
- // If we have a router, set the object adapter for this router
- // (if any) to the new connection, so that callbacks from the
- // router can be received over this new connection.
- //
- if(_routerInfo != null && _routerInfo.getAdapter() != null)
- {
- connection.setAdapter(_routerInfo.getAdapter());
- }
-
- return connection;
- }
-
private sealed class CreateConnectionCallback : OutgoingConnectionFactory.CreateConnectionCallback
{
internal CreateConnectionCallback(RoutableReference rr, EndpointI[] endpoints, GetConnectionCallback cb)
diff --git a/cs/src/Ice/WSEndpoint.cs b/cs/src/Ice/WSEndpoint.cs
index dbc29a87190..238b32d59d1 100644
--- a/cs/src/Ice/WSEndpoint.cs
+++ b/cs/src/Ice/WSEndpoint.cs
@@ -161,17 +161,6 @@ namespace IceInternal
return null;
}
- public override List<Connector> connectors(Ice.EndpointSelectionType selType)
- {
- List<Connector> connectors = _delegate.connectors(selType);
- List<Connector> l = new List<Connector>();
- foreach(Connector c in connectors)
- {
- l.Add(new WSConnector(_instance, c, _delegate.host(), _delegate.port(), _resource));
- }
- return l;
- }
-
private sealed class EndpointI_connectorsI : EndpointI_connectors
{
public EndpointI_connectorsI(ProtocolInstance instance, string host, int port, string resource,
diff --git a/cs/test/Ice/background/EndpointI.cs b/cs/test/Ice/background/EndpointI.cs
index ddd153b4ea1..0d43551c11f 100644
--- a/cs/test/Ice/background/EndpointI.cs
+++ b/cs/test/Ice/background/EndpointI.cs
@@ -125,17 +125,6 @@ internal class EndpointI : IceInternal.EndpointI
}
}
- public override List<IceInternal.Connector> connectors(Ice.EndpointSelectionType selType)
- {
- _configuration.checkConnectorsException();
- List<IceInternal.Connector> connectors = new List<IceInternal.Connector>();
- foreach(IceInternal.Connector connector in _endpoint.connectors(selType))
- {
- connectors.Add(new Connector(connector));
- }
- return connectors;
- }
-
private class ConnectorsCallback : IceInternal.EndpointI_connectors
{
internal ConnectorsCallback(IceInternal.EndpointI_connectors cb)
diff --git a/java/src/Ice/src/main/java/IceInternal/EndpointHostResolver.java b/java/src/Ice/src/main/java/IceInternal/EndpointHostResolver.java
index e0ea6773d1b..e4bf256ea2d 100644
--- a/java/src/Ice/src/main/java/IceInternal/EndpointHostResolver.java
+++ b/java/src/Ice/src/main/java/IceInternal/EndpointHostResolver.java
@@ -31,67 +31,6 @@ class EndpointHostResolver
}
}
- java.util.List<Connector> resolve(String host, int port, Ice.EndpointSelectionType selType, IPEndpointI endpoint)
- {
- //
- // Try to get the addresses without DNS lookup. If this doesn't
- // work, we retry with DNS lookup (and observer).
- //
- NetworkProxy networkProxy = _instance.networkProxy();
- if(networkProxy == null)
- {
- java.util.List<java.net.InetSocketAddress> addrs = Network.getAddresses(host, port, _protocol, selType,
- _preferIPv6, false);
- if(addrs != null)
- {
- return endpoint.connectors(addrs, networkProxy);
- }
- }
-
- Ice.Instrumentation.CommunicatorObserver obsv = _instance.initializationData().observer;
- Ice.Instrumentation.Observer observer = null;
- if(obsv != null)
- {
- observer = obsv.getEndpointLookupObserver(endpoint);
- if(observer != null)
- {
- observer.attach();
- }
- }
-
- java.util.List<Connector> connectors = null;
- try
- {
- int protocol = _protocol;
- if(networkProxy != null)
- {
- networkProxy = networkProxy.resolveHost(_protocol);
- if(networkProxy != null)
- {
- protocol = networkProxy.getProtocolSupport();
- }
- }
- connectors = endpoint.connectors(Network.getAddresses(host, port, protocol, selType, _preferIPv6, true),
- networkProxy);
- }
- catch(Ice.LocalException ex)
- {
- if(observer != null)
- {
- observer.failed(ex.ice_name());
- }
- throw ex;
- }
- finally
- {
- if(observer != null)
- {
- observer.detach();
- }
- }
- return connectors;
- }
-
synchronized void resolve(final String host, final int port, final Ice.EndpointSelectionType selType,
final IPEndpointI endpoint, final EndpointI_connectors callback)
{
diff --git a/java/src/Ice/src/main/java/IceInternal/EndpointI.java b/java/src/Ice/src/main/java/IceInternal/EndpointI.java
index 7e6d487f7f2..51a87fd0cf5 100644
--- a/java/src/Ice/src/main/java/IceInternal/EndpointI.java
+++ b/java/src/Ice/src/main/java/IceInternal/EndpointI.java
@@ -101,7 +101,6 @@ abstract public class EndpointI implements Ice.Endpoint, java.lang.Comparable<En
// Return connectors for this endpoint, or empty list if no connector
// is available.
//
- public abstract java.util.List<Connector> connectors(Ice.EndpointSelectionType selType);
public abstract void connectors_async(Ice.EndpointSelectionType selType, EndpointI_connectors callback);
//
diff --git a/java/src/Ice/src/main/java/IceInternal/FixedReference.java b/java/src/Ice/src/main/java/IceInternal/FixedReference.java
index 6a5d6fc6bc1..cc7bd2dfe4f 100644
--- a/java/src/Ice/src/main/java/IceInternal/FixedReference.java
+++ b/java/src/Ice/src/main/java/IceInternal/FixedReference.java
@@ -215,7 +215,6 @@ public class FixedReference extends Reference
{
try
{
- Ice.Holder<Boolean> compress = new Ice.Holder<Boolean>();
switch(getMode())
{
case Reference.ModeTwoway:
@@ -261,19 +260,20 @@ public class FixedReference extends Reference
_fixedConnection.throwException(); // Throw in case our connection is already destroyed.
+ boolean compress;
if(defaultsAndOverrides.overrideCompress)
{
- compress.value = defaultsAndOverrides.overrideCompressValue;
+ compress = defaultsAndOverrides.overrideCompressValue;
}
else if(_overrideCompress)
{
- compress.value = _compress;
+ compress = _compress;
}
else
{
- compress.value = _fixedConnection.endpoint().compress();
+ compress = _fixedConnection.endpoint().compress();
}
- callback.setConnection(_fixedConnection, compress.value);
+ callback.setConnection(_fixedConnection, compress);
}
catch(Ice.LocalException ex)
{
diff --git a/java/src/Ice/src/main/java/IceInternal/IPEndpointI.java b/java/src/Ice/src/main/java/IceInternal/IPEndpointI.java
index fbea1b8a690..715bb8a9748 100644
--- a/java/src/Ice/src/main/java/IceInternal/IPEndpointI.java
+++ b/java/src/Ice/src/main/java/IceInternal/IPEndpointI.java
@@ -109,12 +109,6 @@ public abstract class IPEndpointI extends EndpointI
}
@Override
- public java.util.List<Connector> connectors(Ice.EndpointSelectionType selType)
- {
- return _instance.resolve(_host, _port, selType, this);
- }
-
- @Override
public void connectors_async(Ice.EndpointSelectionType selType, EndpointI_connectors callback)
{
_instance.resolve(_host, _port, selType, this, callback);
diff --git a/java/src/Ice/src/main/java/IceInternal/OpaqueEndpointI.java b/java/src/Ice/src/main/java/IceInternal/OpaqueEndpointI.java
index 3a3ab472863..1fc84cf1715 100644
--- a/java/src/Ice/src/main/java/IceInternal/OpaqueEndpointI.java
+++ b/java/src/Ice/src/main/java/IceInternal/OpaqueEndpointI.java
@@ -188,12 +188,6 @@ final class OpaqueEndpointI extends EndpointI
// is available.
//
@Override
- public java.util.List<Connector> connectors(Ice.EndpointSelectionType selType)
- {
- return new java.util.ArrayList<Connector>();
- }
-
- @Override
public void connectors_async(Ice.EndpointSelectionType selType, EndpointI_connectors callback)
{
callback.connectors(new java.util.ArrayList<Connector>());
diff --git a/java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java b/java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java
index 9e217d9df4a..ba3bbbdf0e5 100644
--- a/java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java
+++ b/java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java
@@ -92,11 +92,6 @@ public class ProtocolInstance
return _instance.messageSizeMax();
}
- public java.util.List<Connector> resolve(String host, int port, Ice.EndpointSelectionType type, IPEndpointI endpt)
- {
- return _instance.endpointHostResolver().resolve(host, port, type, endpt);
- }
-
public void resolve(String host, int port, Ice.EndpointSelectionType type, IPEndpointI endpt,
EndpointI_connectors callback)
{
diff --git a/java/src/Ice/src/main/java/IceInternal/WSEndpoint.java b/java/src/Ice/src/main/java/IceInternal/WSEndpoint.java
index f8f248beb00..31111f85752 100644
--- a/java/src/Ice/src/main/java/IceInternal/WSEndpoint.java
+++ b/java/src/Ice/src/main/java/IceInternal/WSEndpoint.java
@@ -163,18 +163,6 @@ final class WSEndpoint extends IceInternal.EndpointI
}
@Override
- public java.util.List<Connector> connectors(Ice.EndpointSelectionType selType)
- {
- java.util.List<Connector> connectors = _delegate.connectors(selType);
- java.util.List<Connector> l = new java.util.ArrayList<Connector>();
- for(Connector c : connectors)
- {
- l.add(new WSConnector(_instance, c, _delegate.host(), _delegate.port(), _resource));
- }
- return l;
- }
-
- @Override
public void connectors_async(Ice.EndpointSelectionType selType, final EndpointI_connectors callback)
{
EndpointI_connectors cb = new EndpointI_connectors()
diff --git a/java/test/src/main/java/test/Ice/background/EndpointI.java b/java/test/src/main/java/test/Ice/background/EndpointI.java
index bed906911d6..847a48fb8d0 100644
--- a/java/test/src/main/java/test/Ice/background/EndpointI.java
+++ b/java/test/src/main/java/test/Ice/background/EndpointI.java
@@ -153,19 +153,6 @@ final class EndpointI extends IceInternal.EndpointI
}
@Override
- public java.util.List<IceInternal.Connector>
- connectors(Ice.EndpointSelectionType selType)
- {
- _configuration.checkConnectorsException();
- java.util.List<IceInternal.Connector> connectors = new java.util.ArrayList<IceInternal.Connector>();
- for(IceInternal.Connector p : _endpoint.connectors(selType))
- {
- connectors.add(new Connector(_configuration, p));
- }
- return connectors;
- }
-
- @Override
public void
connectors_async(Ice.EndpointSelectionType selType, final IceInternal.EndpointI_connectors cb)
{