solar
Class Client

java.lang.Object
  |
  +--solar.Client

public class Client
extends java.lang.Object

The facade class to interact with Solar system.

Version:
$Id: Client.java,v 1.30 2003/09/26 19:47:14 glchen Exp $
Author:
Guanling Chen

Field Summary
private  DanClientService _dan
           
private  DispatchService _dispatch
           
private  FapClientService _fap
           
private static org.apache.log4j.Logger _log
           
 
Constructor Summary
Client(serp.util.Options opts)
           
Client(java.lang.String cfg)
           
Client(java.lang.String host, int port)
           
Client(java.lang.String host, int port, serp.util.Options opts)
           
 
Method Summary
 Guid advertise(java.lang.String name, java.lang.Object obj, Source src)
          Advertise a static name for a Solar source.
 Guid advertise(java.lang.String name, Source src)
          Advertise a static name for a Solar source.
 Guid advertise(java.lang.String graph, java.lang.String name, java.lang.Object obj, Source src)
          Advertise a dynamic name for a Solar source.
private  void construct(serp.util.Options opts)
          Common operations needed by constructors.
private  serp.util.Options getDefaultOptions()
           
 java.util.List lookup(java.lang.String query)
          Return a list of names and name records matching the name query.
static void main(java.lang.String[] args)
          Start the client and make name lookups.
 Guid subscribe(java.lang.String query, Application app)
          Subscribe to any source whose name matches the query.
 Guid subscribe(java.lang.String graph, java.lang.String root, Application app)
          Compose an operator graph and subscribe to one of the operators.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

private static org.apache.log4j.Logger _log

_dispatch

private DispatchService _dispatch

_fap

private FapClientService _fap

_dan

private DanClientService _dan
Constructor Detail

Client

public Client(java.lang.String host,
              int port)
       throws java.lang.Exception

Client

public Client(java.lang.String host,
              int port,
              serp.util.Options opts)
       throws java.lang.Exception

Client

public Client(java.lang.String cfg)
       throws java.lang.Exception

Client

public Client(serp.util.Options opts)
       throws java.lang.Exception
Method Detail

getDefaultOptions

private serp.util.Options getDefaultOptions()

construct

private void construct(serp.util.Options opts)
                throws java.lang.Exception
Common operations needed by constructors.

java.lang.Exception

advertise

public Guid advertise(java.lang.String name,
                      Source src)
               throws java.lang.Exception
Advertise a static name for a Solar source.

java.lang.Exception

advertise

public Guid advertise(java.lang.String name,
                      java.lang.Object obj,
                      Source src)
               throws java.lang.Exception
Advertise a static name for a Solar source.

java.lang.Exception

advertise

public Guid advertise(java.lang.String graph,
                      java.lang.String name,
                      java.lang.Object obj,
                      Source src)
               throws java.lang.Exception
Advertise a dynamic name for a Solar source.

java.lang.Exception

lookup

public java.util.List lookup(java.lang.String query)
                      throws java.lang.Exception
Return a list of names and name records matching the name query.

java.lang.Exception

subscribe

public Guid subscribe(java.lang.String query,
                      Application app)
               throws java.lang.Exception
Subscribe to any source whose name matches the query.

java.lang.Exception

subscribe

public Guid subscribe(java.lang.String graph,
                      java.lang.String root,
                      Application app)
               throws java.lang.Exception
Compose an operator graph and subscribe to one of the operators.

java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Start the client and make name lookups. Command line usage:

-host tahoe -port 5470 -lookup "[source=clock]"

java.lang.Exception