Removes Override annotations to fix compilation errors. Replaces tabs with spaces.

This commit is contained in:
lubomir.marinov 2012-08-12 17:40:08 +00:00
parent 2137c337ef
commit f0dcc54a20

View File

@ -9,13 +9,12 @@ package org.ice4j.pseudotcp;
import java.io.*; import java.io.*;
import java.net.*; import java.net.*;
import java.util.HashMap; import java.util.*;
import java.util.Map;
import java.util.logging.*; import java.util.logging.*;
public class PseudoTcpSocketImpl public class PseudoTcpSocketImpl
extends SocketImpl extends SocketImpl
implements IPseudoTcpNotify implements IPseudoTcpNotify
{ {
/** /**
* The logger. * The logger.
@ -137,7 +136,7 @@ implements IPseudoTcpNotify
*/ */
public void setMTU(int mtu) public void setMTU(int mtu)
{ {
this.pseudoTcp.NotifyMTU(mtu); this.pseudoTcp.NotifyMTU(mtu);
} }
/** /**
@ -146,7 +145,7 @@ implements IPseudoTcpNotify
*/ */
public void setDebugName(String debugName) public void setDebugName(String debugName)
{ {
this.pseudoTcp.debugName = debugName; this.pseudoTcp.debugName = debugName;
} }
/** /**
@ -208,10 +207,10 @@ implements IPseudoTcpNotify
public void bind(InetAddress host, int port) public void bind(InetAddress host, int port)
throws IOException throws IOException
{ {
if(socket != null) if(socket != null)
socket.close(); socket.close();
InetSocketAddress newAddr = new InetSocketAddress(host.getHostAddress(),port); InetSocketAddress newAddr = new InetSocketAddress(host.getHostAddress(),port);
this.socket = new DatagramSocket(newAddr); this.socket = new DatagramSocket(newAddr);
} }
/** /**
@ -252,7 +251,7 @@ implements IPseudoTcpNotify
public void Connect(InetSocketAddress remoteAddress, long timeout) public void Connect(InetSocketAddress remoteAddress, long timeout)
throws IOException throws IOException
{ {
logger.fine("Connecting to "+remoteAddress); logger.fine("Connecting to "+remoteAddress);
this.remoteAddr = remoteAddress; this.remoteAddr = remoteAddress;
StartThreads(); StartThreads();
pseudoTcp.Connect(); pseudoTcp.Connect();
@ -295,7 +294,7 @@ implements IPseudoTcpNotify
public void Accept(int timeout) public void Accept(int timeout)
throws IOException throws IOException
{ {
try try
{ {
StartThreads(); StartThreads();
PseudoTcpState state = pseudoTcp.getState(); PseudoTcpState state = pseudoTcp.getState();
@ -331,8 +330,8 @@ implements IPseudoTcpNotify
protected void accept(SocketImpl s) protected void accept(SocketImpl s)
throws IOException throws IOException
{ {
//TODO: not sure how this should work //TODO: not sure how this should work
int timeout = 5000; int timeout = 5000;
Accept(timeout); Accept(timeout);
} }
@ -364,7 +363,6 @@ implements IPseudoTcpNotify
pseudoTcp.NotifyClock(System.currentTimeMillis()); pseudoTcp.NotifyClock(System.currentTimeMillis());
receiveThread = new Thread(new Runnable() receiveThread = new Thread(new Runnable()
{ {
@Override
public void run() public void run()
{ {
ReceivePackets(); ReceivePackets();
@ -372,7 +370,6 @@ implements IPseudoTcpNotify
}, "PseudoTcpReceiveThread"); }, "PseudoTcpReceiveThread");
clockThread = new Thread(new Runnable() clockThread = new Thread(new Runnable()
{ {
@Override
public void run() public void run()
{ {
RunClock(); RunClock();
@ -390,7 +387,6 @@ implements IPseudoTcpNotify
* *
* @param tcp * @param tcp
*/ */
@Override
public void OnTcpOpen(PseudoTCPBase tcp) public void OnTcpOpen(PseudoTCPBase tcp)
{ {
logger.log(Level.FINE, "tcp opened"); logger.log(Level.FINE, "tcp opened");
@ -408,7 +404,6 @@ implements IPseudoTcpNotify
* *
* @param tcp * @param tcp
*/ */
@Override
public void OnTcpReadable(PseudoTCPBase tcp) public void OnTcpReadable(PseudoTCPBase tcp)
{ {
//release all thread blocked at read_notify monitor //release all thread blocked at read_notify monitor
@ -426,7 +421,6 @@ implements IPseudoTcpNotify
* *
* @param tcp * @param tcp
*/ */
@Override
public void OnTcpWriteable(PseudoTCPBase tcp) public void OnTcpWriteable(PseudoTCPBase tcp)
{ {
@ -447,7 +441,6 @@ implements IPseudoTcpNotify
* @param tcp * @param tcp
* @param e * @param e
*/ */
@Override
public void OnTcpClosed(PseudoTCPBase tcp, IOException e) public void OnTcpClosed(PseudoTCPBase tcp, IOException e)
{ {
if (e != null) if (e != null)
@ -507,7 +500,6 @@ implements IPseudoTcpNotify
* @param len * @param len
* @return * @return
*/ */
@Override
public WriteResult TcpWritePacket(PseudoTCPBase tcp, byte[] buffer, int len) public WriteResult TcpWritePacket(PseudoTCPBase tcp, byte[] buffer, int len)
{ {
if (logger.isLoggable(Level.FINEST)) if (logger.isLoggable(Level.FINEST))
@ -516,7 +508,7 @@ implements IPseudoTcpNotify
} }
try try
{ {
//TODO: in case the packet is too long it should return WR_TOO_LARGE //TODO: in case the packet is too long it should return WR_TOO_LARGE
DatagramPacket packet = new DatagramPacket(buffer, len, remoteAddr); DatagramPacket packet = new DatagramPacket(buffer, len, remoteAddr);
socket.send(packet); socket.send(packet);
return WriteResult.WR_SUCCESS; return WriteResult.WR_SUCCESS;