Author: nbelaevski
Date: 2010-10-14 20:24:16 -0400 (Thu, 14 Oct 2010)
New Revision: 19575
Added:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageDataSerializer.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/Session.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/SessionListener.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/SessionManager.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/Topic.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/TopicsContext.java
Removed:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageFilter.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageSerializer.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageTransformer.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSession.java
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSessionTracker.java
Log:
https://jira.jboss.org/browse/RF-7817
Copied:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageDataSerializer.java
(from rev 19530,
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageSerializer.java)
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageDataSerializer.java
(rev 0)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageDataSerializer.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.richfaces.application.push;
+
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+//TODO - byte message serializer?
+public interface MessageDataSerializer {
+
+ public static final String MESSAGE_ATTRIBUTE_NAME =
MessageDataSerializer.class.getName();
+
+ public String serialize(Object data);
+
+}
Deleted:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageFilter.java
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageFilter.java 2010-10-14
21:35:43 UTC (rev 19574)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageFilter.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.richfaces.application.push;
-
-
-/**
- * @author Nick Belaevski
- *
- */
-public interface MessageFilter {
-
- public boolean accept(Message message);
-
-}
Deleted:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageSerializer.java
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageSerializer.java 2010-10-14
21:35:43 UTC (rev 19574)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageSerializer.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.richfaces.application.push;
-
-
-/**
- * @author Nick Belaevski
- *
- */
-//TODO - byte message serializer?
-public interface MessageSerializer {
-
- public static final String MESSAGE_ATTRIBUTE_NAME =
MessageSerializer.class.getName();
-
- public String serialize(Message message);
-
-}
Deleted:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageTransformer.java
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageTransformer.java 2010-10-14
21:35:43 UTC (rev 19574)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/MessageTransformer.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.richfaces.application.push;
-
-
-/**
- * @author Nick Belaevski
- *
- */
-public interface MessageTransformer {
-
- public Message transform(Message o);
-
-}
Deleted:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSession.java
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSession.java 2010-10-14
21:35:43 UTC (rev 19574)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSession.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.richfaces.application.push;
-
-import java.io.IOException;
-
-
-/**
- * @author Nick Belaevski
- *
- */
-public interface PushSession {
-
- public String getId();
-
- public void subscribe(TopicKey[] topics);
-
- public void connect(Request request) throws IOException;
-
- public void disconnect() throws IOException;
-
- public void destroy();
-
- public void writeMessages() throws IOException;
-
-}
Deleted:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSessionTracker.java
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSessionTracker.java 2010-10-14
21:35:43 UTC (rev 19574)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSessionTracker.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.richfaces.application.push;
-
-
-/**
- * @author Nick Belaevski
- *
- */
-public interface PushSessionTracker {
-
- public PushSession createPushSession();
-
- public PushSession getPushSession(String id);
-
- public void removePushSession(String id);
-
-}
\ No newline at end of file
Copied:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/Session.java (from
rev 19530,
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSession.java)
===================================================================
--- branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/Session.java
(rev 0)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/Session.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.richfaces.application.push;
+
+
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public interface Session {
+
+ public int getMaxInactiveInterval();
+
+ public long getLastAccessedTime();
+
+ public String getId();
+
+ public void subscribe(TopicKey topic) throws Exception;
+
+ public void connect(Request request) throws Exception;
+
+ public void disconnect(Request request) throws Exception;
+
+ public void destroy();
+
+ public Request getRequest();
+
+ public void addSessionListener(SessionListener sessionListener);
+
+ public SessionListener[] getSessionListeners();
+
+ public void removeSessionListener(SessionListener sessionListener);
+
+}
Added:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/SessionListener.java
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/SessionListener.java
(rev 0)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/SessionListener.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.richfaces.application.push;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public interface SessionListener {
+
+ public void onRequestConnected(Session session);
+
+ public void onRequestDisconnected(Session session);
+
+ public void onSessionDestroyed(Session session);
+
+}
Copied:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/SessionManager.java
(from rev 19530,
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/PushSessionTracker.java)
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/SessionManager.java
(rev 0)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/SessionManager.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.richfaces.application.push;
+
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public interface SessionManager {
+
+ public void putPushSession(Session pushSession) throws IllegalStateException;
+
+ public Session getPushSession(String id);
+
+ public void removePushSession(String id);
+
+ public void destroy();
+
+}
\ No newline at end of file
Added: branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/Topic.java
===================================================================
--- branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/Topic.java
(rev 0)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/Topic.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.richfaces.application.push;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public interface Topic {
+
+ public TopicKey getKey();
+
+ public MessageDataSerializer getMessageSerializer();
+
+ public void setMessageSerializer(MessageDataSerializer serializer);
+
+}
\ No newline at end of file
Added:
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/TopicsContext.java
===================================================================
---
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/TopicsContext.java
(rev 0)
+++
branches/RF-7817/core/api/src/main/java/org/richfaces/application/push/TopicsContext.java 2010-10-15
00:24:16 UTC (rev 19575)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.richfaces.application.push;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+//TODO annotations for declarative topics registration
+public interface TopicsContext {
+
+ public Topic getOrCreateTopic(TopicKey key);
+
+ public Topic getTopic(TopicKey key);
+
+ public void removeTopic(TopicKey key);
+
+}