void JavaCionStubGen::OnFiniGen(std::ofstream& stream) {}
void JavaCionStubGen::GenInterface(std::ofstream& stream, const Interface& iface) {
- stream << "public final class " << iface.GetID()
+ stream << "public class " << iface.GetID()
<< " extends ServerBase ";
GenBrace(stream, TAB_SIZE * 0, [&]() {
stream << ReplaceAll(CB_DATA_MEMBERS, "<VERSION>", FULLVER);
/**
* Abstract class for making a service
*/
- public abstract class ServiceBase {
+ public static abstract class ServiceBase {
private String mServiceName;
private String mDisplayName;
private ServerBase mServerBase;
/**
+ * Gets server object
+ * @return Server object
+ */
+ public ServerBase getServer() {
+ return mServerBase;
+ }
+
+ /**
* Gets service name
* @return Service name
*/
- public String getmServiceName() {
+ public String getServiceName() {
return mServiceName;
}
* Gets display name
* @return Display name
*/
- public String getmDisplayName() {
+ public String getDisplayName() {
return mDisplayName;
}
* Gets client information
* @return Client information
*/
- public PeerInfo getmClient() {
+ public PeerInfo getClient() {
return mClient;
}
return;
}
} catch (Exception e) {
+ e.printStackTrace();
return;
}
}
return returnData;
} catch (Exception e) {
+ e.printStackTrace();
return returnData;
}
}
final Object o = mServiceType.newInstance();
s = (ServiceBase) o;
} catch (Exception e) {
+ e.printStackTrace();
return;
}
s.mDisplayName = getDisplayName();
s.mConnectionRequestClient = peerInfo;
s.mServerBase = this;
- s.onConnectionRequest();
mServices.add(s);
+ s.onConnectionRequest();
}
)__java_cb";