Class VNS
java.lang.Object
org.apache.vinci.transport.VinciServableAdapter
org.apache.vinci.transport.vns.service.VNS
- All Implemented Interfaces:
TransportableFactory
,VinciServable
VNS (Vinci Naming Service) provides the "directory" of all available Vinci services. VNS must be
running somewhere on the network for VinciClient and VinciServer classes to function. These
classes consult org.apache.vinci.transport.vns.client.VNSConfig to determine the location of the
VNS service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int
private static String
private static int
(package private) Thread
(package private) BackupThread
private static String
private HashMap
private static String
private static String
private static String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
(package private) Hashtable
(package private) Writer
private static String
private static boolean
private static int
(package private) String
(package private) int
(package private) static File
(package private) ServiceRegistry
private static int
(package private) String
(package private) int
private static String
(package private) WorkspaceConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) VinciFrame
addAlias
(VinciFrame in) (package private) VinciFrame
addService
(VinciFrame in) private void
private Object
checkCache
(String s) void
Called when the service is being shutdown by the server/service container.(package private) VinciFrame
delAlias
(VinciFrame in) (package private) VinciFrame
delService
(VinciFrame in) static String
eval
(Transportable inp) The eval method accepts an input document and returns an output document that is the result of performing the service.(package private) VinciFrame
(package private) VinciFrame
getHits
(VinciFrame in) (package private) VinciFrame
getList
(VinciFrame in) (package private) VinciFrame
getNames
(VinciFrame in) boolean
loadConfig
(String cFile) void
loadCounters
(String cFile) void
loadWorkspaces
(String wFile) (package private) void
logRequest
(String type, String ip, String text) static void
private static void
(package private) VinciFrame
resolve
(VinciFrame in) (package private) VinciFrame
(package private) VinciFrame
(package private) VinciFrame
resolveProxy
(VinciFrame in, String workspace) void
saveConfig
(String cFile) void
saveCounters
(String cFile) void
saveWorkspaces
(String wFile) (package private) VinciFrame
serveon
(VinciFrame in) private static void
setConfigDir
(String path) static void
static String
private void
private Service
(package private) VinciFrame
Methods inherited from class org.apache.vinci.transport.VinciServableAdapter
makeTransportable
-
Field Details
-
cachedResults
-
dirCmdAddService
- See Also:
-
dirCmdAddAlias
- See Also:
-
dirCmdDelService
- See Also:
-
dirCmdDelAlias
- See Also:
-
dirCmdUpdateService
- See Also:
-
dirCmdGetList
- See Also:
-
dirCmdGetNames
- See Also:
-
dirCmdGetHits
- See Also:
-
ENV_PROXY
-
configFile
-
backupFile
-
workspacesFile
-
counterFile
-
logFile
-
configDir
-
backupInterval
private static int backupInterval -
srvPort
private static int srvPort -
logFlag
private static boolean logFlag -
bindAddress
-
backlog
private static int backlog -
maxThreads
private static int maxThreads -
port
int port -
myLogFile
String myLogFile -
backupThread
Thread backupThread -
backupThreadRunnable
BackupThread backupThreadRunnable -
hits
Hashtable hits -
totalhits
int totalhits -
SR
-
WS
-
log
Writer log -
starttime
String starttime -
quitFile
-
-
Constructor Details
-
VNS
public VNS() -
VNS
public VNS(int port) -
VNS
- Throws:
IOException
-
-
Method Details
-
setConfigDir
-
main
- Throws:
IOException
-
printUsage
private static void printUsage() -
startServing
- Throws:
IOException
-
loadConfig
-
loadWorkspaces
-
loadCounters
-
saveConfig
-
saveCounters
-
saveWorkspaces
-
eval
Description copied from interface:VinciServable
The eval method accepts an input document and returns an output document that is the result of performing the service.- Specified by:
eval
in interfaceVinciServable
- Specified by:
eval
in classVinciServableAdapter
- Parameters:
inp
- The input document- Returns:
- The output document
- Throws:
ServiceException
- thrown when there is an application level error that should result in the client receiving the same ServiceException on the other end.
-
resolveLocal
-
resolveProxy
-
resolveDefaults
-
resolve
-
serveon
-
addService
-
addAlias
-
delService
-
delAlias
-
updateService
-
getList
-
getNames
-
getHits
-
cache
-
updateCache
-
updateCache
-
checkCache
-
getFrame
-
strip
-
emptyString
-
logRequest
-
cleanExit
public void cleanExit()Description copied from interface:VinciServable
Called when the service is being shutdown by the server/service container.- Specified by:
cleanExit
in interfaceVinciServable
- Overrides:
cleanExit
in classVinciServableAdapter
-