| 1 |
package org.astrogrid.samp.gui; |
| 2 |
|
| 3 |
import java.util.List; |
| 4 |
import java.util.Map; |
| 5 |
import org.astrogrid.samp.Metadata; |
| 6 |
import org.astrogrid.samp.RegInfo; |
| 7 |
import org.astrogrid.samp.Response; |
| 8 |
import org.astrogrid.samp.Subscriptions; |
| 9 |
import org.astrogrid.samp.client.CallableClient; |
| 10 |
import org.astrogrid.samp.client.HubConnection; |
| 11 |
import org.astrogrid.samp.client.SampException; |
| 12 |
|
| 13 |
/** |
| 14 |
* HubConnection implementation which delegates all behaviour to a base |
| 15 |
* implementation. Intended for subclassing. |
| 16 |
* |
| 17 |
* @author Mark Taylor |
| 18 |
* @since 24 Nov 2008 |
| 19 |
*/ |
| 20 |
class WrapperHubConnection implements HubConnection { |
| 21 |
private final HubConnection base_; |
| 22 |
|
| 23 |
public WrapperHubConnection( HubConnection base ) { |
| 24 |
base_ = base; |
| 25 |
} |
| 26 |
|
| 27 |
public RegInfo getRegInfo() { |
| 28 |
return base_.getRegInfo(); |
| 29 |
} |
| 30 |
|
| 31 |
public void setCallable( CallableClient callable ) throws SampException { |
| 32 |
base_.setCallable( callable ); |
| 33 |
} |
| 34 |
|
| 35 |
public void ping() throws SampException { |
| 36 |
base_.ping(); |
| 37 |
} |
| 38 |
|
| 39 |
public void unregister() throws SampException { |
| 40 |
base_.unregister(); |
| 41 |
} |
| 42 |
|
| 43 |
public void declareMetadata( Map meta ) throws SampException { |
| 44 |
base_.declareMetadata( meta ); |
| 45 |
} |
| 46 |
|
| 47 |
public Metadata getMetadata( String clientId ) throws SampException { |
| 48 |
return base_.getMetadata( clientId ); |
| 49 |
} |
| 50 |
|
| 51 |
public void declareSubscriptions( Map subs ) throws SampException { |
| 52 |
base_.declareSubscriptions( subs ); |
| 53 |
} |
| 54 |
|
| 55 |
public Subscriptions getSubscriptions( String clientId ) |
| 56 |
throws SampException { |
| 57 |
return base_.getSubscriptions( clientId ); |
| 58 |
} |
| 59 |
|
| 60 |
public String[] getRegisteredClients() throws SampException { |
| 61 |
return base_.getRegisteredClients(); |
| 62 |
} |
| 63 |
|
| 64 |
public Map getSubscribedClients( String mtype ) throws SampException { |
| 65 |
return base_.getSubscribedClients( mtype ); |
| 66 |
} |
| 67 |
|
| 68 |
public void notify( String recipientId, Map msg ) throws SampException { |
| 69 |
base_.notify( recipientId, msg ); |
| 70 |
} |
| 71 |
|
| 72 |
public List notifyAll( Map msg ) throws SampException { |
| 73 |
return base_.notifyAll( msg ); |
| 74 |
} |
| 75 |
|
| 76 |
public String call( String recipientId, String msgTag, Map msg ) |
| 77 |
throws SampException { |
| 78 |
return base_.call( recipientId, msgTag, msg ); |
| 79 |
} |
| 80 |
|
| 81 |
public Map callAll( String msgTag, Map msg ) throws SampException { |
| 82 |
return base_.callAll( msgTag, msg ); |
| 83 |
} |
| 84 |
|
| 85 |
public Response callAndWait( String recipientId, Map msg, int timeout ) |
| 86 |
throws SampException { |
| 87 |
return base_.callAndWait( recipientId, msg, timeout ); |
| 88 |
} |
| 89 |
|
| 90 |
public void reply( String msgId, Map response ) throws SampException { |
| 91 |
base_.reply( msgId, response ); |
| 92 |
} |
| 93 |
} |