|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectthinkmap.datasource.util.Message
public class Message
Message is an IEntityHandler that stores its input for later retrieval.
| Field Summary |
|---|
| Fields inherited from interface thinkmap.datasource.IEntityHandler |
|---|
ADD_REQUEST, ATTR_CACHE_REVISION, DELETE_REQUEST, EDGE, ENTITY_REQUEST, FLAG_NO_CACHE, FLAGS, FLAGS_DEFAULT, ID_REQUEST, LIST_ENTITIES_REQUEST, METADATA_REQUEST, NODE, NULL_REQUEST, QUERY_MAX_RESULTS, QUERY_STARTING_RESULT_NUMBER, QUERY_STRING, RELATED_REQUEST, RESERVED_ID_MAX, SINK, SOURCE, TOTAL_RESULTS, UNLIMITED_RESULTS, UPDATE_REQUEST |
| Constructor Summary | |
|---|---|
Message()
|
|
| Method Summary | |
|---|---|
void |
addEntity(SourceEntity entity)
Add an Entity |
void |
addEntityType(EntityType entityType)
Add an EntityType |
void |
attribute(String name,
Object value)
Send a message attribute. |
void |
beginEntity()
Begin an entity. |
void |
beginEntityMD(String parentType)
Begin entity metadata. |
void |
beginId(String type)
Begin an entity ID. |
void |
beginMessage(int type)
Begin a message. |
void |
beginRelatedEntity(String relation,
boolean reciprical)
A related entity. |
void |
beginRelatedList(byte i)
Begin the list of related entities. |
protected void |
complainClosed()
Someone tried to modify the message after endMessage() was called. |
void |
endEntity()
End an entity. |
void |
endEntityMD()
End entity metadata. |
void |
endId()
End an entity ID. |
void |
endMessage()
End a message. |
void |
endRelatedEntity()
End a related entity. |
void |
endRelatedList()
Mark the end of a related list. |
void |
error(Exception e)
Tell the entity source about an error. |
void |
fatalError(Exception e)
A fatal error occured. |
Object |
getAttribute(String name)
Get the named attributes. |
Enumeration |
getAttributeNames()
Get the names of all attributes. |
Enumeration |
getEntities()
|
SourceEntity |
getEntity(int i)
Get the Entity at the specified index. |
int |
getEntityCount()
Get the number of entities in this message. |
EntityId |
getEntityId(int i)
|
int |
getEntityIdCount()
|
EntityType |
getEntityType(int i)
|
int |
getEntityTypeCount()
|
ExceptionChain |
getErrors()
|
ExceptionChain |
getFatalErrors()
|
ExceptionChain |
getNonFatalErrors()
|
int |
getType()
Get the type of message. |
void |
idKey(Object value)
Send an id key. |
void |
idKeyMD(Class type)
Describe an entity id's key. |
void |
property(String name,
Object value)
Send an entity's property. |
void |
propertyMD(String name,
Class type)
Describe an entity's property. |
void |
removeEntity(SourceEntity entity)
Remove an Entity |
void |
removeEntityType(EntityType entityType)
Remove an EntityType |
void |
replaceEntity(int i,
SourceEntity replacement)
Replace an entity at the specified index |
static void |
setCompatibilityMode(boolean b)
This static method turns on and off backwards compatibility mode. |
void |
writeTo(IEntityHandler handler)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Message()
| Method Detail |
|---|
public int getType()
public Object getAttribute(String name)
name - A request attribute name.
public Enumeration getAttributeNames()
public SourceEntity getEntity(int i)
i - Index of the entity.
public int getEntityCount()
public int getEntityIdCount()
public EntityId getEntityId(int i)
public int getEntityTypeCount()
public EntityType getEntityType(int i)
public Enumeration getEntities()
public ExceptionChain getErrors()
public ExceptionChain getFatalErrors()
public ExceptionChain getNonFatalErrors()
public void beginMessage(int type)
IEntityHandler
beginMessage in interface IEntityHandlertype - one of the request types below, eg RELATED_REQUEST
public void attribute(String name,
Object value)
IEntityHandler
attribute in interface IEntityHandlername - The attribute's namevalue - The attribute's valuepublic void beginEntity()
IEntityHandler
beginEntity in interface IEntityHandlerpublic void endEntity()
IEntityHandler
endEntity in interface IEntityHandlerpublic void beginEntityMD(String parentType)
IEntityHandler
beginEntityMD in interface IEntityHandlerparentType - The parent type of this entity, eg NODE or EDGE.public void endEntityMD()
IEntityHandler
endEntityMD in interface IEntityHandlerpublic void idKeyMD(Class type)
IEntityHandler
idKeyMD in interface IEntityHandlertype - Describe an entity ID's key.public void idKey(Object value)
IEntityHandler
idKey in interface IEntityHandlervalue - A key in an entity ID.
public void property(String name,
Object value)
IEntityHandler
property in interface IEntityHandler
public void propertyMD(String name,
Class type)
IEntityHandler
propertyMD in interface IEntityHandlerpublic void beginId(String type)
IEntityHandler
beginId in interface IEntityHandlertype - The type of entity being sent.public void endId()
IEntityHandler
endId in interface IEntityHandlerpublic void beginRelatedList(byte i)
IEntityHandler
beginRelatedList in interface IEntityHandleri - one of: FLAGS_DEFAULT, FLAG_NO_CACHEpublic void endRelatedList()
IEntityHandler
endRelatedList in interface IEntityHandler
public void beginRelatedEntity(String relation,
boolean reciprical)
IEntityHandler
beginRelatedEntity in interface IEntityHandlerrelation - either SOURCE or SINK.reciprical - should this connection go both ways? SOURCE should
always be reciprocal, and SINK should be reciprocal for a
bidirectional edge.public void endRelatedEntity()
IEntityHandler
endRelatedEntity in interface IEntityHandlerpublic void endMessage()
IEntityHandler
endMessage in interface IEntityHandlerpublic void error(Exception e)
IEntityHandler
error in interface IEntityHandlere - The cause.public void fatalError(Exception e)
IEntityHandler
fatalError in interface IEntityHandlere - The cause.public void writeTo(IEntityHandler handler)
public static void setCompatibilityMode(boolean b)
b - false to turn off compatibility mode.protected void complainClosed()
public void addEntityType(EntityType entityType)
public void removeEntityType(EntityType entityType)
public void addEntity(SourceEntity entity)
public void removeEntity(SourceEntity entity)
public void replaceEntity(int i,
SourceEntity replacement)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||