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

Quick Search    Search Deep

Freenet
Class Core  view Core download Core.java

java.lang.Object
  extended byFreenet.Core

public class Core
extends java.lang.Object

This is a Wrapper object that contains the components of a Node in the Adaptive Network. It uses a Network object to communicate with other Nodes in the Network.


Field Summary
static java.lang.String buildNumber
           
static int connectTimeout
           
static boolean debug
           
static java.lang.String freenetVersion
           
static int handshakeLife
           
static int handshakeTimeout
           
 HandshakeHandler hh
           
 boolean listen
           
 Listener listener
           
 MessageHandler mh
           
 ListeningAddress myAddress
           
static Params params
           
static java.lang.String protocolVersion
           
static java.lang.String serverRevision
           
static int timePerHop
           
static Freenet.support.Ticker timer
           
static boolean tunneling
           
 
Constructor Summary
Core(ListeningAddress myAddress, MessageHandler mh, HandshakeHandler hh)
           
 
Method Summary
 void acceptConnections()
           
 ConnectionHandler connect(Address peer)
          This is the raw connection maker, it will not handshake or check the status of the connection in any way.
 ConnectionHandler makeConnection(Address peer)
          Makes a connection from this Node to another
 void sendMessage(Message m, Address destination)
          Send the message using the appropriate protocol
 void sendMessage(Message m, Address destination, Freenet.support.SplitOutputStream datatunnel)
          Send the message using the appropriate protocol streaming the actual data through the SplitOutputStream tunnel
 void sendMessage(Message m, Address destination, Freenet.support.SplitOutputStream datatunnel, Freenet.support.ByteCounter count)
          Send the message using the appropriate protocol, streaming the actual data through the SplitOutputStream tunnel, and counting the bytes sent with ByteCounter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

freenetVersion

public static final java.lang.String freenetVersion
See Also:
Constant Field Values

protocolVersion

public static final java.lang.String protocolVersion
See Also:
Constant Field Values

buildNumber

public static final java.lang.String buildNumber
See Also:
Constant Field Values

serverRevision

public static java.lang.String serverRevision

params

public static Params params

debug

public static boolean debug

timePerHop

public static int timePerHop

connectTimeout

public static int connectTimeout

handshakeTimeout

public static int handshakeTimeout

handshakeLife

public static int handshakeLife

tunneling

public static boolean tunneling

timer

public static Freenet.support.Ticker timer

myAddress

public ListeningAddress myAddress

mh

public MessageHandler mh

hh

public HandshakeHandler hh

listener

public Listener listener

listen

public boolean listen
Constructor Detail

Core

public Core(ListeningAddress myAddress,
            MessageHandler mh,
            HandshakeHandler hh)
Method Detail

acceptConnections

public void acceptConnections()

makeConnection

public ConnectionHandler makeConnection(Address peer)
                                 throws ConnectFailedException
Makes a connection from this Node to another


connect

public ConnectionHandler connect(Address peer)
                          throws ConnectFailedException
This is the raw connection maker, it will not handshake or check the status of the connection in any way.


sendMessage

public void sendMessage(Message m,
                        Address destination)
                 throws SendFailedException
Send the message using the appropriate protocol


sendMessage

public void sendMessage(Message m,
                        Address destination,
                        Freenet.support.SplitOutputStream datatunnel)
                 throws SendFailedException
Send the message using the appropriate protocol streaming the actual data through the SplitOutputStream tunnel


sendMessage

public void sendMessage(Message m,
                        Address destination,
                        Freenet.support.SplitOutputStream datatunnel,
                        Freenet.support.ByteCounter count)
                 throws SendFailedException
Send the message using the appropriate protocol, streaming the actual data through the SplitOutputStream tunnel, and counting the bytes sent with ByteCounter. This opens a connection as well.