org.starhope.appius.via
Class Via

java.lang.Object
  extended by org.starhope.appius.via.Via

public class Via
extends Object

Author:
brpocock@star-hope.org

Field Summary
private static ConcurrentHashMap<Class<? extends ViaMunita<?>>,ConcurrentSkipListSet<Map.Entry<String,Vector<Class<?>>>>> classMethodIntrospectionCache
          WRITEME: document this field (brpocock@star-hope.org, Jan 15, 2010) munita (Via)
private static ConcurrentSkipListSet<ViaHost> peers
          WRITEME: document this field (brpocock@star-hope.org, Nov 19, 2009) peers (Via)
private static String RPC_CALL
          WRITEME: document this field (brpocock@star-hope.org, Jan 18, 2010) RPC_CALL (Via)
private static ConcurrentHashMap<String,Socket> socketCache
           
 
Constructor Summary
Via()
           
 
Method Summary
private static void classReady(ViaMunita<?> o)
          WRITEME: document this method (brpocock@star-hope.org, Jan 15, 2010)
private static Object[] conformRPCArgs(ViaMunita<?> remote, String methodName, Object... args)
          WRITEME: document this method (brpocock@star-hope.org, Jan 15, 2010)
static void connect(ViaMunita<?> o)
          WRITEME: document this method (brpocock@star-hope.org, Jan 13, 2010)
private static Object deserialize(String in)
           
static void flush(ViaMunita<?> localHalf)
           
static String getPathFromURL(String url)
          WRITEME: document this method (brpocock@star-hope.org, Jan 11, 2010)
 Set<ViaHost> getPeers()
          WRITEME: document this method (brpocock@star-hope.org, Nov 19, 2009)
static int getPortNumberFromURL(String url)
          WRITEME: document this method (brpocock@star-hope.org, Jan 11, 2010)
static String getServerNameFromURL(String url)
          WRITEME: document this method (brpocock@star-hope.org, Jan 11, 2010)
static void joinPeers()
          WRITEME: document this method (brpocock@star-hope.org, Nov 19, 2009)
static Object rpc(ViaMunita<?> remote, String methodName, Object... args)
           
private static String serialize(Object o)
          WRITEME: document this method (brpocock@star-hope.org, Jan 18, 2010)
private static void setRemote(ViaMunita<?> remote, Method m, SetRemote a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classMethodIntrospectionCache

private static final ConcurrentHashMap<Class<? extends ViaMunita<?>>,ConcurrentSkipListSet<Map.Entry<String,Vector<Class<?>>>>> classMethodIntrospectionCache
WRITEME: document this field (brpocock@star-hope.org, Jan 15, 2010) munita (Via)


peers

private static ConcurrentSkipListSet<ViaHost> peers
WRITEME: document this field (brpocock@star-hope.org, Nov 19, 2009) peers (Via)


RPC_CALL

private static final String RPC_CALL
WRITEME: document this field (brpocock@star-hope.org, Jan 18, 2010) RPC_CALL (Via)

See Also:
Constant Field Values

socketCache

private static final ConcurrentHashMap<String,Socket> socketCache
Constructor Detail

Via

public Via()
Method Detail

classReady

private static void classReady(ViaMunita<?> o)
WRITEME: document this method (brpocock@star-hope.org, Jan 15, 2010)

Parameters:
o - an object of the class to be made ready

conformRPCArgs

private static Object[] conformRPCArgs(ViaMunita<?> remote,
                                       String methodName,
                                       Object... args)
WRITEME: document this method (brpocock@star-hope.org, Jan 15, 2010)

Parameters:
remote - WRITEME
methodName - WRITEME
args - WRITEME
Returns:
WRITEME

connect

public static void connect(ViaMunita<?> o)
                    throws DoNotCrossTheRubicon
WRITEME: document this method (brpocock@star-hope.org, Jan 13, 2010)

Parameters:
o - the local half of the connection to be connected to its remote peer
Throws:
DoNotCrossTheRubicon - WRITEME

deserialize

private static Object deserialize(String in)
                           throws ViaCommunicationsException
Parameters:
in - WRITEME
Returns:
WRITEME
Throws:
ViaCommunicationsException - WRITEME

flush

public static void flush(ViaMunita<?> localHalf)
Parameters:
localHalf - Local half of the connection

getPathFromURL

public static String getPathFromURL(String url)
WRITEME: document this method (brpocock@star-hope.org, Jan 11, 2010)

Parameters:
url - WRITEME
Returns:
WRITEME

getPortNumberFromURL

public static int getPortNumberFromURL(String url)
WRITEME: document this method (brpocock@star-hope.org, Jan 11, 2010)

Parameters:
url - WRITEME
Returns:
WRITEME

getServerNameFromURL

public static String getServerNameFromURL(String url)
WRITEME: document this method (brpocock@star-hope.org, Jan 11, 2010)

Parameters:
url - WRITEME
Returns:
WRITEME

joinPeers

public static void joinPeers()
                      throws NumberFormatException,
                             UnknownHostException,
                             IOException,
                             NotFoundException
WRITEME: document this method (brpocock@star-hope.org, Nov 19, 2009)

Throws:
NumberFormatException - WRITEME
UnknownHostException - WRITEME
IOException - WRITEME
NotFoundException - WRITEME

rpc

public static Object rpc(ViaMunita<?> remote,
                         String methodName,
                         Object... args)
Parameters:
remote - WRITEME
methodName - WRITEME
args - WRITEME
Returns:
WRITEME

serialize

private static String serialize(Object o)
WRITEME: document this method (brpocock@star-hope.org, Jan 18, 2010)

Parameters:
o - WRITEME
Returns:
WRITEME

setRemote

private static void setRemote(ViaMunita<?> remote,
                              Method m,
                              SetRemote a)
Parameters:
remote - WRITEME
m - WRITEME
a - WRITEME

getPeers

public Set<ViaHost> getPeers()
WRITEME: document this method (brpocock@star-hope.org, Nov 19, 2009)

Returns:
WRITEME