Public Member Functions |
| | XmlRpcInterface () |
| | ~XmlRpcInterface () |
| virtual void | initializeApp (int stage) |
| | initializes derived class-attributes
|
| virtual void | handleMessage (cMessage *msg) |
| | The "main loop".
|
| void | handleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &) |
| | This method is called if an RPC timeout has been reached.
|
| void | deliverTunneledMessage (const BinaryValue &payload) |
| void | localLookup (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
| void | lookup (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
| void | p2pnsRegister (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
| void | p2pnsResolve (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
| void | put (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
| void | get (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
| void | dumpDht (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
| void | joinOverlay (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
| | BaseApp () |
| virtual | ~BaseApp () |
| | virtual destructor
|
| | BaseRpc () |
| const NodeHandle & | getThisNode () |
| | Returns the NodeHandle of this node.
|
| simtime_t | getUdpTimeout () |
| virtual | ~RpcListener () |
| | destructor
|
| virtual void | socketDataArrived (int connId, void *yourPtr, cPacket *msg, bool urgent) |
| virtual void | socketEstablished (int connId, void *yourPtr) |
| virtual void | socketPeerClosed (int connId, void *yourPtr) |
| virtual void | socketFailure (int connId, void *yourPtr, int code) |
| virtual void | socketStatusArrived (int connId, void *yourPtr, TCPStatusInfo *status) |
| | XmlRpcServer () |
| | Create a server object.
|
| virtual | ~XmlRpcServer () |
| | Destructor.
|
| void | enableIntrospection (bool enabled=true) |
| | Specify whether introspection is enabled or not. Default is not enabled.
|
| void | addMethod (XmlRpcServerMethod *method) |
| | Add a command to the RPC server.
|
| void | removeMethod (XmlRpcServerMethod *method) |
| | Remove a command from the RPC server.
|
| void | removeMethod (const std::string &methodName) |
| | Remove a command from the RPC server by name.
|
| XmlRpcServerMethod * | findMethod (const std::string &name) const |
| | Look up a method by name.
|
| bool | bindAndListen (int port, int backlog=5) |
| | Create a socket, bind to the specified port, and set it in listen mode to make it available for clients.
|
| int | getPort (void) const |
| | Get the port number this server is listening on.
|
| void | work (double msTime) |
| | Process client requests for the specified time.
|
| void | exit () |
| | Temporarily stop processing client requests and exit the work() method.
|
| void | shutdown () |
| | Close all connections with clients and the socket file descriptor.
|
| void | listMethods (XmlRpcValue &result) |
| | Introspection support.
|
| virtual std::string | executeRequest (std::string const &request) |
| | Parses the request xml, runs the method, generates the response (header+xml).
|
| virtual unsigned | handleEvent (unsigned eventType) |
| | Handle client connection requests.
|
| virtual void | removeConnection (XmlRpcServerConnection *) |
| | Remove a connection from the dispatcher.
|
| | XmlRpcSource (int fd=-1, bool deleteOnClose=false) |
| | Constructor.
|
| virtual | ~XmlRpcSource () |
| | Destructor.
|
| int | getfd () const |
| | Return the file descriptor being monitored.
|
| void | setfd (int fd) |
| | Specify the file descriptor to monitor.
|
| bool | getKeepOpen () const |
| | Return whether the file descriptor should be kept open if it is no longer monitored.
|
| void | setKeepOpen (bool b=true) |
| | Specify whether the file descriptor should be kept open if it is no longer monitored.
|
| virtual void | close () |
| | Close the owned fd. If deleteOnClose was specified at construction, the object is deleted.
|
Protected Member Functions |
| bool | readHeader (char *buf, uint32_t length) |
| | Reads the http header.
|
| bool | readRequest (char *buf, uint32_t length) |
| | Reads the request (based on the content-length header value)
|
| bool | writeResponse () |
| | Executes the request and writes the resulting response.
|
| bool | isPrivileged () |
| | Check if the connected application is allowed to call privileged methods.
|
| void | handleAppTunPacket (char *buf, uint32_t len) |
| void | handleRealworldPacket (char *buf, uint32_t len) |
| void | handleCommonAPIPacket (cMessage *msg) |
| void | handleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt) |
| | This method is called if an RPC response has been received.
|
| void | resetConnectionState () |
| | Reset the internal connection state.
|
| void | closeConnection () |
| void | sendInternalRpcWithTimeout (CompType destComp, BaseCallMessage *call) |
| virtual void | handleReadyMessage (CompReadyMessage *msg) |
| | method to handle ready messages from the overlay
|
| int | numInitStages () const |
| | method to set InitStage
|
| void | initialize (int stage) |
| | initializes base class-attributes
|
| virtual void | receiveChangeNotification (int category, const cPolymorphic *details) |
| | callback-method for events at the NotificationBoard
|
| virtual void | handleTransportAddressChangedNotification () |
| | This method gets call if the node has a new TransportAddress (IP address) because he changed his access network.
|
| virtual void | handleNodeLeaveNotification () |
| | This method gets call **.gracefulLeaveDelay seconds before it is killed.
|
| virtual void | handleNodeGracefulLeaveNotification () |
| | This method gets call **.gracefulLeaveDelay seconds before it is killed if this node is among the gracefulLeaveProbability nodes.
|
| void | finish () |
| | collects statistical data
|
| virtual void | finishApp () |
| | collects statistical data of derived app
|
| void | callRoute (const OverlayKey &key, cPacket *msg, const TransportAddress &hint=TransportAddress::UNSPECIFIED_NODE, RoutingType routingType=DEFAULT_ROUTING) |
| | Common API function: calls route-method in overlay.
|
| void | callRoute (const OverlayKey &key, cPacket *msg, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType=DEFAULT_ROUTING) |
| virtual void | deliver (OverlayKey &key, cMessage *msg) |
| | Common API function: handles delivered messages from overlay.
|
| virtual void | forward (OverlayKey *key, cPacket **msg, NodeHandle *nextHopNode) |
| | Common API function: handles messages from overlay to be forwarded.
|
| virtual void | update (const NodeHandle &node, bool joined) |
| | Common API function: informs application about neighbors and own nodeID.
|
| NodeVector * | callLocalLookup (const OverlayKey &key, int num, bool safe) |
| | Common API function: produces a list of nodes that can be used as next hops towards key.
|
| NodeVector * | callNeighborSet (int num) |
| | Common API function: produces a list of neighbor nodes.
|
| bool | isSiblingFor (const NodeHandle &node, const OverlayKey &key, int numSiblings, bool *err) |
| | Query if a node is among the siblings for a given key.
|
| virtual void | handleLowerMessage (cMessage *msg) |
| | processes self-messages
|
| virtual void | handleUpperMessage (cMessage *msg) |
| | handleUpperMessage gets called of handleMessage(cMessage* msg) if msg arrivedOn from_upperTier (currently msg gets deleted in this function)
|
| virtual void | handleUDPMessage (cMessage *msg) |
| | method to handle messages that come directly from the UDP gate
|
| virtual void | bindToPort (int port) |
| | Tells UDP we want to get all packets arriving on the given port.
|
| virtual void | sendMessageToUDP (const TransportAddress &destAddr, cPacket *msg, simtime_t delay=SIMTIME_ZERO) |
| | Sends a packet over UDP.
|
| virtual void | handleTraceMessage (cMessage *msg) |
| | handleTraceMessage gets called of handleMessage(cMessage* msg) if a message arrives at trace_in.
|
| void | sendMessageToLowerTier (cPacket *msg) |
| | sends non-commonAPI message to the lower tier
|
| bool | internalHandleRpcCall (BaseCallMessage *msg) |
| | Handles internal rpc requests.
|
| void | internalHandleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt) |
| | Handles rpc responses internal in base classes
|
| void | internalSendRouteRpc (BaseRpcMessage *message, const OverlayKey &destKey, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType) |
| virtual CompType | getThisCompType () |
| | Return the component type of this module.
|
| void | sendReadyMessage (bool ready=true, const OverlayKey &nodeId=OverlayKey::UNSPECIFIED_KEY) |
| virtual void | internalHandleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey) |
| | Handles rpc timeouts internal in base classes
|
| void | initRpcs () |
| | Initializes Remote-Procedure state.
|
| void | finishRpcs () |
| | Deinitializes Remote-Procedure state.
|
| virtual void | internalHandleRpcMessage (BaseRpcMessage *msg) |
| | Handles incoming rpc messages and delegates them to the corresponding listeners or handlers.
|
| uint32_t | sendRouteRpcCall (CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
| | Routes a Remote-Procedure-Call message to an OverlayKey.
|
| uint32_t | sendRouteRpcCall (CompType destComp, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
| | Routes a Remote-Procedure-Call message to an OverlayKey.
|
| uint32_t | sendRouteRpcCall (CompType destComp, const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
| | Sends a Remote-Procedure-Call message using the overlay's UDP port
This replaces ROUTE_DIRECT calls!
|
| uint32_t | sendUdpRpcCall (const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
| | Sends a Remote-Procedure-Call message to the underlay
|
| uint32_t | sendInternalRpcCall (CompType destComp, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
| | Sends an internal Remote-Procedure-Call between two tiers
|
| void | cancelRpcMessage (uint32_t nonce) |
| | Cancels a Remote-Procedure-Call.
|
| void | cancelAllRpcs () |
| | Cancels all RPCs.
|
| void | sendRpcResponse (TransportType transportType, CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *call, BaseResponseMessage *response) |
| | Send Remote-Procedure response message and deletes call message.
|
| void | sendRpcResponse (BaseCallMessage *call, BaseResponseMessage *response) |
| | Send Remote-Procedure response message to UDP and deletes call message.
|
| int | pingNode (const TransportAddress &dest, simtime_t timeout=-1, int retries=0, cPolymorphic *context=NULL, const char *caption="PING", RpcListener *rpcListener=NULL, int rpcId=-1, TransportType transportType=INVALID_TRANSPORT) |
| | ping a node by its TransportAddress
|
| virtual bool | handleRpcCall (BaseCallMessage *msg) |
| | Processes Remote-Procedure-Call invocation messages.
|
| virtual void | pingResponse (PingResponse *pingResponse, cPolymorphic *context, int rpcId, simtime_t rtt) |
| virtual void | pingTimeout (PingCall *pingCall, const TransportAddress &dest, cPolymorphic *context, int rpcId) |
| bool | internalHandleMessage (cMessage *msg) |
| virtual void | handleRpcResponse (BaseResponseMessage *msg, const RpcState &rpcState, simtime_t rtt) |
| | This method is called if an RPC response has been received.
|
| virtual void | handleRpcTimeout (const RpcState &rpcState) |
| | This method is called if an RPC timeout has been reached.
|
| void | handleTCPMessage (cMessage *msg) |
| | Member function to handle incoming TCP messages.
|
| void | bindAndListenTcp (int port) |
| | Member function to bind service to the specified port and listen afterwards.
|
| bool | isAlreadyConnected (TransportAddress address) |
| | Member function to check if the service is already connected.
|
| void | establishTcpConnection (TransportAddress address) |
| | Member function to establish a connection to the specified node.
|
| void | sendTcpData (cPacket *msg, TransportAddress address) |
| | Member function to send TCP data to the specified node.
|
| virtual void | handleConnectionEvent (EvCode code, TransportAddress address) |
| | Member function to handle passive connection events.
|
| virtual void | handleDataReceived (TransportAddress address, cPacket *msg, bool urgent) |
| | Member function to handle incoming data.
|
| virtual void | handleIncomingConnection (TransportAddress address) |
| | Member function to handle newly opened connections.
|
| void | closeTcpConnection (TransportAddress address) |
| | Member function to close an established connection.
|
| void | setTcpOut (cGate *gate) |
| | Member function to set local gate towards the TCP module during init phase.
|
| cGate * | getTcpOut () |
| | Member function to get local gate towards the TCP module.
|
| virtual void | acceptConnection () |
| | Accept a client connection request.
|
| virtual XmlRpcServerConnection * | createConnection (int socket) |
| | Create a new connection object for processing requests from a specific client.
|
| virtual void | dispatchConnection (XmlRpcServerConnection *sc) |
| | Hand off a new connection object to a dispatcher.
|
| std::string | parseRequest (std::string const &request, XmlRpcValue ¶ms) |
| | Parse the methodName and parameters from the request.
|
| bool | executeMethod (const std::string &methodName, XmlRpcValue ¶ms, XmlRpcValue &result) |
| | Execute a named method with the specified params.
|
| bool | executeMulticall (const std::string &methodName, XmlRpcValue ¶ms, XmlRpcValue &result) |
| | Execute multiple calls and return the results in an array.
|
| std::string | generateResponse (std::string const &resultXml) |
| | Construct a response from the result XML.
|
| std::string | generateFaultResponse (std::string const &msg, int errorCode=-1) |
| | Construct a fault response.
|
| std::string | generateHeader (std::string const &body) |
| | Return the appropriate headers for the response.
|