org.apache.geronimo.messaging
Class BaseEndPoint

java.lang.Object
  extended byorg.apache.geronimo.messaging.BaseEndPoint
All Implemented Interfaces:
EndPoint, MsgConsProd, MsgConsumer, MsgProducer
Direct Known Subclasses:
EndPointProxyFactoryImpl, GBeanBaseEndPoint, ReferenceableManagerImpl, StreamManagerImpl

public abstract class BaseEndPoint
extends Object
implements EndPoint

Base class for EndPoint implementations.

Version:
$Revision: 1.1 $ $Date: 2004/06/10 23:12:24 $

Field Summary
protected  Object id
          EndPoint identifier.
protected  Node node
          Node which has mounted this EndPoint.
protected  MsgOutInterceptor out
          Used to communicate with remote EndPoints.
protected  RequestSender sender
          To send requests.
 
Constructor Summary
BaseEndPoint(Node aNode, Object anID)
          Creates an EndPoint, which is mounted by the specified Node and having the specified identifier.
 
Method Summary
 Object getID()
          Gets the identifier of this EndPoint.
 MsgOutInterceptor getMsgConsumerOut()
          Gets a mean to push Msgs to this instance.
protected  void handleRequest(Msg aMsg)
          Handles a request Msg.
protected  void handleResponse(Msg aMsg)
          Handles a response Msg.
 void setMsgProducerOut(MsgOutInterceptor aMsgOut)
          Sets a mean to this instance to push Msgs to the outside world.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected final Node node
Node which has mounted this EndPoint.


id

protected final Object id
EndPoint identifier.


sender

protected final RequestSender sender
To send requests.


out

protected MsgOutInterceptor out
Used to communicate with remote EndPoints.

Constructor Detail

BaseEndPoint

public BaseEndPoint(Node aNode,
                    Object anID)
Creates an EndPoint, which is mounted by the specified Node and having the specified identifier.

Parameters:
aNode - Node owning this connector.
anID - EndPoint identifier.
Method Detail

getID

public final Object getID()
Description copied from interface: EndPoint
Gets the identifier of this EndPoint. It is used by a Node to route incoming Msgs to this instance.

Specified by:
getID in interface EndPoint
Returns:
EndPoint identifier.

getMsgConsumerOut

public MsgOutInterceptor getMsgConsumerOut()
Description copied from interface: MsgConsumer
Gets a mean to push Msgs to this instance.

Specified by:
getMsgConsumerOut in interface MsgConsumer
Returns:
Mean to push Msgs to this consumer of Msgs.

setMsgProducerOut

public void setMsgProducerOut(MsgOutInterceptor aMsgOut)
Description copied from interface: MsgProducer
Sets a mean to this instance to push Msgs to the outside world.

Specified by:
setMsgProducerOut in interface MsgProducer
Parameters:
aMsgOut - Used by this instance to push Msgs to other components.

handleRequest

protected void handleRequest(Msg aMsg)
Handles a request Msg. A request Msg MUST contain a Request object.

Parameters:
aMsg - Request Msg to be processed.

handleResponse

protected void handleResponse(Msg aMsg)
Handles a response Msg. A response Msg MUST contain a Result object.

Parameters:
aMsg - Response to be handled.


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.