org.neo4j.com
Class Client<T>

java.lang.Object
  extended by org.neo4j.kernel.lifecycle.LifecycleAdapter
      extended by org.neo4j.com.Client<T>
All Implemented Interfaces:
org.jboss.netty.channel.ChannelPipelineFactory, org.neo4j.kernel.lifecycle.Lifecycle

public abstract class Client<T>
extends org.neo4j.kernel.lifecycle.LifecycleAdapter
implements org.jboss.netty.channel.ChannelPipelineFactory

A means for a client to communicate with a Server. It serializes requests and sends them to the server and waits for a response back.

See Also:
Server

Field Summary
static int DEFAULT_MAX_NUMBER_OF_CONCURRENT_CHANNELS_PER_CLIENT
           
static int DEFAULT_READ_RESPONSE_TIMEOUT_SECONDS
           
 
Constructor Summary
Client(String hostNameOrIp, int port, org.neo4j.kernel.logging.Logging logging, org.neo4j.kernel.monitoring.Monitors monitors, org.neo4j.kernel.impl.nioneo.store.StoreId storeId, int frameLength, byte applicationProtocolVersion, long readTimeout, int maxConcurrentChannels, int chunkSize)
           
 
Method Summary
 void addMismatchingVersionHandler(MismatchingVersionHandler toAdd)
           
protected  byte getInternalProtocolVersion()
           
 org.jboss.netty.channel.ChannelPipeline getPipeline()
           
protected  long getReadTimeout(RequestType<T> type, long readTimeout)
           
protected  org.neo4j.kernel.impl.nioneo.store.StoreId getStoreId()
           
protected
<R> Response<R>
sendRequest(RequestType<T> type, RequestContext context, Serializer serializer, Deserializer<R> deserializer)
           
protected
<R> Response<R>
sendRequest(RequestType<T> type, RequestContext context, Serializer serializer, Deserializer<R> deserializer, org.neo4j.kernel.impl.nioneo.store.StoreId specificStoreId)
           
protected  boolean shouldCheckStoreId(RequestType<T> type)
           
 void start()
           
 void stop()
           
 String toString()
           
 
Methods inherited from class org.neo4j.kernel.lifecycle.LifecycleAdapter
init, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MAX_NUMBER_OF_CONCURRENT_CHANNELS_PER_CLIENT

public static final int DEFAULT_MAX_NUMBER_OF_CONCURRENT_CHANNELS_PER_CLIENT
See Also:
Constant Field Values

DEFAULT_READ_RESPONSE_TIMEOUT_SECONDS

public static final int DEFAULT_READ_RESPONSE_TIMEOUT_SECONDS
See Also:
Constant Field Values
Constructor Detail

Client

public Client(String hostNameOrIp,
              int port,
              org.neo4j.kernel.logging.Logging logging,
              org.neo4j.kernel.monitoring.Monitors monitors,
              org.neo4j.kernel.impl.nioneo.store.StoreId storeId,
              int frameLength,
              byte applicationProtocolVersion,
              long readTimeout,
              int maxConcurrentChannels,
              int chunkSize)
Method Detail

start

public void start()
Specified by:
start in interface org.neo4j.kernel.lifecycle.Lifecycle
Overrides:
start in class org.neo4j.kernel.lifecycle.LifecycleAdapter

stop

public void stop()
Specified by:
stop in interface org.neo4j.kernel.lifecycle.Lifecycle
Overrides:
stop in class org.neo4j.kernel.lifecycle.LifecycleAdapter

sendRequest

protected <R> Response<R> sendRequest(RequestType<T> type,
                                      RequestContext context,
                                      Serializer serializer,
                                      Deserializer<R> deserializer)

sendRequest

protected <R> Response<R> sendRequest(RequestType<T> type,
                                      RequestContext context,
                                      Serializer serializer,
                                      Deserializer<R> deserializer,
                                      org.neo4j.kernel.impl.nioneo.store.StoreId specificStoreId)

getReadTimeout

protected long getReadTimeout(RequestType<T> type,
                              long readTimeout)

shouldCheckStoreId

protected boolean shouldCheckStoreId(RequestType<T> type)

getStoreId

protected org.neo4j.kernel.impl.nioneo.store.StoreId getStoreId()

getPipeline

public org.jboss.netty.channel.ChannelPipeline getPipeline()
                                                    throws Exception
Specified by:
getPipeline in interface org.jboss.netty.channel.ChannelPipelineFactory
Throws:
Exception

addMismatchingVersionHandler

public void addMismatchingVersionHandler(MismatchingVersionHandler toAdd)

getInternalProtocolVersion

protected byte getInternalProtocolVersion()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2014 The Neo4j Graph Database Project. All Rights Reserved.