Interface ChildRelationFacility
-
public interface ChildRelationFacility
The Child Relation Facility is used by SBBs to gain access to child SBB relations specified declaratively in the SBB deployment descriptor. Using this facility the SBB abstract class does not need to declare child relation methods for each child relation it wants to use.
An instance of the Child Relation Facility can be obtained from the
SbbContext
.All methods of the Child Relation Facility itself, unless otherwise stated, require a transaction. If a facility method is invoked without a valid transaction context, a
javax.slee.TransactionRequiredLocalException
will be thrown. In addition, these methods may only be invoked by an SBB object that has been assigned to an SBB entity, or is in the process of being assigned to an SBB entity via thesbbCreate()
method. If the SBB object is not assigned to an SBB entity (with the exclusion of thesbbCreate
method), ajava.lang.IllegalStateException
is thrown.- Since:
- Rhino 2.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChildRelation
getChildRelation(String name)
Get a Child Relation object for the child relation declared with the specified name.Collection<String>
getChildRelationNames()
Get the names of all child relations recognised by this facility.RhinoSbbLocalHome
getChildSbbLocalHome(String name)
Get an SBB local home object for the SBB declared with the specified child relation name.Collection<SbbLocalObject>
getChildSbbs()
Get a collection containing all child SBBs created by the SBB.<T> Collection<T>
getChildSbbs(Class<T> type)
Get a collection containing the child SBBs created by the SBB where the child SBB’s local interface is assignable to the specified interface.
-
-
-
Method Detail
-
getChildRelationNames
Collection<String> getChildRelationNames() throws FacilityException
Get the names of all child relations recognised by this facility.
This method is a non-transactional method and may be invoked by an SBB object in any state.
- Returns:
- a collection of child relation names.
- Throws:
FacilityException
- if a system-level failure occurs.- Since:
- Rhino 2.4.0
-
getChildRelation
ChildRelation getChildRelation(String name) throws NullPointerException, TransactionRequiredLocalException, IllegalStateException, UnrecognizedChildRelationException, FacilityException
Get a Child Relation object for the child relation declared with the specified name.
- Parameters:
name
- the name of the child relation.- Returns:
- a Child Relation object for the specified child relation.
- Throws:
NullPointerException
- ifname
isnull
.TransactionRequiredLocalException
- if this method is invoked without a valid transaction context.IllegalStateException
- if this method is invoked by an SBB object that is not assigned to an SBB entity.UnrecognizedChildRelationException
- ifname
is not recognised as a declared child relation.FacilityException
- if a system-level failure occurs.- Since:
- Rhino 2.4.0
-
getChildSbbs
Collection<SbbLocalObject> getChildSbbs() throws TransactionRequiredLocalException, IllegalStateException, FacilityException
Get a collection containing all child SBBs created by the SBB.
The returned collection includes child SBBs created from both child relations defined in the standard SLEE way as well as declarative child relations defined in the extension deployment descriptor.
- Returns:
- a collection of all child SBBs.
- Throws:
TransactionRequiredLocalException
- if this method is invoked without a valid transaction context.IllegalStateException
- if this method is invoked by an SBB object that is not assigned to an SBB entity.FacilityException
- if a system-level failure occurs.- Since:
- Rhino 2.4.0
-
getChildSbbs
<T> Collection<T> getChildSbbs(Class<T> type) throws NullPointerException, TransactionRequiredLocalException, IllegalStateException, FacilityException
Get a collection containing the child SBBs created by the SBB where the child SBB’s local interface is assignable to the specified interface.
The returned collection includes relevant child SBBs created from both child relations defined in the standard SLEE way as well as declarative child relations defined in the extension deployment descriptor.
- Returns:
- a collection of child SBBs whose SBB local interface is assignable to the specified interface.
- Throws:
NullPointerException
- iftype
isnull
.TransactionRequiredLocalException
- if this method is invoked without a valid transaction context.IllegalStateException
- if this method is invoked by an SBB object that is not assigned to an SBB entity.FacilityException
- if a system-level failure occurs.- Since:
- Rhino 2.4.0
-
getChildSbbLocalHome
RhinoSbbLocalHome getChildSbbLocalHome(String name) throws NullPointerException, UnrecognizedChildRelationException, FacilityException
Get an SBB local home object for the SBB declared with the specified child relation name.
This method is a non-transactional method and may be invoked by an SBB object in any state.
- Parameters:
name
- the name of the child relation.- Returns:
- an SBB local home object for the child SBB, or
null
if the child SBB has not defined a local home interface. - Throws:
NullPointerException
- ifname
isnull
.UnrecognizedChildRelationException
- ifname
is not recognised as a declared child relation.FacilityException
- if a system-level failure occurs.- Since:
- Rhino 2.4.0
-
-