All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pusher.client.util.Factory.html Maven / Gradle / Ivy

There is a newer version: 2.4.4
Show newest version





Factory (Pusher Java Websocket API)












com.pusher.client.util

Class Factory

  • java.lang.Object
    • com.pusher.client.util.Factory


  • public class Factory
    extends java.lang.Object
    This is a lightweight way of doing dependency injection and enabling classes to be unit tested in isolation. No class in this library instantiates another class directly, otherwise they would be tightly coupled. Instead, they all call the factory methods in this class when they want to create instances of another class. An instance of Factory is provided on construction to each class which may require it, the initial factory is instantiated in the Pusher constructor, the only constructor which a library consumer should need to call directly. Conventions: - any method that starts with "new", such as newPublicChannel(String) creates a new instance of that class every time it is called.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Factory() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      com.pusher.client.channel.impl.ChannelManager getChannelManager() 
      com.pusher.client.connection.impl.InternalConnection getConnection(java.lang.String apiKey, PusherOptions options) 
      java.util.concurrent.ScheduledExecutorService getTimers() 
      com.pusher.client.channel.impl.PresenceChannelImpl newPresenceChannel(com.pusher.client.connection.impl.InternalConnection connection, java.lang.String channelName, Authorizer authorizer) 
      com.pusher.client.channel.impl.PrivateChannelImpl newPrivateChannel(com.pusher.client.connection.impl.InternalConnection connection, java.lang.String channelName, Authorizer authorizer) 
      com.pusher.client.channel.impl.ChannelImpl newPublicChannel(java.lang.String channelName) 
      com.pusher.client.connection.websocket.WebSocketClientWrapper newWebSocketClientWrapper(java.net.URI uri, java.net.Proxy proxy, com.pusher.client.connection.websocket.WebSocketListener webSocketListener) 
      void queueOnEventThread(java.lang.Runnable r) 
      void shutdownThreads() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getConnection

        public com.pusher.client.connection.impl.InternalConnection getConnection(java.lang.String apiKey,
                                                                                  PusherOptions options)
      • newWebSocketClientWrapper

        public com.pusher.client.connection.websocket.WebSocketClientWrapper newWebSocketClientWrapper(java.net.URI uri,
                                                                                                       java.net.Proxy proxy,
                                                                                                       com.pusher.client.connection.websocket.WebSocketListener webSocketListener)
                                                                                                throws javax.net.ssl.SSLException
        Throws:
        javax.net.ssl.SSLException
      • getTimers

        public java.util.concurrent.ScheduledExecutorService getTimers()
      • newPublicChannel

        public com.pusher.client.channel.impl.ChannelImpl newPublicChannel(java.lang.String channelName)
      • newPrivateChannel

        public com.pusher.client.channel.impl.PrivateChannelImpl newPrivateChannel(com.pusher.client.connection.impl.InternalConnection connection,
                                                                                   java.lang.String channelName,
                                                                                   Authorizer authorizer)
      • newPresenceChannel

        public com.pusher.client.channel.impl.PresenceChannelImpl newPresenceChannel(com.pusher.client.connection.impl.InternalConnection connection,
                                                                                     java.lang.String channelName,
                                                                                     Authorizer authorizer)
      • getChannelManager

        public com.pusher.client.channel.impl.ChannelManager getChannelManager()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy