|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--de.bb.bejy.Factory
base class for all protocol factories
In the configuration there is a protocol assigned to each server. That means the class of the protocol factory is specified. For each new server object the factory's create() function is invoked to create a new protocol object. The server keeps that protocol object and manages the sockets and input/output streams for that protocol object. Depending on the return value the socket is kept alive or closed. If an Exception is caught, the server and the protocol object are discarded. The mechanism behind (ThreadManager) creates server objects on demand.
Protocol| Field Summary | |
protected XmlFile |
ini
the configuration file |
protected LogFile |
logFile
a logfile for this protocol |
protected java.lang.String |
name
name of the current Factory without package e.g. |
protected java.lang.String |
section
name of own the loaded Factory with package path e.g. de.bb.bejy.mail.Pop3 |
| Constructor Summary | |
Factory()
|
|
| Method Summary | |
abstract Protocol |
create()
is invoked to create a new protocol object |
abstract java.lang.String |
getFull()
returns a full version string of the current protocol |
abstract java.lang.String |
getVersion()
returns the version number of the current protocol |
abstract void |
load(XmlFile ini,
java.lang.String sName)
is invoked on each protocol object after create(), to load its configuration |
void |
save(XmlFile ini)
is invoked to update the configuration file |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String section
protected java.lang.String name
protected LogFile logFile
protected XmlFile ini
| Constructor Detail |
public Factory()
| Method Detail |
public abstract Protocol create()
public abstract void load(XmlFile ini,
java.lang.String sName)
throws java.lang.Exception
ini - the config file objectsName - the section to retrieve data fromjava.lang.Exception - public void save(XmlFile ini)
ini - the config file objectpublic abstract java.lang.String getVersion()
public abstract java.lang.String getFull()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||