org.sdnplatform.sync.client
Class SyncClient

java.lang.Object
  extended by org.sdnplatform.sync.client.SyncClientBase
      extended by org.sdnplatform.sync.client.SyncClient

public class SyncClient
extends SyncClientBase

A command-line tool for interacting with a remote sync service

Author:
readams

Nested Class Summary
protected  class SyncClient.DeleteCommand
          Delete command
protected  class SyncClient.EntriesCommand
           
protected  class SyncClient.GetCommand
          Get command
protected  class SyncClient.GetFullCommand
           
protected  class SyncClient.HelpCommand
          Help command
protected  class SyncClient.PutCommand
          Put command
protected static class SyncClient.QuitCommand
          Quit command
protected  class SyncClient.RegisterCommand
          Register a new store
protected  class SyncClient.StoreCommand
          Choose the store
protected static class SyncClient.SyncClientSettings
           
 
Nested classes/interfaces inherited from class org.sdnplatform.sync.client.SyncClientBase
SyncClientBase.SyncClientBaseSettings
 
Field Summary
protected  java.util.HashMap<java.lang.String,ShellCommand> commands
          Shell commands
protected  IStoreClient<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode> storeClient
          Store client for currently-active store
protected  SyncClient.SyncClientSettings syncClientSettings
          Command-line settings
 
Fields inherited from class org.sdnplatform.sync.client.SyncClientBase
err, out, settings, syncManager
 
Constructor Summary
SyncClient(SyncClient.SyncClientSettings syncClientSettings)
           
 
Method Summary
protected  boolean checkStoreSettings()
           
protected  void connect()
          Set up the remote sync manager and prepare for requests
protected  boolean executeCommandLine(java.lang.String line)
           
protected  void getStoreClient()
           
static void main(java.lang.String[] args)
           
protected  void startShell(SyncClientBase.SyncClientBaseSettings settings)
           
 
Methods inherited from class org.sdnplatform.sync.client.SyncClientBase
cleanup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commands

protected java.util.HashMap<java.lang.String,ShellCommand> commands
Shell commands


syncClientSettings

protected SyncClient.SyncClientSettings syncClientSettings
Command-line settings


storeClient

protected IStoreClient<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode> storeClient
Store client for currently-active store

Constructor Detail

SyncClient

public SyncClient(SyncClient.SyncClientSettings syncClientSettings)
Method Detail

connect

protected void connect()
                throws java.lang.Exception
Description copied from class: SyncClientBase
Set up the remote sync manager and prepare for requests

Overrides:
connect in class SyncClientBase
Throws:
java.lang.Exception

checkStoreSettings

protected boolean checkStoreSettings()

getStoreClient

protected void getStoreClient()
                       throws UnknownStoreException
Throws:
UnknownStoreException

executeCommandLine

protected boolean executeCommandLine(java.lang.String line)

startShell

protected void startShell(SyncClientBase.SyncClientBaseSettings settings)
                   throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception