Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom listeners / authorizers #21

Closed
uklance opened this issue Jun 19, 2012 · 2 comments
Closed

Custom listeners / authorizers #21

uklance opened this issue Jun 19, 2012 · 2 comments

Comments

@uklance
Copy link
Owner

uklance commented Jun 19, 2012

  • Abstract the singleton Maps from CometdPushManager into a separate service (CometdGlobals)
  • Support connect listeners (topic based)
  • Support disconnect listeners (topic based)
  • Support authorizer contributions (topic based)
  • Perhaps refactor CometdPushManager into listeners, delete the class and move everything to CometdModule.buildBayeuxServer()
public interface SubscriptionListener {
   public void onSubscribe(String topic, ClientContext context);
   public void onUnsubscribe(String topic, ClientContext context);
   public String getTopic();
}

public interface SubscriptionListeners {
   public void addListener(SubscriptionListener listener);
   public void removeListener(SubscriptionListener listener);
   public List<SubscriptionListener> getListeners(String topic);
}

public interface Authorizer {
   public boolean authorize(String topic, ClientContext context);
   public String getTopic();
}

public interface Authorizers {
   public void addAuthorizer(Authorizer auth);
   public void removeAuthorizer(Authorizer auth);
   public List<Authorizer> getAuthorizers(String topic);
}
@uklance
Copy link
Owner Author

uklance commented Jun 21, 2012

Related to #24

@uklance
Copy link
Owner Author

uklance commented Jun 22, 2012

Authorizers implemented (not tested)

@uklance uklance closed this as completed Jun 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant