summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/TcpTransceiver.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/TcpTransceiver.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/TcpTransceiver.java')
-rw-r--r--java/src/IceInternal/TcpTransceiver.java113
1 files changed, 0 insertions, 113 deletions
diff --git a/java/src/IceInternal/TcpTransceiver.java b/java/src/IceInternal/TcpTransceiver.java
deleted file mode 100644
index 5e8d33fb672..00000000000
--- a/java/src/IceInternal/TcpTransceiver.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 TcpTransceiver implements Transceiver
-{
- @Override
- public java.nio.channels.SelectableChannel fd()
- {
- assert(_stream != null);
- return _stream.fd();
- }
-
- @Override
- public int initialize(Buffer readBuffer, Buffer writeBuffer, Ice.Holder<Boolean> moreData)
- {
- return _stream.connect(readBuffer, writeBuffer);
- }
-
- @Override
- public int closing(boolean initiator, Ice.LocalException ex)
- {
- // If we are initiating the connection closure, wait for the peer
- // to close the TCP/IP connection. Otherwise, close immediately.
- return initiator ? SocketOperation.Read : SocketOperation.None;
- }
-
- @Override
- public void close()
- {
- _stream.close();
- }
-
- @Override
- public EndpointI bind()
- {
- assert(false);
- return null;
- }
-
- @Override
- public int write(Buffer buf)
- {
- return _stream.write(buf);
- }
-
- @Override
- public int read(Buffer buf, Ice.Holder<Boolean> moreData)
- {
- return _stream.read(buf);
- }
-
- @Override
- public String protocol()
- {
- return _instance.protocol();
- }
-
- @Override
- public String toString()
- {
- return _stream.toString();
- }
-
- @Override
- public String toDetailedString()
- {
- return toString();
- }
-
- @Override
- public Ice.ConnectionInfo getInfo()
- {
- Ice.TCPConnectionInfo info = new Ice.TCPConnectionInfo();
- if(_stream.fd() != null)
- {
- java.net.Socket socket = _stream.fd().socket();
- info.localAddress = socket.getLocalAddress().getHostAddress();
- info.localPort = socket.getLocalPort();
- if(socket.getInetAddress() != null)
- {
- info.remoteAddress = socket.getInetAddress().getHostAddress();
- info.remotePort = socket.getPort();
- }
- }
- return info;
- }
-
- @Override
- public void checkSendSize(Buffer buf, int messageSizeMax)
- {
- if(buf.size() > messageSizeMax)
- {
- Ex.throwMemoryLimitException(buf.size(), messageSizeMax);
- }
- }
-
- TcpTransceiver(ProtocolInstance instance, StreamSocket stream)
- {
- _instance = instance;
- _stream = stream;
- }
-
- final private ProtocolInstance _instance;
- final private StreamSocket _stream;
-}