|
|||||||||
| Home >> All >> org >> vrspace >> [ server overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.vrspace.server
Class Server

java.lang.Objectorg.vrspace.server.Server
- All Implemented Interfaces:
- java.lang.Runnable
- public class Server
- extends java.lang.Object
- implements java.lang.Runnable
- extends java.lang.Object
Main server class - start this one :)
| Field Summary | |
private java.net.ServerSocket |
binarySocket
|
protected Checkpoint |
checkpoint
|
protected DB |
db
|
protected Dispatcher |
dispatcher
|
private java.lang.ClassLoader |
loader
|
private java.net.URL |
location
|
private org.vrspace.util.Logger |
logger
|
private int |
port
|
private org.vrspace.util.ObservableProperties |
properties
|
protected RequestLog |
requestLog
|
protected java.util.Timer |
scheduler
|
private static java.util.Vector |
servers
|
protected java.util.HashSet |
sessions
|
| Constructor Summary | |
Server(java.lang.String propertiesFile)
Server class |
|
| Method Summary | |
Dispatcher |
getDispatcher()
|
java.io.InputStream |
getFile(Request req,
java.lang.String path,
org.vrspace.attributes.Filter filter)
This should retreive a file from anywhere. |
java.net.URL |
getLocation()
Returns the path to this object |
java.lang.String |
getName()
Returns this instance name in format name:port |
org.vrspace.util.ObservableProperties |
getProperties()
Returns the server properties |
java.lang.String |
getProperty(java.lang.String name)
Returns a property |
static Server[] |
getServers()
|
java.util.HashSet |
getSessions()
|
static void |
main(java.lang.String[] args)
main |
void |
run()
Started from main() |
void |
setProperty(java.lang.String property,
java.lang.String value)
Set a property Note: no privilege checking! |
protected void |
shutdown()
shutdown |
(package private) void |
startScheduler()
|
static Server[] |
startServers(java.lang.String[] args)
|
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
port
private int port
dispatcher
protected Dispatcher dispatcher
db
protected DB db
requestLog
protected RequestLog requestLog
scheduler
protected java.util.Timer scheduler
location
private java.net.URL location
properties
private org.vrspace.util.ObservableProperties properties
logger
private org.vrspace.util.Logger logger
checkpoint
protected Checkpoint checkpoint
binarySocket
private java.net.ServerSocket binarySocket
sessions
protected java.util.HashSet sessions
loader
private java.lang.ClassLoader loader
servers
private static java.util.Vector servers
| Constructor Detail |
Server
public Server(java.lang.String propertiesFile) throws java.lang.Exception
- Server class
| Method Detail |
getProperties
public org.vrspace.util.ObservableProperties getProperties()
- Returns the server properties
getProperty
public java.lang.String getProperty(java.lang.String name)
- Returns a property
setProperty
public void setProperty(java.lang.String property, java.lang.String value)
- Set a property Note: no privilege checking!
shutdown
protected void shutdown()
- shutdown
getLocation
public java.net.URL getLocation()
- Returns the path to this object
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- main
startServers
public static Server[] startServers(java.lang.String[] args) throws java.lang.Exception
run
public void run()
- Started from main()
- Specified by:
runin interfacejava.lang.Runnable
startScheduler
void startScheduler()
getFile
public java.io.InputStream getFile(Request req, java.lang.String path, org.vrspace.attributes.Filter filter) throws java.lang.Exception
- This should retreive a file from anywhere. Look at upload command and
File.upload() method.
Very early version.
getName
public java.lang.String getName()
- Returns this instance name in format name:port
getDispatcher
public Dispatcher getDispatcher()
getServers
public static Server[] getServers()
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
getSessions
public java.util.HashSet getSessions()
|
|||||||||
| Home >> All >> org >> vrspace >> [ server overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.vrspace.server.Server