|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object service.Service
public abstract class Service
Skeleton of a service that has to be specialized for implementing a new service
Field Summary | |
---|---|
protected SynchronizedBuffer<Message> |
buffer
Buffer containing the received messages for the service |
protected ICommunication |
commElt
Communication element to use to send messages to service parts on other processes |
protected MessageDispatcher |
dispatcher
The message dispatcher to use for associating the current service with its type of message |
protected MessageType |
myType
The type of the service |
Constructor Summary | |
---|---|
Service()
|
Method Summary | |
---|---|
void |
initialize(MessageDispatcher dispatcher,
ICommunication commElt,
MessageType myType)
Initialize the service: register the service on the message dispatcher |
protected void |
sendMessage(Message msg)
Send a message, tagged with the type of the service, to a given process (more precisely, to the service of the same type on this process) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected MessageDispatcher dispatcher
protected ICommunication commElt
protected SynchronizedBuffer<Message> buffer
protected MessageType myType
Constructor Detail |
---|
public Service()
Method Detail |
---|
protected void sendMessage(Message msg) throws CommunicationException
msg
- the message to send
CommunicationException
public void initialize(MessageDispatcher dispatcher, ICommunication commElt, MessageType myType)
dispatcher
- the message dispatcher to use for associating the current service with its type of messagecommElt
- the communication element to use to send messages to service parts on other processesmyType
- the type of the service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |