org.granite.gravity.gae
Class GAEChannel

java.lang.Object
  extended by org.granite.gravity.gae.GAEChannel
All Implemented Interfaces:
Serializable, Channel

public class GAEChannel
extends Object
implements Channel, Serializable

Author:
William DRAI
See Also:
Serialized Form

Field Summary
protected  String clientType
           
protected  GAEChannelFactory factory
           
protected  GAEGravity gravity
           
protected  String id
           
 
Method Summary
 Subscription addSubscription(String destination, String subTopicId, String subscriptionId, boolean noLocal)
           
 void close()
           
 void destroy(boolean timeout)
           
 boolean equals(Object obj)
           
 String getClientType()
           
 GAEChannelFactory getFactory()
           
 GAEGravity getGravity()
           
 String getId()
           
 Collection<Subscription> getSubscriptions()
           
 int hashCode()
           
 boolean hasPublishedMessage()
           
 boolean hasReceivedMessage()
           
 void publish(AsyncPublishedMessage message)
           
 void receive(AsyncMessage message)
           
 Subscription removeSubscription(String subscriptionId)
           
 void run()
           
 boolean runPublish()
           
 boolean runReceive()
           
 boolean runReceived(AsyncHttpContext asyncHttpContext)
           
 List<Message> takeMessages()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected final String id

clientType

protected final String clientType

gravity

protected final GAEGravity gravity

factory

protected final GAEChannelFactory factory
Method Detail

getId

public String getId()
Specified by:
getId in interface Channel

getClientType

public String getClientType()
Specified by:
getClientType in interface Channel

getFactory

public GAEChannelFactory getFactory()
Specified by:
getFactory in interface Channel

getGravity

public GAEGravity getGravity()
Specified by:
getGravity in interface Channel

close

public void close()
Specified by:
close in interface Channel

destroy

public void destroy(boolean timeout)
Specified by:
destroy in interface Channel

publish

public void publish(AsyncPublishedMessage message)
             throws MessagePublishingException
Specified by:
publish in interface Channel
Throws:
MessagePublishingException

receive

public void receive(AsyncMessage message)
             throws MessageReceivingException
Specified by:
receive in interface Channel
Throws:
MessageReceivingException

takeMessages

public List<Message> takeMessages()

addSubscription

public Subscription addSubscription(String destination,
                                    String subTopicId,
                                    String subscriptionId,
                                    boolean noLocal)
Specified by:
addSubscription in interface Channel

getSubscriptions

public Collection<Subscription> getSubscriptions()
Specified by:
getSubscriptions in interface Channel

removeSubscription

public Subscription removeSubscription(String subscriptionId)
Specified by:
removeSubscription in interface Channel

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

hasPublishedMessage

public boolean hasPublishedMessage()
Specified by:
hasPublishedMessage in interface Channel

runPublish

public boolean runPublish()
Specified by:
runPublish in interface Channel

hasReceivedMessage

public boolean hasReceivedMessage()
Specified by:
hasReceivedMessage in interface Channel

runReceive

public boolean runReceive()
Specified by:
runReceive in interface Channel

runReceived

public boolean runReceived(AsyncHttpContext asyncHttpContext)
Specified by:
runReceived in interface Channel

run

public void run()