R - the class type of the subclasspublic abstract class AbstractReady<R extends FacadeReady<R>> extends Object implements FacadeReady<R>
| Modifier and Type | Field and Description |
|---|---|
private UniqueKey<R> |
key
The key that is used to register this component.
|
private LocalFacade<R> |
localFacade
The facade that manage same kind of object (from Service, Command and Model).
|
| Constructor and Description |
|---|
AbstractReady() |
| Modifier and Type | Method and Description |
|---|---|
<C extends Command> |
getCommand(Class<C> clazz,
Object... keyPart)
Return the command singleton or part of multiton.
|
Object |
getFirstKeyPart()
Return the first key part of the
MultitonKey or the component class type for UniqueKey. |
UniqueKey<R> |
getKey() |
List<Object> |
getListKeyPart()
Return the list of key parts (considered as model objects).
|
LocalFacade<R> |
getLocalFacade()
Return the local facade used to manage singleton.
|
<M extends Model> |
getModel(Class<M> clazz,
Object... keyPart)
Return the model singleton or part of multiton according to key parts provided.
|
Object |
getSecondKeyPart()
Return the second key part of the
MultitonKey if any or null. |
<S extends Service> |
getService(Class<S> clazz,
Object... keyPart)
Return the service singleton or part of multiton.
|
Object |
getThirdKeyPart()
Return the third key part of the
MultitonKey if any or null. |
void |
setKey(UniqueKey<R> key) |
void |
setLocalFacade(LocalFacade<R> localFacade)
Attach the local facade for this object type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrelease, setupattachUireturnDatacallCommand, callCommandprivate LocalFacade<R extends FacadeReady<R>> localFacade
private UniqueKey<R extends FacadeReady<R>> key
public final LocalFacade<R> getLocalFacade()
getLocalFacade in interface FacadeReady<R extends FacadeReady<R>>public final void setLocalFacade(LocalFacade<R> localFacade)
setLocalFacade in interface FacadeReady<R extends FacadeReady<R>>localFacade - the local facade to setpublic UniqueKey<R> getKey()
getKey in interface FacadeReady<R extends FacadeReady<R>>public void setKey(UniqueKey<R> key)
setKey in interface FacadeReady<R extends FacadeReady<R>>key - The key to set.public Object getFirstKeyPart()
MultitonKey or the component class type for UniqueKey.public Object getSecondKeyPart()
MultitonKey if any or null.public Object getThirdKeyPart()
MultitonKey if any or null.public List<Object> getListKeyPart()
public final <S extends Service> S getService(Class<S> clazz, Object... keyPart)
getService in interface ServiceReadyS - a sub class of serviceclazz - the service class to findkeyPart - the unique key (in option)public final <C extends Command> C getCommand(Class<C> clazz, Object... keyPart)
getCommand in interface CommandReadyC - a sub class of commandclazz - the service class to findkeyPart - the unique key (in option)public final <M extends Model> M getModel(Class<M> clazz, Object... keyPart)
getModel in interface ModelReadyM - a sub class of Modelclazz - the model class to findkeyPart - key parts for multiton model (in option), singletonCopyright © 2011–2014 JRebirth OSS. All rights reserved.