net.sf.doolin.bus.support
Class Subscription<M>

java.lang.Object
  extended by net.sf.doolin.bus.support.Subscription<M>
Type Parameters:
M - Message type

public class Subscription<M>
extends Object

Message processor registration


Constructor Summary
Subscription(Subscriber<M> subscriber)
          Constructor
 
Method Summary
 boolean accept(M message)
          Checks if this subscription accepts a message
 boolean equals(Object o)
           
 long getRegistrationTime()
          Returns the registration date
 Subscriber<M> getSubscriber()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Subscription

public Subscription(Subscriber<M> subscriber)
Constructor

Parameters:
subscriber - Associated subscriber
Method Detail

accept

public boolean accept(M message)
Checks if this subscription accepts a message

Parameters:
message - Message to test
Returns:
Result of the test

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

getRegistrationTime

public long getRegistrationTime()
Returns the registration date

Returns:
Registration date
See Also:
System.currentTimeMillis()

getSubscriber

public Subscriber<M> getSubscriber()
Returns:
Subscriber

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2011. All Rights Reserved.