Class WSConnectionManager
- java.lang.Object
-
- com.sun.xml.ws.transport.tcp.client.WSConnectionManager
-
- All Implemented Interfaces:
ConnectionFinder<ConnectionSession>,SessionCloseListener<ConnectionSession>
public class WSConnectionManager extends Object implements ConnectionFinder<ConnectionSession>, SessionCloseListener<ConnectionSession>
- Author:
- Alexey Stashok
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortConnection(ConnectionSession connectionSession)voidcloseChannel(ChannelContext channelContext)ConnectionSessioncreateConnectionSession(WSTCPURI tcpURI)Open new tcp connection and establish service virtual connectionConnectionSessionfind(ContactInfo<ConnectionSession> contactInfo, Collection<ConnectionSession> idleConnections, Collection<ConnectionSession> busyConnections)Method that searches idleConnections and busyConnections for the best connection.voidfreeConnection(ConnectionSession connectionSession)static WSConnectionManagergetInstance()voidlockConnection(ConnectionSession connectionSession)voidnotifySessionClose(ConnectionSession connectionSession)ChannelContextopenChannel(WSTCPURI uri, WSService wsService, WSBinding wsBinding, Codec defaultCodec)
-
-
-
Method Detail
-
getInstance
public static WSConnectionManager getInstance()
-
openChannel
@NotNull public ChannelContext openChannel(@NotNull WSTCPURI uri, @NotNull WSService wsService, @NotNull WSBinding wsBinding, @NotNull Codec defaultCodec) throws InterruptedException, IOException, ServiceChannelException, VersionMismatchException
-
closeChannel
public void closeChannel(@NotNull ChannelContext channelContext)
-
lockConnection
public void lockConnection(@NotNull ConnectionSession connectionSession) throws InterruptedException, SessionAbortedException
-
freeConnection
public void freeConnection(@NotNull ConnectionSession connectionSession)
-
abortConnection
public void abortConnection(@NotNull ConnectionSession connectionSession)
-
createConnectionSession
@NotNull public ConnectionSession createConnectionSession(@NotNull WSTCPURI tcpURI) throws VersionMismatchException, ServiceChannelException
Open new tcp connection and establish service virtual connection
-
find
public ConnectionSession find(ContactInfo<ConnectionSession> contactInfo, Collection<ConnectionSession> idleConnections, Collection<ConnectionSession> busyConnections) throws IOException
Description copied from interface:ConnectionFinderMethod that searches idleConnections and busyConnections for the best connection. May return null if no best connections exists. May create a new connection and return it.- Specified by:
findin interfaceConnectionFinder<ConnectionSession>- Throws:
IOException
-
notifySessionClose
public void notifySessionClose(ConnectionSession connectionSession)
- Specified by:
notifySessionClosein interfaceSessionCloseListener<ConnectionSession>
-
-