|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--asgaard.skid.Skid
Servertask (Objectbroker) of the Asgaard - Databaselayer - API "Skid".
Before starting asgaard.skid.Skid
the rmiregistry
need to be started!
When Skid is started, aware that the uses .property
files
are in the local directory.
Field Summary | |
static java.lang.String |
CONNECT_FLATFILE
|
static java.lang.String |
connect_string
|
static java.lang.String |
COPYRIGHT
The Copyright message |
static boolean |
debug
|
static java.lang.String |
driver_class
|
static java.lang.String |
local_db_path
|
static java.lang.Boolean |
localDB
|
protected static asgaard.utils.log.LogClient |
log
LOGFILE of this Server |
static byte |
LogLevel
|
static byte |
MailLevel
|
static java.lang.String |
SERVER
The Service Name |
static java.lang.String |
ServerName
Name for the Binding-service. |
static java.lang.String |
VERSION
The version number |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
Skid()
Instanciates an Server-Object |
Method Summary | |
void |
addEvent(RemoteBean producer,
RemoteBean event)
Adding an Event and replicating it to all suscribed Objects. |
boolean |
beanExist(int key)
Returns whether an Bean is available within the Broker or not. |
java.lang.String |
checkUser(java.lang.String userName,
java.lang.String encr)
Checks if the given username exists or not |
static java.lang.String |
format(java.lang.String key)
|
static java.lang.String |
format(java.lang.String key,
java.lang.Object[] args)
|
static java.lang.String |
format(java.lang.String key,
java.lang.String arg)
|
RemoteBean |
getBean(int key)
Searches for a Bean by a given key. |
RemoteBean[] |
getBean(int[] key)
Searches for Beans by a given set of keys. |
int[] |
getBeanKey(java.lang.String aClass,
java.lang.String[] paramName,
java.lang.Object[] searchValue,
byte[] searchOp)
Searches for a Bean by a given key. |
BeanKeyCall |
getBeanKeyCall(java.lang.Class aClass)
Returns the Key-Call-Adapter for a asked Class (represented by it's key). |
int |
getClassKey(java.lang.Class aClass)
Class-Key of the Bean, differ between different classes. |
int |
getClassKey(RemoteBean aBean)
Class-Key of the Bean, differ between different classes. |
SkidEvent[] |
getEvent(RemoteBean consumer,
long newer)
Returns the Events for a consumer object which are newer than the given time |
BeanLink[] |
getLink(BeanLinkFilter filter)
Searches for a set of Links using the filter - capabilities of BeanLink . |
BeanLink |
getLink(int from,
int to,
int by)
Searches for a specific Link using it's primary key. |
static java.util.Date |
getNow()
|
java.lang.Object |
getUser(java.lang.Object o,
java.lang.String name,
java.lang.String encr)
Excanges an user with an authorised object (hardcoded) |
java.lang.Object |
getUser(java.lang.String name,
java.lang.String encr)
Excanges an user with an authorised object (hardcoded) |
java.lang.Object |
invokeCall(java.lang.Class beanClass,
java.lang.String name,
java.lang.Object[] args,
java.lang.String[] classnames)
Invokes the called method of the filterinterface. |
boolean |
linkExist(int from,
int to,
int by)
Returns if a specific Key exists, hiding all Exceptions. |
boolean |
logMsg(java.lang.String server,
java.lang.String point,
byte typ,
boolean ok,
java.lang.String msg)
Puts a Message to the LOG-Server if available and returns whether it was sent or not |
static void |
main(java.lang.String[] args)
Application - main, follows start of the Commandline. |
static void |
out(java.lang.String key)
Prints a Message referenced by key to a global standard out. |
static void |
out(java.lang.String key,
java.lang.Object[] args)
Prints a Message referenced by key to a global standard out, enriched by given args . |
static void |
out(java.lang.String key,
java.lang.String arg)
Prints a Message referenced by key to a global standard out, enriched by a given arg . |
java.lang.Object[] |
putBean(RemoteBean aObj)
Puts the Bean into the Chache and saves it do not use manually. |
boolean |
putLink(BeanLink link)
Adds a new Relation between Beans. |
boolean |
putUser(java.lang.Object o)
Excanges an user with an authorised object (hardcoded) |
void |
setEvent(RemoteBean producer,
RemoteBean event,
RemoteBean consumer,
byte fromState,
byte toState)
Changing the State of an specific event. |
void |
suscribeEvent(RemoteBean producer,
RemoteBean event,
RemoteBean consumer)
Adding an Event-Pattern and suscribing this type of event. |
void |
testMode(boolean on)
Switches the test - mode on / off. |
static void |
usage(boolean longusage)
|
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone,
exportObject,
exportObject,
exportObject,
unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost,
getLog,
setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals,
getRef,
hashCode,
toString,
toStub |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static java.lang.String ServerName
public static final java.lang.String SERVER
public static final java.lang.String VERSION
public static final java.lang.String COPYRIGHT
public static byte LogLevel
public static byte MailLevel
public static final boolean debug
public static java.lang.String driver_class
public static final java.lang.String CONNECT_FLATFILE
public static java.lang.String connect_string
public static java.lang.String local_db_path
protected static asgaard.utils.log.LogClient log
public static java.lang.Boolean localDB
Constructor Detail |
public Skid() throws java.rmi.RemoteException
Method Detail |
public static void main(java.lang.String[] args)
argv
- Commandlineparameters given within Start of the Servertaskpublic int getClassKey(RemoteBean aBean) throws java.rmi.RemoteException
aBean
- a Bean asked for the class-idpublic int getClassKey(java.lang.Class aClass) throws java.rmi.RemoteException
aClass
- the Bean-Class asked for the class-idpublic final java.lang.Object getUser(java.lang.String name, java.lang.String encr) throws SkidException, java.rmi.RemoteException, java.sql.SQLException
public final java.lang.Object getUser(java.lang.Object o, java.lang.String name, java.lang.String encr) throws SkidException, java.rmi.RemoteException, java.sql.SQLException
public final boolean putUser(java.lang.Object o) throws SkidException, java.rmi.RemoteException, java.sql.SQLException
public final java.lang.String checkUser(java.lang.String userName, java.lang.String encr) throws SkidException, java.rmi.RemoteException, java.sql.SQLException
userName
- name of the userencr
- the encrypted password (optional)public java.lang.Object[] putBean(RemoteBean aObj) throws java.lang.Exception
flush
Remark: A System-Object cannot be modified and carries the created-Timestamp 0
aObj
- the calling Beanasgaard.skid.RemoteBean#saveflush
public int[] getBeanKey(java.lang.String aClass, java.lang.String[] paramName, java.lang.Object[] searchValue, byte[] searchOp) throws SkidException
aClass
- the searched classparamName
- list of the parameter to search forsearchValues
- values to fitsearch-operator
- public RemoteBean getBean(int key) throws java.lang.Exception
key
- the primary key of the objectpublic RemoteBean[] getBean(int[] key) throws java.lang.Exception
key
- the primary key of the objectpublic boolean beanExist(int key)
key
- the unique key of the Beanpublic BeanKeyCall getBeanKeyCall(java.lang.Class aClass) throws java.lang.Exception
classkey
- the id of the classpublic boolean putLink(BeanLink link) throws java.lang.Exception
link
- one relationpublic BeanLink getLink(int from, int to, int by) throws java.lang.Exception
from
- key of the origin Beanto
- key of the target Beanby
- key of the link-Bean (kind of Link)public BeanLink[] getLink(BeanLinkFilter filter) throws java.lang.Exception
BeanLink
.filter
- the BeanLink used as Filterpublic boolean linkExist(int from, int to, int by)
from
- key of the origin Beanto
- key of the target Beanby
- key of the link-Bean (kind of Link)public void addEvent(RemoteBean producer, RemoteBean event) throws java.lang.Exception
producer
- of the event (not null
)event
- the kond of the event (not null
)public void setEvent(RemoteBean producer, RemoteBean event, RemoteBean consumer, byte fromState, byte toState) throws java.lang.Exception
producer
- of the event (not null
)event
- the kond of the event (not null
)consumer
- of the event (not null
)fromState
- ols State of the eventtoState
- ols State of the eventpublic void suscribeEvent(RemoteBean producer, RemoteBean event, RemoteBean consumer) throws java.lang.Exception
producer
- of the event (not null
)event
- the kond of the event (not null
)consumer
- of the event (not null
)public SkidEvent[] getEvent(RemoteBean consumer, long newer) throws java.lang.Exception
consumer
- of the eventsnewer
- than the given timepublic java.lang.Object invokeCall(java.lang.Class beanClass, java.lang.String name, java.lang.Object[] args, java.lang.String[] classnames) throws java.lang.Exception
beanClass
- the class which the asked BeanKeyCall object is forname
- the name of the Methodargs
- the ArgumentsMethod.invoke(java.lang.Object, java.lang.Object[])
public void testMode(boolean on)
public boolean logMsg(java.lang.String server, java.lang.String point, byte typ, boolean ok, java.lang.String msg)
server
- The calling Java-Serverclasspoint
- The Method / place where the statement was createdtyp
- The Type of the LOG-Statementok
- Was the ServicePoint passed successfulymsg
- Human redable Message of the StatementLogMsg
public static void usage(boolean longusage)
public static void out(java.lang.String key, java.lang.Object[] args)
key
to a global standard out, enriched by given args
.key
- Search keykey
- Set of arguments integrated into the messagepublic static void out(java.lang.String key, java.lang.String arg)
key
to a global standard out, enriched by a given arg
.key
- Search keykey
- a argument integrated into the messagepublic static void out(java.lang.String key)
key
to a global standard out.key
- Search keypublic static java.lang.String format(java.lang.String key, java.lang.Object[] args)
public static java.lang.String format(java.lang.String key, java.lang.String arg)
public static java.lang.String format(java.lang.String key)
public static java.util.Date getNow()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |