Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Freenet
Class StandardHandshakeHandler  view StandardHandshakeHandler download StandardHandshakeHandler.java

java.lang.Object
  extended byFreenet.StandardHandshakeHandler
All Implemented Interfaces:
HandshakeHandler

public class StandardHandshakeHandler
extends java.lang.Object
implements HandshakeHandler


Nested Class Summary
protected  class StandardHandshakeHandler.HandshakeWaiter
           
private  class StandardHandshakeHandler.Waiter
           
 
Field Summary
private  java.util.Hashtable handshakes
           
private  java.util.Hashtable waiters
           
 
Constructor Summary
StandardHandshakeHandler()
           
 
Method Summary
 boolean getHandshake(Core n, Address addr)
           
 boolean getHandshake(Core n, ConnectionHandler ch)
          Sends a handshake over a given connection.
 void setHandshake(long id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handshakes

private java.util.Hashtable handshakes

waiters

private volatile java.util.Hashtable waiters
Constructor Detail

StandardHandshakeHandler

public StandardHandshakeHandler()
Method Detail

getHandshake

public boolean getHandshake(Core n,
                            ConnectionHandler ch)
Sends a handshake over a given connection. Please note that the handshake will register as belonging to the port which this connection is connected to, if you did not initiate the connection this is probably not the same port the node listens on - and you should use the method that connects itself instead.

Specified by:
getHandshake in interface HandshakeHandler

getHandshake

public boolean getHandshake(Core n,
                            Address addr)
Specified by:
getHandshake in interface HandshakeHandler

setHandshake

public void setHandshake(long id)
Specified by:
setHandshake in interface HandshakeHandler