In general, you don't need to write a Metadata Adapter in order to run a simple demo, like the StockListDemo or the Hello World demo, as leaning on the LiteralBasedProvider is enough.
The Metadata Adapter is needed only when the application involves more complex use cases, like:
- user identification;
- handling messages sent by the client.

This is the case for the Chat Demo.
User identification is needed to associate each client to an identity in the chat room;
usually, user indentification involves the notifyUser method;
we kept it simple and used notifyNewSession instead, which yields information on the client context that we could use to identify her (this also involves using notifySessionClose).
Processing client-originated messages is obviously needed, in order to push them to all other clients in the chat room; this involves notifyUserMessage.

The only other important method is modeMayBeAllowed;
In the Chat Demo Metadata Adapter, we lean on the implementation in the base class (LiteralBasedProvider), which requires suitable configuration parameters (look for "item_family" in DOCS-SDKs\sdk_adapter_java\examples\Chat_Adapters\Deplo yment_LS\Chat\adapters.xml).

All other methods of the Metadata Adapter deal with restrictions on what users can get and should be taken into consideration only for production deployment.

On the Data Adapter side, all methods are important, as they deal with real-time update delivery.
The Chat Demo has the further complication that the Metadata Adapter and the Data Adapter have to communicate to each other, because the real-time updates to be pushed are based on the client-originated messages.

You can deploy the Adapters either as class files or as jars.