|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
O - Generic type name of the object being built.public interface CafeObjectBuilder<O>
CAFE framework uses an instance of this class returned by CafeModule
for creating the objects like Communications,UserProcedures or Participants.
One instance of the CafeObjectBuilder is used to build exactly one object
and it will be discarded as soon as the object is built. During the build
process, the CafeObjectBuilder will be stateful as per the
java builder pattern semantics.
| Method Summary | |
|---|---|
O |
buildCommunication(String name,
Communication other,
Object... arg)
Build a Communication object from an already existing
Communication. |
O |
buildCommunication(String name,
Participant initiator,
Object... arg)
Build a Communication object using the specified initiator. |
O |
buildCommunication(String name,
ProtocolMessage msg)
Build a Communication object from an incoming ProtocolMessage. |
O |
buildParticipant(String name,
javax.media.mscontrol.join.Joinable j)
Build a Participant object with the specified name. |
ProtocolMessageHandler |
buildProtocolMessageHandler()
Return a ProtocolMessageHandler object that encapsulate the
Communication or UserProcedure. |
O |
buildUserProcedure(String id,
Object... arg)
Build a UserProcedure object with the specified id. |
Class<?> |
getType()
Return the type of the object built. |
void |
setCommunication(O cached)
If the CAFE framework might have found an object that matches the name of the object being built in its cache. |
| Method Detail |
|---|
void setCommunication(O cached)
CafeObjectBuilder can take an
appropriate decision.
cached - Object found in the cache.
O buildCommunication(String name,
Communication other,
Object... arg)
Communication object from an already existing
Communication.
name - Name of the Communication to be built. This will
never be null.other - Input Communication object. This will not be null.arg - Any other arguments. This is an optional parameter.
Communication object.
O buildCommunication(String name,
Participant initiator,
Object... arg)
Communication object using the specified initiator.
name - Name of the Communication to be built. This will never be null.initiator - An instance of Participant which is the initiator
of this Communication. This can be null.arg - Any other arguments. This is an optional parameter.
Communication object.
O buildCommunication(String name,
ProtocolMessage msg)
Communication object from an incoming ProtocolMessage.
name - Name of the Communication to be built. This will never be null.msg - ProtocolMessage object. This will be never be null.
O buildUserProcedure(String id,
Object... arg)
UserProcedure object with the specified id.
id - Name of the UserProcedure to be built. This will never be null.arg - Any other arguments. This is an optional parameter.
O buildParticipant(String name,
javax.media.mscontrol.join.Joinable j)
Participant object with the specified name.
name - Name of the Participant to be built. This will never be null.j - JSR 309 Joinable object that the Participantmight be
associated with. This is optional.Class<?> getType()
ProtocolMessageHandler buildProtocolMessageHandler()
ProtocolMessageHandler object that encapsulate the
Communication or UserProcedure.
Framework will execute this method only after the execution of either a
buildCommunication method or buildUserProcedure
method. The returned ProtocolMessageHandler will represent
the Communication or UserProcedure object created
in that method execution.
ProtocolMessageHandlerProtocolMessageHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||