summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2001-11-30 23:48:46 +0000
committerMark Spruiell <mes@zeroc.com>2001-11-30 23:48:46 +0000
commit4e9792008e61afe50c5d8daf834e5e8bcfd68248 (patch)
treedf68c05265997df95caa7394bef84f8c3b85cd01 /java/src
parentinitial proxy implementation (diff)
downloadice-4e9792008e61afe50c5d8daf834e5e8bcfd68248.tar.bz2
ice-4e9792008e61afe50c5d8daf834e5e8bcfd68248.tar.xz
ice-4e9792008e61afe50c5d8daf834e5e8bcfd68248.zip
fixing compiler errors
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Ice/Application.java6
-rw-r--r--java/src/Ice/CommunicatorI.java2
-rw-r--r--java/src/Ice/LoggerI.java6
-rw-r--r--java/src/Ice/Object.java5
-rw-r--r--java/src/Ice/PropertiesI.java23
-rw-r--r--java/src/Ice/Util.java2
-rw-r--r--java/src/IceInternal/BasicStream.java18
-rw-r--r--java/src/IceInternal/BufferManager.java4
-rw-r--r--java/src/IceInternal/Collector.java13
-rw-r--r--java/src/IceInternal/CollectorFactory.java17
-rw-r--r--java/src/IceInternal/DispatchStatus.java26
-rw-r--r--java/src/IceInternal/Emitter.java26
-rw-r--r--java/src/IceInternal/EmitterFactory.java2
-rw-r--r--java/src/IceInternal/Incoming.java2
-rw-r--r--java/src/IceInternal/Network.java7
-rw-r--r--java/src/IceInternal/ObjectFactoryManager.java2
-rw-r--r--java/src/IceInternal/Outgoing.java2
-rw-r--r--java/src/IceInternal/ProxyFactory.java4
-rw-r--r--java/src/IceInternal/Reference.java10
-rw-r--r--java/src/IceInternal/TcpEndpoint.java10
-rw-r--r--java/src/IceInternal/TcpTransceiver.java2
-rw-r--r--java/src/IceInternal/ThreadPool.java5
-rw-r--r--java/src/IceInternal/TraceUtil.java73
-rw-r--r--java/src/IceInternal/Transceiver.java4
-rw-r--r--java/src/IceInternal/UdpEndpoint.java13
-rw-r--r--java/src/IceInternal/UserExceptionFactoryManager.java2
26 files changed, 168 insertions, 118 deletions
diff --git a/java/src/Ice/Application.java b/java/src/Ice/Application.java
index a4f7cf93624..4056e372186 100644
--- a/java/src/Ice/Application.java
+++ b/java/src/Ice/Application.java
@@ -10,7 +10,7 @@
package Ice;
-public class Application
+public abstract class Application
{
public
Application()
@@ -28,7 +28,7 @@ public class Application
public final int
main(String appName, String[] args)
{
- main(args, null);
+ return main(appName, args, null);
}
public final int
@@ -36,7 +36,7 @@ public class Application
{
if (_communicator != null)
{
- System.err.println(appName + ": only one instance of the "
+ System.err.println(appName + ": only one instance of the " +
"Application class can be used");
return 1;
}
diff --git a/java/src/Ice/CommunicatorI.java b/java/src/Ice/CommunicatorI.java
index fb1c420b260..b30e5a38463 100644
--- a/java/src/Ice/CommunicatorI.java
+++ b/java/src/Ice/CommunicatorI.java
@@ -188,7 +188,7 @@ class CommunicatorI implements Communicator
}
*/
- CommunicatorI(Properties propertites)
+ CommunicatorI(Properties properties)
{
_instance = new IceInternal.Instance(this, properties);
_threadPool = _instance.threadPool();
diff --git a/java/src/Ice/LoggerI.java b/java/src/Ice/LoggerI.java
index cea212cc45b..88e2caf325c 100644
--- a/java/src/Ice/LoggerI.java
+++ b/java/src/Ice/LoggerI.java
@@ -19,13 +19,13 @@ public class LoggerI implements Logger
// TODO: Better way to do this?
int start = 0;
int next;
- while((next = msg.indexOf('\n', start)) != -1)
+ while((next = message.indexOf('\n', start)) != -1)
{
- s += msg.substring(start, next + 1);
+ s += message.substring(start, next + 1);
s += " ";
start = next + 1;
}
- s += msg.substring(start);
+ s += message.substring(start);
s += " ]";
System.err.println(s);
}
diff --git a/java/src/Ice/Object.java b/java/src/Ice/Object.java
index 963e8841114..6df0fabe8f0 100644
--- a/java/src/Ice/Object.java
+++ b/java/src/Ice/Object.java
@@ -126,11 +126,12 @@ public abstract class Object
_activeFacetMap.clear();
+ Ice.ObjectHolder h = new Ice.ObjectHolder();
while (sz-- > 0)
{
String key = __is.readString();
- Object value = __is.readObject("");
- _activeFacetMap.put(key, value);
+ __is.readObject("", h);
+ _activeFacetMap.put(key, h.value);
}
}
}
diff --git a/java/src/Ice/PropertiesI.java b/java/src/Ice/PropertiesI.java
index 8a506ef4171..cdd9ed14c24 100644
--- a/java/src/Ice/PropertiesI.java
+++ b/java/src/Ice/PropertiesI.java
@@ -113,24 +113,33 @@ class PropertiesI implements Properties
try
{
java.io.FileReader fr = new java.io.FileReader(file);
- java.io.BufferedReader br = new java.io.BufferedReader(br);
+ java.io.BufferedReader br = new java.io.BufferedReader(fr);
parse(br);
}
catch (java.io.IOException ex)
{
- SystemException ex = new SystemException();
- ex.initCause(ex); // Exception chaining
- throw ex;
+ SystemException se = new SystemException();
+ se.initCause(ex); // Exception chaining
+ throw se;
}
}
private void
parse(java.io.BufferedReader in)
{
- String line;
- while ((line = in.readLine()) != null)
+ try
+ {
+ String line;
+ while ((line = in.readLine()) != null)
+ {
+ parseLine(line);
+ }
+ }
+ catch (java.io.IOException ex)
{
- parseLine(line);
+ SystemException se = new SystemException();
+ se.initCause(ex); // Exception chaining
+ throw se;
}
}
diff --git a/java/src/Ice/Util.java b/java/src/Ice/Util.java
index 25e6c489fb2..d9e8abfe5fa 100644
--- a/java/src/Ice/Util.java
+++ b/java/src/Ice/Util.java
@@ -46,5 +46,5 @@ public final class Util
return new CommunicatorI(properties);
}
- private static _defaultProperties = null;
+ private static Properties _defaultProperties = null;
}
diff --git a/java/src/IceInternal/BasicStream.java b/java/src/IceInternal/BasicStream.java
index 4260bc33310..279adfda858 100644
--- a/java/src/IceInternal/BasicStream.java
+++ b/java/src/IceInternal/BasicStream.java
@@ -73,10 +73,11 @@ public class BasicStream
private static final int MAX = 1024 * 1024; // TODO: Configurable
- /*
public void
resize(int total)
{
+ // TODO
+ /*
if (total > MAX)
{
throw new Ice.MemoryLimitException();
@@ -86,8 +87,8 @@ public class BasicStream
// TODO - Get new buffer
}
_buf.limit(total);
+ */
}
- */
/* TODO - Remove?
public void
@@ -512,7 +513,7 @@ public class BasicStream
Integer pos = null;
if (enc.stringsWritten != null) // Lazy creation
{
- pos = enc.stringsWritten.get(v);
+ pos = (Integer)enc.stringsWritten.get(v);
}
if (pos != null)
{
@@ -594,6 +595,11 @@ public class BasicStream
enc.stringsRead.add(v);
return v;
}
+ catch (java.io.UnsupportedEncodingException ex)
+ {
+ assert(false);
+ return "";
+ }
catch (java.nio.BufferUnderflowException ex)
{
throw new Ice.UnmarshalOutOfBoundsException();
@@ -613,6 +619,7 @@ public class BasicStream
{
v[i] = readString();
}
+ return v;
}
public void
@@ -622,7 +629,7 @@ public class BasicStream
Integer pos = null;
if (enc.wstringsWritten != null) // Lazy creation
{
- pos = enc.wstringsWritten.get(v);
+ pos = (Integer)enc.wstringsWritten.get(v);
}
if (pos != null)
{
@@ -716,6 +723,7 @@ public class BasicStream
{
v[i] = readWString();
}
+ return v;
}
public void
@@ -737,7 +745,7 @@ public class BasicStream
Integer pos = null;
if (enc.objectsWritten != null) // Lazy creation
{
- pos = enc.objectsWritten.get(v);
+ pos = (Integer)enc.objectsWritten.get(v);
}
if (pos != null)
{
diff --git a/java/src/IceInternal/BufferManager.java b/java/src/IceInternal/BufferManager.java
index 5b5539881d3..b872f673031 100644
--- a/java/src/IceInternal/BufferManager.java
+++ b/java/src/IceInternal/BufferManager.java
@@ -61,7 +61,7 @@ final class BufferManager
_nodeCache = _nodeCache.next;
}
node.buf = buf;
- node.size = buf.capacity();
+ node.capacity = buf.capacity();
node.next = _head;
_head = node;
}
@@ -73,7 +73,7 @@ final class BufferManager
BufferNode prev = null;
while (node != null)
{
- if (size <= node.size)
+ if (size <= node.capacity)
{
break;
}
diff --git a/java/src/IceInternal/Collector.java b/java/src/IceInternal/Collector.java
index bb155f1a3ff..1bd30cae572 100644
--- a/java/src/IceInternal/Collector.java
+++ b/java/src/IceInternal/Collector.java
@@ -86,12 +86,14 @@ public class Collector extends EventHandler
public void
read(BasicStream is)
{
- _transceiver.read(is, 0);
+ // TODO - implement
+ //_transceiver.read(is, 0);
}
public void
message(BasicStream stream)
{
+ /* TODO
Incoming in = new Incoming(_instance, _adapter);
BasicStream os = in.os();
boolean invoke = false;
@@ -302,6 +304,7 @@ public class Collector extends EventHandler
_mutex.unlock();
}
}
+ */
}
public void
@@ -315,7 +318,7 @@ public class Collector extends EventHandler
return;
}
- if (ex instanceof ConnectionLostException)
+ if (ex instanceof Ice.ConnectionLostException)
{
warning(ex);
}
@@ -512,8 +515,9 @@ public class Collector extends EventHandler
}
private void
- closeConection()
+ closeConnection()
{
+ /*
BasicStream os = new BasicStream(_instance);
os.writeByte(Protocol.protocolVersion);
os.writeByte(Protocol.encodingVersion);
@@ -524,6 +528,7 @@ public class Collector extends EventHandler
_traceLevels);
_transceiver.write(os, _endpoint.timeout());
_transceiver.shutdown();
+ */
}
private void
@@ -544,7 +549,7 @@ public class Collector extends EventHandler
private TraceLevels _traceLevels;
private Ice.Logger _logger;
private ThreadPool _threadPool;
- private _responseCount;
+ private int _responseCount;
private int _state;
private boolean _warnAboutExceptions;
private RecursiveMutex _mutex = new RecursiveMutex();
diff --git a/java/src/IceInternal/CollectorFactory.java b/java/src/IceInternal/CollectorFactory.java
index 1c47ba40848..4027390225d 100644
--- a/java/src/IceInternal/CollectorFactory.java
+++ b/java/src/IceInternal/CollectorFactory.java
@@ -97,25 +97,25 @@ public class CollectorFactory extends EventHandler
//
try
{
- Transceive transceiver = _acceptor.accept(0);
+ Transceiver transceiver = _acceptor.accept(0);
Collector collector = new Collector(_instance, _adapter,
transceiver, _endpoint);
collector.activate();
_collectors.add(collector);
}
- catch (SecurityException ex)
+ catch (java.lang.SecurityException ex)
{
// Ignore, nothing we can do here
}
- catch (SocketException ex)
+ catch (Ice.SocketException ex)
{
// Ignore, nothing we can do here
}
- catch (TimeoutException ex)
+ catch (Ice.TimeoutException ex)
{
// Ignore timeouts
}
- catch (LocalException ex)
+ catch (Ice.LocalException ex)
{
warning(ex);
setState(StateClosed);
@@ -181,17 +181,20 @@ public class CollectorFactory extends EventHandler
try
{
- _transceiver = _endpoint.serverTransceiver(_instance, _endpoint);
+ EndpointHolder endpointH = new EndpointHolder();
+ _transceiver = _endpoint.serverTransceiver(_instance, endpointH);
if (_transceiver != null)
{
+ _endpoint = endpointH.value;
Collector collector = new Collector(_instance, _adapter,
_transceiver, _endpoint);
_collectors.add(collector);
}
else
{
- _acceptor = _endpoint.acceptor(_instance, _endpoint);
+ _acceptor = _endpoint.acceptor(_instance, endpointH);
assert(_acceptor != null);
+ _endpoint = endpointH.value;
_acceptor.listen();
_threadPool = instance.threadPool();
}
diff --git a/java/src/IceInternal/DispatchStatus.java b/java/src/IceInternal/DispatchStatus.java
index 3e65b6205cc..a7324e5d719 100644
--- a/java/src/IceInternal/DispatchStatus.java
+++ b/java/src/IceInternal/DispatchStatus.java
@@ -12,40 +12,40 @@ package IceInternal;
public final class DispatchStatus
{
- public static final long _DispatchOK = 0;
+ public static final int _DispatchOK = 0;
public static final DispatchStatus DispatchOK = new DispatchStatus(_DispatchOK);
- public static final long _DispatchUserException = 1;
+ public static final int _DispatchUserException = 1;
public static final DispatchStatus DispatchUserException = new DispatchStatus(_DispatchUserException);
- public static final long _DispatchLocationForward = 2;
+ public static final int _DispatchLocationForward = 2;
public static final DispatchStatus DispatchLocationForward = new DispatchStatus(_DispatchLocationForward);
- public static final long _DispatchObjectNotExist = 3;
+ public static final int _DispatchObjectNotExist = 3;
public static final DispatchStatus DispatchObjectNotExist = new DispatchStatus(_DispatchObjectNotExist);
- public static final long _DispatchFacetNotExist = 4;
+ public static final int _DispatchFacetNotExist = 4;
public static final DispatchStatus DispatchFacetNotExist = new DispatchStatus(_DispatchFacetNotExist);
- public static final long _DispatchOperationNotExist = 5;
+ public static final int _DispatchOperationNotExist = 5;
public static final DispatchStatus DispatchOperationNotExist = new DispatchStatus(_DispatchOperationNotExist);
- public static final long _DispatchUnknownLocalException = 6;
+ public static final int _DispatchUnknownLocalException = 6;
public static final DispatchStatus DispatchUnknownLocalException = new DispatchStatus(_DispatchUnknownLocalException);
- public static final long _DispatchUnknownUserException = 7;
+ public static final int _DispatchUnknownUserException = 7;
public static final DispatchStatus DispatchUnknownUserException = new DispatchStatus(_DispatchUnknownUserException);
- public static final long _DispatchUnknownException = 8;
+ public static final int _DispatchUnknownException = 8;
public static final DispatchStatus DispatchUnknownException = new DispatchStatus(_DispatchUnknownException);
public static DispatchStatus
- convert(long val)
+ convert(int val)
{
assert val < 9;
return __values[val];
}
- public long
+ public int
value()
{
return __value;
}
private
- DispatchStatus(long val)
+ DispatchStatus(int val)
{
__value = val;
__values[val] = this;
@@ -53,5 +53,5 @@ public final class DispatchStatus
private static DispatchStatus[] __values = new DispatchStatus[9];
- private long __value;
+ private int __value;
}
diff --git a/java/src/IceInternal/Emitter.java b/java/src/IceInternal/Emitter.java
index a83c57a7daf..ee18ac721f4 100644
--- a/java/src/IceInternal/Emitter.java
+++ b/java/src/IceInternal/Emitter.java
@@ -86,7 +86,7 @@ public final class Emitter extends EventHandler
}
TraceUtil.traceRequest("sending request", os, _logger,
_traceLevels);
- _transceiver.write(os, _endpoint.timeout());
+ _transceiver.write(os.prepareWrite(), _endpoint.timeout());
}
catch (Ice.LocalException ex)
{
@@ -112,11 +112,11 @@ public final class Emitter extends EventHandler
public void
prepareBatchRequest(Outgoing out)
{
- lock();
+ _mutex.lock();
if (_exception != null)
{
- unlock();
+ _mutex.unlock();
throw _exception;
}
assert(_state == StateActive);
@@ -148,13 +148,13 @@ public final class Emitter extends EventHandler
{
if (_exception != null)
{
- unlock();
+ _mutex.unlock();
throw _exception;
}
assert(_state == StateActive);
_batchStream.swap(out.os()); // Get the batch stream back
- unlock(); // Give the Emitter back
+ _mutex.unlock(); // Give the Emitter back
_batchStream.endWriteEncaps();
}
@@ -162,8 +162,8 @@ public final class Emitter extends EventHandler
public void
abortBatchRequest()
{
- state(StateClosed, new Ice.AbortBatchRequestException());
- unlock();
+ setState(StateClosed, new Ice.AbortBatchRequestException());
+ _mutex.unlock();
}
public void
@@ -180,7 +180,7 @@ public final class Emitter extends EventHandler
try
{
- if (_batch.size() == 0)
+ if (_batchStream.size() == 0)
{
return; // Nothing to send
}
@@ -194,7 +194,8 @@ public final class Emitter extends EventHandler
TraceUtil.traceBatchRequest("sending batch request",
_batchStream, _logger,
_traceLevels);
- _transceiver.write(_batchStream, _endpoint.timeout());
+ _transceiver.write(_batchStream.prepareWrite(),
+ _endpoint.timeout());
//
// Reset _batchStream so that new batch messages can be sent.
@@ -235,9 +236,10 @@ public final class Emitter extends EventHandler
}
public void
- read(BasicStream is)
+ read(BasicStream stream)
{
- _transceiver.read(stream, 0);
+ // TODO - implement
+ //_transceiver.read(stream, 0);
}
public void
@@ -369,7 +371,7 @@ public final class Emitter extends EventHandler
}
finally
{
- unlock();
+ _mutex.unlock();
}
}
diff --git a/java/src/IceInternal/EmitterFactory.java b/java/src/IceInternal/EmitterFactory.java
index eb445502ba6..374694c87af 100644
--- a/java/src/IceInternal/EmitterFactory.java
+++ b/java/src/IceInternal/EmitterFactory.java
@@ -63,7 +63,7 @@ public final class EmitterFactory
{
Connector connector = endpoints[i].connector(_instance);
assert(connector != null);
- transceiver = connector.connect(endpoints[i].timeout);
+ transceiver = connector.connect(endpoints[i].timeout());
assert(transceiver != null);
}
emitter = new Emitter(_instance, transceiver, endpoints[i]);
diff --git a/java/src/IceInternal/Incoming.java b/java/src/IceInternal/Incoming.java
index 9a9979879f4..89759f96029 100644
--- a/java/src/IceInternal/Incoming.java
+++ b/java/src/IceInternal/Incoming.java
@@ -12,6 +12,7 @@ package IceInternal;
public final class Incoming
{
+ /*
public
Incoming(Instance instance, Ice.ObjectAdapter adapter)
{
@@ -175,4 +176,5 @@ public final class Incoming
private BasicStream _is;
private BasicStream _os;
+ */
}
diff --git a/java/src/IceInternal/Network.java b/java/src/IceInternal/Network.java
index 60f4b4d73a0..f586bb730d6 100644
--- a/java/src/IceInternal/Network.java
+++ b/java/src/IceInternal/Network.java
@@ -19,8 +19,9 @@ public final class Network
{
java.nio.channels.SocketChannel fd =
java.nio.channels.SocketChannel.open();
- fd.setTcpNoDelay(true);
- fd.setKeepAlive(true);
+ java.net.Socket socket = fd.socket();
+ socket.setTcpNoDelay(true);
+ socket.setKeepAlive(true);
fd.configureBlocking(false);
return fd;
}
@@ -233,7 +234,7 @@ public final class Network
s.append(localPort);
if (remoteAddr == null)
{
- s.append("\nremote address = "<not connected>");
+ s.append("\nremote address = <not connected>");
}
else
{
diff --git a/java/src/IceInternal/ObjectFactoryManager.java b/java/src/IceInternal/ObjectFactoryManager.java
index 9621d48f333..b107c3ff442 100644
--- a/java/src/IceInternal/ObjectFactoryManager.java
+++ b/java/src/IceInternal/ObjectFactoryManager.java
@@ -10,7 +10,7 @@
package IceInternal;
-final class ObjectFactoryManager
+public final class ObjectFactoryManager
{
public synchronized void
add(Ice.ObjectFactory factory, String id)
diff --git a/java/src/IceInternal/Outgoing.java b/java/src/IceInternal/Outgoing.java
index 1365a466ee4..128743fa8b9 100644
--- a/java/src/IceInternal/Outgoing.java
+++ b/java/src/IceInternal/Outgoing.java
@@ -59,7 +59,7 @@ public final class Outgoing
public boolean
invoke()
- throws NonRepeatable
+ throws Ice.LocationForward, NonRepeatable
{
switch (_reference.mode)
{
diff --git a/java/src/IceInternal/ProxyFactory.java b/java/src/IceInternal/ProxyFactory.java
index 3912b657715..aff694b485b 100644
--- a/java/src/IceInternal/ProxyFactory.java
+++ b/java/src/IceInternal/ProxyFactory.java
@@ -10,7 +10,7 @@
package IceInternal;
-final class ProxyFactory
+public final class ProxyFactory
{
public Ice.ObjectPrx
stringToProxy(String s)
@@ -44,7 +44,7 @@ final class ProxyFactory
public Ice.ObjectPrx
referenceToProxy(Reference reference)
{
- Ice.ObjectPrx proxy = new Ice.ProxyForObject();
+ Ice.ObjectPrx proxy = new Ice.ObjectPrx();
proxy.setup(reference);
return proxy;
}
diff --git a/java/src/IceInternal/Reference.java b/java/src/IceInternal/Reference.java
index 74b0f0a0598..1a7b8681a79 100644
--- a/java/src/IceInternal/Reference.java
+++ b/java/src/IceInternal/Reference.java
@@ -494,7 +494,7 @@ public final class Reference
}
else
{
- return new Reference(instance, identity, facet, mode, newSecure,
+ return new Reference(instance, identity, facet, mode, secure,
origEndpoints, newEndpoints);
}
}
@@ -504,13 +504,13 @@ public final class Reference
{
int h = 0;
- int sz = identity.size();
+ int sz = identity.length();
for (int i = 0; i < sz; i++)
{
h = 5 * h + (int)identity.charAt(i);
}
- sz = facet.size();
+ sz = facet.length();
for (int i = 0; i < sz; i++)
{
h = 5 * h + (int)facet.charAt(i);
@@ -538,10 +538,10 @@ public final class Reference
if (_checkEndpointsEqual)
{
_endpointsEqual = compare(origEndpoints, endpoints);
- _checkEndpointEqual = false;
+ _checkEndpointsEqual = false;
}
- return _endpointEqual;
+ return _endpointsEqual;
}
private boolean
diff --git a/java/src/IceInternal/TcpEndpoint.java b/java/src/IceInternal/TcpEndpoint.java
index dd74fccfa15..7e67a2f915d 100644
--- a/java/src/IceInternal/TcpEndpoint.java
+++ b/java/src/IceInternal/TcpEndpoint.java
@@ -27,7 +27,7 @@ public final class TcpEndpoint extends Endpoint
_port = 0;
_timeout = -1;
- String[] arr = init.split("[ \t\n\r]+");
+ String[] arr = str.split("[ \t\n\r]+");
int i = 0;
while (i < arr.length)
@@ -53,7 +53,7 @@ public final class TcpEndpoint extends Endpoint
throw new Ice.EndpointParseException();
}
- host = argument;
+ _host = argument;
break;
}
@@ -265,9 +265,12 @@ public final class TcpEndpoint extends Endpoint
public Acceptor
acceptor(Instance instance, EndpointHolder endpoint)
{
+ /* TODO - implement
TcpAcceptor p = new TcpAcceptor(instance, _port);
endpoint.value = new TcpEndpoint(_host, p.effectivePort(), _timeout);
return p;
+ */
+ return null;
}
//
@@ -283,6 +286,7 @@ public final class TcpEndpoint extends Endpoint
public boolean
equivalent(Acceptor acceptor)
{
+ /* TODO - implement
TcpAcceptor tcpAcceptor = null;
try
{
@@ -293,6 +297,8 @@ public final class TcpEndpoint extends Endpoint
return false;
}
return tcpAcceptor.equivalent(_host, _port);
+ */
+ return false;
}
//
diff --git a/java/src/IceInternal/TcpTransceiver.java b/java/src/IceInternal/TcpTransceiver.java
index 2c9ca64964a..661ca7babd3 100644
--- a/java/src/IceInternal/TcpTransceiver.java
+++ b/java/src/IceInternal/TcpTransceiver.java
@@ -147,7 +147,7 @@ final class TcpTransceiver implements Transceiver
public String
toString()
{
- return fdToString(_fd);
+ return Network.fdToString(_fd);
}
//
diff --git a/java/src/IceInternal/ThreadPool.java b/java/src/IceInternal/ThreadPool.java
index 447d872b84f..dc0b1a752b2 100644
--- a/java/src/IceInternal/ThreadPool.java
+++ b/java/src/IceInternal/ThreadPool.java
@@ -76,7 +76,7 @@ public final class ThreadPool
{
wait();
}
- catcH (InterruptedException ex)
+ catch (InterruptedException ex)
{
}
}
@@ -136,7 +136,6 @@ public final class ThreadPool
//
// Only for use by Instance
//
- void
ThreadPool(Instance instance)
{
_instance = instance;
@@ -351,7 +350,7 @@ public final class ThreadPool
java.nio.channels.SelectionKey.OP_READ,
info);
}
- catch (java.io.ClosedChannelException ex)
+ catch (java.nio.channels.ClosedChannelException ex)
{
assert(false);
}
diff --git a/java/src/IceInternal/TraceUtil.java b/java/src/IceInternal/TraceUtil.java
index f5353932500..693cfcfce13 100644
--- a/java/src/IceInternal/TraceUtil.java
+++ b/java/src/IceInternal/TraceUtil.java
@@ -68,7 +68,7 @@ final class TraceUtil
s.write(heading);
printHeader(s, stream);
int cnt = 0;
- while (true /* stream.i != stream.b.end() */ )
+ while (stream.pos() != pos)
{
s.write("\nrequest #" + cnt + ':');
cnt++;
@@ -154,41 +154,48 @@ final class TraceUtil
private static void
printHeader(java.io.Writer out, BasicStream stream)
{
- byte protVer = stream.readByte();
- out.write("\nprotocol version = " + (int)protVer);
- byte encVer = stream.readByte();
- out.write("\nencoding version = " + (int)encVer);
- byte type = stream.readByte();
- out.write("\nmessage type = " + (int)type + ' ');
- switch (type)
+ try
{
- case Protocol.requestMsg:
+ byte protVer = stream.readByte();
+ out.write("\nprotocol version = " + (int)protVer);
+ byte encVer = stream.readByte();
+ out.write("\nencoding version = " + (int)encVer);
+ byte type = stream.readByte();
+ out.write("\nmessage type = " + (int)type + ' ');
+ switch (type)
{
- out.write("(request)");
- break;
- }
- case Protocol.requestBatchMsg:
- {
- out.write("(batch request)");
- break;
- }
- case Protocol.replyMsg:
- {
- out.write("(reply)");
- break;
- }
- case Protocol.closeConnectionMsg:
- {
- out.write("(close connection)");
- break;
- }
- default:
- {
- out.write("(unknown)");
- break;
+ case Protocol.requestMsg:
+ {
+ out.write("(request)");
+ break;
+ }
+ case Protocol.requestBatchMsg:
+ {
+ out.write("(batch request)");
+ break;
+ }
+ case Protocol.replyMsg:
+ {
+ out.write("(reply)");
+ break;
+ }
+ case Protocol.closeConnectionMsg:
+ {
+ out.write("(close connection)");
+ break;
+ }
+ default:
+ {
+ out.write("(unknown)");
+ break;
+ }
}
+ int size = stream.readInt();
+ out.write("\nmessage size = " + size);
+ }
+ catch (java.io.IOException ex)
+ {
+ assert(false);
}
- int size = stream.readInt();
- out.write("\nmessage size = " + size);
}
}
diff --git a/java/src/IceInternal/Transceiver.java b/java/src/IceInternal/Transceiver.java
index 9bc591b1fe0..855d1cd06ae 100644
--- a/java/src/IceInternal/Transceiver.java
+++ b/java/src/IceInternal/Transceiver.java
@@ -15,7 +15,7 @@ public interface Transceiver
java.nio.channels.SelectableChannel fd();
void close();
void shutdown();
- void write(Buffer buffer, int timeout);
- void read(Buffer buffer, int timeout);
+ void write(java.nio.ByteBuffer buffer, int timeout);
+ void read(java.nio.ByteBuffer buffer, int timeout);
String toString();
}
diff --git a/java/src/IceInternal/UdpEndpoint.java b/java/src/IceInternal/UdpEndpoint.java
index a471a043953..e9744cbb7dc 100644
--- a/java/src/IceInternal/UdpEndpoint.java
+++ b/java/src/IceInternal/UdpEndpoint.java
@@ -25,7 +25,7 @@ public final class UdpEndpoint extends Endpoint
_host = null;
_port = 0;
- String[] arr = init.split("[ \t\n\r]+");
+ String[] arr = str.split("[ \t\n\r]+");
int i = 0;
while (i < arr.length)
@@ -51,7 +51,7 @@ public final class UdpEndpoint extends Endpoint
throw new Ice.EndpointParseException();
}
- host = argument;
+ _host = argument;
break;
}
@@ -194,7 +194,8 @@ public final class UdpEndpoint extends Endpoint
public Transceiver
clientTransceiver(Instance instance)
{
- return new UdpTransceiver(instance, _host, _port);
+ //return new UdpTransceiver(instance, _host, _port);
+ return null;
}
//
@@ -207,9 +208,12 @@ public final class UdpEndpoint extends Endpoint
public Transceiver
serverTransceiver(Instance instance, EndpointHolder endpoint)
{
+ /*
UdpTransceiver p = new UdpTransceiver(instance, _port);
endpoint.value = new UdpEndpoint(_host, p.effectivePort());
return p;
+ */
+ return null;
}
//
@@ -243,6 +247,7 @@ public final class UdpEndpoint extends Endpoint
public boolean
equivalent(Transceiver transceiver)
{
+ /*
UdpTransceiver udpTransceiver = null;
try
{
@@ -253,6 +258,8 @@ public final class UdpEndpoint extends Endpoint
return false;
}
return udpTransceiver.equivalent(_host, _port);
+ */
+ return false;
}
public boolean
diff --git a/java/src/IceInternal/UserExceptionFactoryManager.java b/java/src/IceInternal/UserExceptionFactoryManager.java
index cec5c8f6dc5..584116262e0 100644
--- a/java/src/IceInternal/UserExceptionFactoryManager.java
+++ b/java/src/IceInternal/UserExceptionFactoryManager.java
@@ -10,7 +10,7 @@
package IceInternal;
-final class UserExceptionFactoryManager
+public final class UserExceptionFactoryManager
{
public synchronized void
add(Ice.UserExceptionFactory factory, String id)