|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectParkNPark.common.NameService
public class NameService
Contains utility functions for working with the CORBA name service and the ParkNPark name context
Field Summary | |
---|---|
protected PrintStream |
err
The original System.err instance |
private NamingContextExt |
nameServer
Naming context |
protected ORB |
orb
Object request broker |
private NamingContext |
parkNParkContext
Our naming service's ParkNPark context, which contains server registrations |
protected boolean |
primaryServerRegistered
Whether or not a primary server registration exists as of the last call to addServerListFromParkNParkContext() |
private ArrayList<Server> |
servers
List of active servers |
Constructor Summary | |
---|---|
NameService(ORB orb,
PrintStream err)
Creates a new NameService instance using the given ORB |
Method Summary | |
---|---|
boolean |
addServerListFromParkNParkContext(boolean createParkNParkContext,
boolean verbose,
LogEntry logEntry)
Adds to the server List the ParkNParkContext's registered servers. |
NamingContextExt |
getNameServer()
Returns the reference to the name service |
NamingContext |
getParkNParkContext()
Returns the ParkNPark name context, which can be null if the ParkNPark context was not initialized with a call to refreshParkNParkContext() |
List<Server> |
getServers()
Returns the set of ServerState objects |
boolean |
isPrimaryServerRegistered()
Returns whether or not a primary server registration exists as of the last call to addServerListFromParkNParkContext() |
boolean |
refreshParkNParkContext(boolean create,
boolean verbose,
LogEntry logEntry)
Refreshes the parkNParkContext name service object that we use to get server bindings on. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ORB orb
private ArrayList<Server> servers
private NamingContextExt nameServer
private NamingContext parkNParkContext
protected boolean primaryServerRegistered
protected PrintStream err
Constructor Detail |
---|
public NameService(ORB orb, PrintStream err)
orb
- The ORB to work witherr
- The System.err instance to useMethod Detail |
---|
public List<Server> getServers()
public NamingContextExt getNameServer()
public NamingContext getParkNParkContext()
public boolean isPrimaryServerRegistered()
public boolean refreshParkNParkContext(boolean create, boolean verbose, LogEntry logEntry)
create
- When true and if the ParkNPark context does not exist in the
name server, then this method will attempt to create itverbose
- If true, inform the user of possibly-active servers as each
one is foundlogEntry
- A LogEntry object to log name service access times to when
not null
public boolean addServerListFromParkNParkContext(boolean createParkNParkContext, boolean verbose, LogEntry logEntry)
createParkNParkContext
- When true and if the ParkNPark context does not exist in the
name server, then this method will attempt to create itverbose
- If true, inform the user of possibly-active servers as each
one is foundlogEntry
- A LogEntry object to log name service access times to when
not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |