|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--amwebarsentitlementservice.protocol.ProtocolTable
Field Summary | |
static java.lang.String |
PROTOCOL_TABLE_XML_NAME
|
Constructor Summary | |
protected |
ProtocolTable()
|
Method Summary | |
void |
clear()
Removes all elements of the ProtocolTable. |
protected java.lang.Object |
clone()
It isn't permited to clone the object: The clone method throws the CloneNotSupportedException. |
boolean |
containsProtocolID(java.lang.String protocol_id)
Tests whether a Protocol prototype with given protocol_id is contained in the ProtocolTable. |
boolean |
containsProtocolPrototype(AMWebARSProtocol protocol_prototype)
Tests whether a protocol prototype is contained in the ProtocolTable. |
boolean |
equals(java.lang.Object other_object)
Tests whether this ProtocolTable is equal to another. |
void |
fromXML(org.jdom.Document xml_protocol_table)
Updates the ProtocolTable from an XML datastructure. |
AMWebARSProtocol |
generateProtocol(java.lang.String protocol_id)
Returns an instance of the Protocol with a given protocol_id. |
static ProtocolTable |
getInstance()
Returns the only instance of the ProtocolTable. |
AMWebARSProtocol |
getProtocolPrototype(java.lang.String protocol_id)
Returns the prototype of the Protocol with a given protocol_id. |
void |
initProtocols()
Initializes the AMWebARSProtocols of the Protocoltable. |
boolean |
isEmpty()
Tests whether this Table contains no Protocols. |
java.util.Enumeration |
keys()
Returns the Enumeration of all protocol_ids of the table. |
void |
load(java.io.InputStream in)
Loads the ProviderTable from an input stream. |
AMWebARSProtocol |
registerProtocolPrototype(AMWebARSProtocol protocol_prototype)
Registers a new prototype of Protocol in the ProtocolTable. |
AMWebARSProtocol |
removeProtocolPrototype(AMWebARSProtocol protocol_protoype)
Removes a Protocol prototype from the ProtocolTable. |
AMWebARSProtocol |
removeProtocolPrototype(java.lang.String protocol_id)
Removes a Protocol prototype with given protocol_id from the ProtocolTable. |
int |
size()
Returns the size of the table that means the number of protocol stored in it. |
void |
store(java.io.OutputStream out)
Stores the ProviderTable into an output stream. |
java.lang.String |
toString()
|
org.jdom.Document |
toXML()
Translates the ProtocolTable to XML. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PROTOCOL_TABLE_XML_NAME
Constructor Detail |
protected ProtocolTable()
Method Detail |
public static ProtocolTable getInstance()
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- public AMWebARSProtocol getProtocolPrototype(java.lang.String protocol_id) throws java.util.NoSuchElementException
protocol_id
- String ID of the protocoljava.util.NoSuchElementException
- If the protocol isn't found.public AMWebARSProtocol generateProtocol(java.lang.String protocol_id) throws java.util.NoSuchElementException, java.lang.CloneNotSupportedException
protocol_id
- String ID of the protocoljava.util.NoSuchElementException
- If the protocol isn't found.java.lang.CloneNotSupportedException
- If the Protocol doesn't support cloningpublic AMWebARSProtocol registerProtocolPrototype(AMWebARSProtocol protocol_prototype)
protocol_prototype
- Protocol that is registered.public AMWebARSProtocol removeProtocolPrototype(java.lang.String protocol_id) throws java.util.NoSuchElementException
String
- protocol_id of the Protocol to be removedjava.util.NoSuchElementException
- if the Protocol isn't foundpublic AMWebARSProtocol removeProtocolPrototype(AMWebARSProtocol protocol_protoype) throws java.util.NoSuchElementException
protocol
- Protocol prototype to be removedjava.util.NoSuchElementException
- if the Protocol isn't foundpublic boolean containsProtocolPrototype(AMWebARSProtocol protocol_prototype)
protocol_prototype
- Protocol to be looked for.NullPointerException
- if the parameter is nullpublic boolean containsProtocolID(java.lang.String protocol_id)
protocol_id
- String ID of the Protocol prototype to be looked for.NullPointerException
- if the parameter is nullpublic java.util.Enumeration keys()
public int size()
public boolean isEmpty()
public void clear()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other_object)
equals
in class java.lang.Object
public void initProtocols() throws ProtocolLoadException
ProtocolLoadException
- if the XML file couldn't be accessed or an error in
the instantiation of the protocols occured.public org.jdom.Document toXML()
public void fromXML(org.jdom.Document xml_protocol_table) throws sun.io.MalformedInputException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
xml_protocol_table
- Document that describes the table.public void load(java.io.InputStream in) throws java.io.IOException, org.jdom.JDOMException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
in
- InputStreampublic void store(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |