|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.orderlysoftware.orderlycalls.base.Service
com.orderlysoftware.orderlycalls.examples.ExampleService
public class ExampleService
Very basic Service implementation to help you write your own services. This service supports a 'username' and 'password', entered as attributes in OrderlyCalls.xml, and a validate() method to help authenticate users.
| Field Summary |
|---|
| Fields inherited from class com.orderlysoftware.orderlycalls.base.Service |
|---|
log, settings |
| Constructor Summary | |
|---|---|
ExampleService(Settings settings)
Must define this method in order to work with superclass. |
|
| Method Summary | |
|---|---|
boolean |
authenticate(java.lang.String testUsername,
java.lang.String testPassword)
Compares an input username and password to those from the congiguration file. |
static Service |
getInstance(Settings settings)
Must define this method in order to work with superclass. |
static Service |
getInstance(Settings settings,
boolean reuse)
Must define this as follows in order to work with superclass. |
static ExampleService |
getInstance(java.lang.String name)
Most services should also define this method as follows. |
void |
init()
Gets the username and password attributes from the XML configuration file. |
boolean |
isRunning()
Is the service runnig or not? |
void |
shutdown()
Clears the stored username and password, so the service cannot be used to log in. |
| Methods inherited from class com.orderlysoftware.orderlycalls.base.Service |
|---|
getExecutorService, getInstance, getInstanceByName, getLogName, getName, getSettings, setExecutorService, shutdownAll |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExampleService(Settings settings)
| Method Detail |
|---|
public boolean isRunning()
isRunning in class Service
public boolean authenticate(java.lang.String testUsername,
java.lang.String testPassword)
testUsername - testPassword -
public static Service getInstance(Settings settings)
public static Service getInstance(Settings settings,
boolean reuse)
public static ExampleService getInstance(java.lang.String name)
public void init()
init in class Servicepublic void shutdown()
shutdown in class Service
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||