public class FastCast extends Object implements de.ruedigermoeller.serialization.FSTObjectInput.ConditionalCallback, FCRemoting
| Modifier and Type | Class and Description |
|---|---|
static class |
FastCast.ConfigurationAlreadyDefinedException |
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,FCTopicConf> |
channelConf |
protected static de.ruedigermoeller.serialization.FSTConfiguration |
conf |
protected FCClusterConfig |
config |
protected HashMap<String,FCTransportDispatcher> |
dispatcher |
static int |
HEARTBEAT |
protected HashMap<String,TopicEntry> |
topics |
protected HashMap<String,Transport> |
transports |
| Constructor and Description |
|---|
FastCast() |
| Modifier and Type | Method and Description |
|---|---|
void |
callRemoteMethod(TopicEntry topicEntry,
PacketSendBuffer sender,
int methodIndex,
Object[] args,
boolean loopback,
boolean unreliable) |
void |
finishFastCall(PacketSendBuffer sender,
de.ruedigermoeller.serialization.FSTObjectOutput fstObjectOutput) |
List<String> |
getActiveTopics() |
FCMembership |
getMemberShipLocal() |
FCMembership |
getMemberShipRemoteProxy()
returns remote FCMemberShip instance, null if none installed
|
String |
getNodeId() |
FCRemoteServiceProxy |
getRemoteService(String topic)
return the remote service proxy object.
|
static FCRemoting |
getRemoting() |
FCRemotingListener |
getRemotingListener() |
static de.ruedigermoeller.serialization.FSTConfiguration |
getSerializationConfig() |
FCTopicService |
getService(String topic)
return the local instance of a service with given name.
|
FCRemoteServiceProxy |
getServiceProxy(String topic) |
TopicStats |
getStats(String name) |
FCTopicConf |
getTopicConfiguration(String name) |
Transport |
getTransport(String name) |
FCTransportDispatcher |
getTransportDispatcher(String transName) |
boolean |
hasRemoteResult(Object[] args) |
protected void |
initTopics(FCTopicConf[] channelConfs) |
protected void |
initTransports(FCSocketConf[] tconfs,
String nodeName) |
protected void |
installService(TopicEntry topic)
setup proxy classes, instantiate service and setup internal hashmaps.
|
void |
joinCluster(FCClusterConfig conf,
String nodeId,
String clusterName) |
void |
joinCluster(String configFile,
String nodeId,
String clusterName)
joins the cluster defined by the given config.
|
de.ruedigermoeller.serialization.FSTObjectOutput |
prepareFastCall(int methodIndex,
int args) |
void |
sendBinaryContent(TopicEntry topicEntry,
PacketSendBuffer sender,
de.ruedigermoeller.heapoff.bytez.Bytez bytes,
int offset,
int length,
boolean loopback) |
void |
setNodeId(String nodeName) |
void |
setRemotingListener(FCRemotingListener listener) |
boolean |
shouldSkip(Object o,
int i,
Field field) |
void |
start(FCClusterConfig config,
String nodeName) |
void |
start(String topicName) |
void |
startReceiving(String topicName,
FCBinaryMessageListener binaryListener)
starts listening on the given topic
|
void |
startReceiving(String topicName,
FCTopicService service) |
<T extends FCTopicService> |
startSending(String topic,
Class<T> fcBinaryTopicServiceClass)
starts sending on the given topic
use this for ConfigBuilder based configs.
|
void |
stopReceiving(String topicName) |
public static final int HEARTBEAT
protected FCClusterConfig config
protected static de.ruedigermoeller.serialization.FSTConfiguration conf
protected HashMap<String,FCTransportDispatcher> dispatcher
protected HashMap<String,FCTopicConf> channelConf
protected HashMap<String,TopicEntry> topics
public static de.ruedigermoeller.serialization.FSTConfiguration getSerializationConfig()
public static FCRemoting getRemoting()
public void joinCluster(String configFile, String nodeId, String clusterName) throws IOException
FCRemotingjoinCluster in interface FCRemotingnodeId - - name of the process (will make up the adress of a node e.g. as reported in senderId). MUST NOT EXCEED 8 chars.clusterName - - see above. If null, take clustername from config. MUST NOT EXCEED 8 chars.IOExceptionpublic FCRemotingListener getRemotingListener()
getRemotingListener in interface FCRemotingpublic void setRemotingListener(FCRemotingListener listener)
setRemotingListener in interface FCRemotingpublic void joinCluster(FCClusterConfig conf, String nodeId, String clusterName)
joinCluster in interface FCRemotingpublic void start(FCClusterConfig config, String nodeName)
public void setNodeId(String nodeName)
public FCRemoteServiceProxy getServiceProxy(String topic)
public String getNodeId()
getNodeId in interface FCRemotingpublic FCTopicService getService(String topic)
FCRemotinggetService in interface FCRemotingpublic TopicStats getStats(String name)
getStats in interface FCRemotingpublic List<String> getActiveTopics()
getActiveTopics in interface FCRemotingpublic FCTopicConf getTopicConfiguration(String name)
getTopicConfiguration in interface FCRemotingpublic void startReceiving(String topicName, FCBinaryMessageListener binaryListener)
FCRemotingstartReceiving in interface FCRemotingpublic void startReceiving(String topicName, FCTopicService service)
startReceiving in interface FCRemotingpublic void start(String topicName)
start in interface FCRemotingpublic <T extends FCTopicService> T startSending(String topic, Class<T> fcBinaryTopicServiceClass) throws Exception
FCRemotingstartSending in interface FCRemotingExceptionpublic void stopReceiving(String topicName)
stopReceiving in interface FCRemotingpublic FCRemoteServiceProxy getRemoteService(String topic)
FCRemotinggetRemoteService in interface FCRemotingpublic boolean hasRemoteResult(Object[] args)
public de.ruedigermoeller.serialization.FSTObjectOutput prepareFastCall(int methodIndex,
int args)
throws IOException
IOExceptionpublic void finishFastCall(PacketSendBuffer sender, de.ruedigermoeller.serialization.FSTObjectOutput fstObjectOutput)
public void sendBinaryContent(TopicEntry topicEntry, PacketSendBuffer sender, de.ruedigermoeller.heapoff.bytez.Bytez bytes, int offset, int length, boolean loopback) throws IOException
IOExceptionpublic void callRemoteMethod(TopicEntry topicEntry, PacketSendBuffer sender, int methodIndex, Object[] args, boolean loopback, boolean unreliable) throws IOException
IOExceptionpublic FCTransportDispatcher getTransportDispatcher(String transName)
protected void initTopics(FCTopicConf[] channelConfs)
protected void installService(TopicEntry topic) throws Exception
topic - Exceptionpublic FCMembership getMemberShipRemoteProxy()
FCRemotinggetMemberShipRemoteProxy in interface FCRemotingpublic FCMembership getMemberShipLocal()
getMemberShipLocal in interface FCRemotingpublic boolean shouldSkip(Object o, int i, Field field)
shouldSkip in interface de.ruedigermoeller.serialization.FSTObjectInput.ConditionalCallbackprotected void initTransports(FCSocketConf[] tconfs, String nodeName)
Copyright © 2014. All rights reserved.