Twitch SDK (Internal)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ttv::binding::java::JavaSocketFactory Class Reference

#include <java_socket.h>

Inheritance diagram for ttv::binding::java::JavaSocketFactory:
ttv::ISocketFactory ttv::binding::java::JavaSocketFactoryBase

Public Member Functions

 JavaSocketFactory (JNIEnv *jEnv, jobject jInstance)
 
virtual ~JavaSocketFactory ()
 
virtual bool IsProtocolSupported (const std::string &protocol) override
 
virtual TTV_ErrorCode CreateSocket (const std::string &uri, std::shared_ptr< ISocket > &result) override
 
GlobalJavaObjectReferenceGetJavaInstance ()
 

Protected Member Functions

TTV_ErrorCode CreateSocket (const std::string &uri, jobject &result)
 

Protected Attributes

GlobalJavaObjectReference mJavaInstance
 The java implementation of the factory. More...
 

Constructor & Destructor Documentation

◆ JavaSocketFactory()

ttv::binding::java::JavaSocketFactory::JavaSocketFactory ( JNIEnv *  jEnv,
jobject  jInstance 
)

◆ ~JavaSocketFactory()

virtual ttv::binding::java::JavaSocketFactory::~JavaSocketFactory ( )
virtual

Member Function Documentation

◆ CreateSocket() [1/2]

TTV_ErrorCode ttv::binding::java::JavaSocketFactoryBase::CreateSocket ( const std::string &  uri,
jobject &  result 
)
protectedinherited

◆ CreateSocket() [2/2]

virtual TTV_ErrorCode ttv::binding::java::JavaSocketFactory::CreateSocket ( const std::string &  uri,
std::shared_ptr< ISocket > &  result 
)
overridevirtual

Attempts to create an ISocket instance that supports the given URI.

See also
ttv::RegisterSocketFactory
Parameters
[in]uriThe full uri to create the socket for.
[out]resultThe resulting ISocket instance if it was able to be created.
Returns
  • TTV_EC_SUCCESS: The result has been populated with an ISocket instance to use.
  • TTV_EC_UNIMPLEMENTED: This factory does not support the protocol.

Implements ttv::ISocketFactory.

◆ GetJavaInstance()

GlobalJavaObjectReference& ttv::binding::java::JavaSocketFactoryBase::GetJavaInstance ( )
inlineinherited

◆ IsProtocolSupported()

virtual bool ttv::binding::java::JavaSocketFactory::IsProtocolSupported ( const std::string &  protocol)
overridevirtual

Determines if this factory supports the given protocol. If the factory claims that is supports the given protocol then it must return a valid ISocket instance from CreateSocket().

Parameters
[in]protocolThe protocol to check support for.
Returns
true if the protocol is supported, false otherwise.

Implements ttv::ISocketFactory.

Member Data Documentation

◆ mJavaInstance

GlobalJavaObjectReference ttv::binding::java::JavaSocketFactoryBase::mJavaInstance
protectedinherited

The java implementation of the factory.


The documentation for this class was generated from the following file: