org.caleigo.service
Class ServiceProviderServer

java.lang.Object
  extended byorg.caleigo.service.ServiceProviderServer
All Implemented Interfaces:
ITunnelServerListener

public class ServiceProviderServer
extends java.lang.Object
implements ITunnelServerListener

ServiceProviderServer is a singleton class that allows remote service providers to connect to the local ServiceProvider.

Version:
1.00
Author:
Mattias Hagstrand

Nested Class Summary
protected  class ServiceProviderServer.MessageConsumer
           
 
Field Summary
protected  java.util.Hashtable mMessageConsumers
           
protected  java.util.List mTunnelServers
           
protected static ServiceProviderServer sInstance
           
 
Constructor Summary
protected ServiceProviderServer()
           
 
Method Summary
 void addTunnelServer(ITunnelServer tunnelServer)
          Adds an ITunnelServer that should be used to receive connections to this ServiceProviderServer.
static ServiceProviderServer getInstance()
           
 void removeTunnelServer(ITunnelServer tunnelServer)
          Removes an ITunnelServer and closes all connections that were set up with the use of the tunnel server.
 void tunnelAdded(TunnelServerEvent event)
           
 void tunnelRemoved(TunnelServerEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sInstance

protected static ServiceProviderServer sInstance

mTunnelServers

protected java.util.List mTunnelServers

mMessageConsumers

protected java.util.Hashtable mMessageConsumers
Constructor Detail

ServiceProviderServer

protected ServiceProviderServer()
Method Detail

getInstance

public static ServiceProviderServer getInstance()

addTunnelServer

public void addTunnelServer(ITunnelServer tunnelServer)
Adds an ITunnelServer that should be used to receive connections to this ServiceProviderServer.


removeTunnelServer

public void removeTunnelServer(ITunnelServer tunnelServer)
Removes an ITunnelServer and closes all connections that were set up with the use of the tunnel server.

Note that this will cause all services that were connected to this ServiceProviderServer through one of the closed connections to fail.


tunnelAdded

public void tunnelAdded(TunnelServerEvent event)
Specified by:
tunnelAdded in interface ITunnelServerListener

tunnelRemoved

public void tunnelRemoved(TunnelServerEvent event)
Specified by:
tunnelRemoved in interface ITunnelServerListener


Copyright © 2005 Caleigo. All Rights Reserved.