|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ramblingwood.minecraft.jsonapi.api.JSONAPIStream
public abstract class JSONAPIStream
This class represents a stream. You most likely never have to overload any of these methods.
Constructor Summary | |
---|---|
JSONAPIStream()
|
Method Summary | |
---|---|
void |
addMessage(JSONAPIStreamMessage m)
Alias for pushMessage |
void |
deregisterListener(JSONAPIStreamListener l)
Undo the effects of registerListener. |
java.util.List<JSONAPIStreamMessage> |
getStack()
Returns up to the last 50 messages in syncronized ArrayList. |
void |
pushMessage(JSONAPIStreamMessage m)
Push out a message to all subscribers. |
void |
registerListener(JSONAPIStreamListener l,
boolean feedOld)
Register to have messages pushed to the listener. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSONAPIStream()
Method Detail |
---|
public void registerListener(JSONAPIStreamListener l, boolean feedOld)
l
- The listener to push to.feedOld
- Do you want to receive up to 50 previous messages immediately after registering?public java.util.List<JSONAPIStreamMessage> getStack()
public void deregisterListener(JSONAPIStreamListener l)
l
- public void addMessage(JSONAPIStreamMessage m)
m
- public void pushMessage(JSONAPIStreamMessage m)
m
- A message to be pushed to all subscribers.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |