Missed a couple spots under the crush of clyde warnings
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6683 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -546,7 +546,7 @@ public class PlaceManager
|
||||
_plobj.removeListener(_deathListener);
|
||||
|
||||
// clear out our invocation service registrations
|
||||
for (InvocationMarshaller marsh : _marshallers) {
|
||||
for (InvocationMarshaller<?> marsh : _marshallers) {
|
||||
_invmgr.clearDispatcher(marsh);
|
||||
}
|
||||
|
||||
@@ -815,7 +815,7 @@ public class PlaceManager
|
||||
|
||||
/** A list of services registered with {@link #addProvider} which will be automatically
|
||||
* cleared when this manager shuts down. */
|
||||
protected List<InvocationMarshaller> _marshallers = Lists.newArrayList();
|
||||
protected List<InvocationMarshaller<?>> _marshallers = Lists.newArrayList();
|
||||
|
||||
/** Used to keep a canonical copy of the occupant info records. */
|
||||
protected HashIntMap<OccupantInfo> _occInfo = new HashIntMap<OccupantInfo>();
|
||||
|
||||
@@ -115,7 +115,7 @@ public class PlaceManagerDelegate
|
||||
* Registers an invocation provider and notes the registration such that it will be
|
||||
* automatically cleared when our parent manager shuts down.
|
||||
*/
|
||||
protected <T extends InvocationMarshaller> T addProvider (
|
||||
protected <T extends InvocationMarshaller<?>> T addProvider (
|
||||
InvocationProvider prov, Class<T> mclass)
|
||||
{
|
||||
return _plmgr.addProvider(prov, mclass);
|
||||
@@ -125,7 +125,7 @@ public class PlaceManagerDelegate
|
||||
* Registers an invocation dispatcher and notes the registration such that it will be
|
||||
* automatically cleared when our parent manager shuts down.
|
||||
*/
|
||||
protected <T extends InvocationMarshaller> T addDispatcher (InvocationDispatcher<T> disp)
|
||||
protected <T extends InvocationMarshaller<?>> T addDispatcher (InvocationDispatcher<T> disp)
|
||||
{
|
||||
return _plmgr.addDispatcher(disp);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
|
||||
package com.threerings.presents.client;
|
||||
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
import java.security.PublicKey;
|
||||
import java.util.HashSet;
|
||||
|
||||
@@ -49,6 +47,8 @@ import com.threerings.presents.net.PongResponse;
|
||||
import com.threerings.presents.net.ThrottleUpdatedMessage;
|
||||
import com.threerings.presents.util.SecureUtil;
|
||||
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
/**
|
||||
* Through the client object, a connection to the system is established and maintained. The client
|
||||
* object maintains two separate threads (a reader and a writer) by which all network traffic is
|
||||
@@ -416,7 +416,7 @@ public class Client
|
||||
}
|
||||
int scount = _bstrap.services.size();
|
||||
for (int ii = 0; ii < scount; ii++) {
|
||||
InvocationService service = _bstrap.services.get(ii);
|
||||
InvocationService<?> service = _bstrap.services.get(ii);
|
||||
if (sclass.isInstance(service)) {
|
||||
return sclass.cast(service);
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
package com.threerings.presents.client;
|
||||
|
||||
import com.threerings.presents.client.InvocationReceiver.Registration;
|
||||
import com.threerings.presents.data.ClientObject;
|
||||
|
||||
/**
|
||||
* Adds a receiver registration for a client that doesn't use DObject and thereby can't
|
||||
* use the registration set on ClientObject.
|
||||
* Adds a receiver registration for a client that doesn't use DObject and thereby can't use the
|
||||
* registration set on ClientObject.
|
||||
*/
|
||||
public interface RegistrationService
|
||||
extends InvocationService<ClientObject>
|
||||
{
|
||||
void registerReceiver(Registration registration);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import com.threerings.presents.client.RegistrationService;
|
||||
*/
|
||||
@Generated(value={"com.threerings.presents.tools.cpp.GenCPPServiceTask"},
|
||||
comments="Derived from RegistrationService.java.")
|
||||
public class RegistrationMarshaller extends InvocationMarshaller
|
||||
public class RegistrationMarshaller extends InvocationMarshaller<ClientObject>
|
||||
implements RegistrationService
|
||||
{
|
||||
/** The method id used to dispatch {@link #registerReceiver} requests. */
|
||||
|
||||
@@ -41,5 +41,5 @@ public class BootstrapData extends SimpleStreamableObject
|
||||
public int clientOid;
|
||||
|
||||
/** A list of handles to invocation services. */
|
||||
public List<InvocationMarshaller> services;
|
||||
public List<InvocationMarshaller<?>> services;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
package com.threerings.presents.peer.server;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
@@ -28,9 +30,6 @@ import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.Iterables;
|
||||
@@ -38,6 +37,7 @@ import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
import com.samskivert.util.ArrayIntSet;
|
||||
import com.samskivert.util.ChainedResultListener;
|
||||
import com.samskivert.util.Interval;
|
||||
@@ -55,8 +55,6 @@ import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
import com.threerings.io.Streamable;
|
||||
|
||||
import com.threerings.presents.peer.data.DObjectAddress;
|
||||
|
||||
import com.threerings.util.Name;
|
||||
|
||||
import com.threerings.presents.annotation.PeerInvoker;
|
||||
@@ -64,16 +62,13 @@ import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.data.ClientObject;
|
||||
import com.threerings.presents.dobj.DObject;
|
||||
import com.threerings.presents.dobj.EntryAddedEvent;
|
||||
import com.threerings.presents.dobj.EntryRemovedEvent;
|
||||
import com.threerings.presents.dobj.EntryUpdatedEvent;
|
||||
import com.threerings.presents.dobj.ObjectAccessException;
|
||||
import com.threerings.presents.dobj.SetListener;
|
||||
import com.threerings.presents.dobj.Subscriber;
|
||||
import com.threerings.presents.net.DownstreamMessage;
|
||||
import com.threerings.presents.net.Message;
|
||||
import com.threerings.presents.peer.client.PeerService;
|
||||
import com.threerings.presents.peer.data.ClientInfo;
|
||||
import com.threerings.presents.peer.data.DObjectAddress;
|
||||
import com.threerings.presents.peer.data.NodeObject;
|
||||
import com.threerings.presents.peer.data.PeerAuthName;
|
||||
import com.threerings.presents.peer.data.PeerMarshaller;
|
||||
|
||||
@@ -24,7 +24,6 @@ package com.threerings.presents.peer.util;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
@@ -52,7 +51,7 @@ public class PeerUtil
|
||||
* @param svc the implementation of the corresponding subclass of {@link InvocationService}
|
||||
* @param client the client to pass to the service methods
|
||||
*/
|
||||
public static <S extends InvocationProvider, T extends InvocationService>
|
||||
public static <S extends InvocationProvider, T extends InvocationService<?>>
|
||||
S createProviderProxy (Class<S> clazz, final T svc, final Client client)
|
||||
{
|
||||
return clazz.cast(Proxy.newProxyInstance(
|
||||
|
||||
@@ -29,7 +29,7 @@ import static com.threerings.presents.Log.log;
|
||||
/**
|
||||
* Provides the base class via which invocation service requests are dispatched.
|
||||
*/
|
||||
public abstract class InvocationDispatcher<T extends InvocationMarshaller>
|
||||
public abstract class InvocationDispatcher<T extends InvocationMarshaller<?>>
|
||||
implements InvocationManager.Dispatcher
|
||||
{
|
||||
/** The invocation provider for whom we're dispatching. */
|
||||
|
||||
@@ -107,7 +107,7 @@ public class InvocationManager
|
||||
* @param provider the provider to be registered.
|
||||
* @param mclass the class of the invocation marshaller generated for the service.
|
||||
*/
|
||||
public <T extends InvocationMarshaller> T registerProvider (
|
||||
public <T extends InvocationMarshaller<?>> T registerProvider (
|
||||
InvocationProvider provider, Class<T> mclass)
|
||||
{
|
||||
return registerProvider(provider, mclass, null);
|
||||
@@ -123,7 +123,7 @@ public class InvocationManager
|
||||
* groups. You must collect shared marshaller into as fine grained a set of groups as necessary
|
||||
* and have different types of clients specify the list of groups they need.
|
||||
*/
|
||||
public <T extends InvocationMarshaller> T registerProvider (
|
||||
public <T extends InvocationMarshaller<?>> T registerProvider (
|
||||
final InvocationProvider provider, Class<T> mclass, String group)
|
||||
{
|
||||
_omgr.requireEventThread(); // sanity check
|
||||
@@ -238,7 +238,7 @@ public class InvocationManager
|
||||
*
|
||||
* @param dispatcher the dispatcher to be registered.
|
||||
*/
|
||||
public <T extends InvocationMarshaller> T registerDispatcher (
|
||||
public <T extends InvocationMarshaller<?>> T registerDispatcher (
|
||||
InvocationDispatcher<T> dispatcher)
|
||||
{
|
||||
return registerDispatcher(dispatcher, null);
|
||||
@@ -247,7 +247,7 @@ public class InvocationManager
|
||||
/**
|
||||
* @deprecated use {@link #registerDispatcher(InvocationDispatcher)}.
|
||||
*/
|
||||
@Deprecated public <T extends InvocationMarshaller> T registerDispatcher (
|
||||
@Deprecated public <T extends InvocationMarshaller<?>> T registerDispatcher (
|
||||
InvocationDispatcher<T> dispatcher, boolean bootstrap)
|
||||
{
|
||||
return registerDispatcher(dispatcher, null);
|
||||
@@ -263,7 +263,7 @@ public class InvocationManager
|
||||
* groups. You must collect shared dispatchers into as fine grained a set of groups as
|
||||
* necessary and have different types of clients specify the list of groups they need.
|
||||
*/
|
||||
public <T extends InvocationMarshaller> T registerDispatcher (
|
||||
public <T extends InvocationMarshaller<?>> T registerDispatcher (
|
||||
InvocationDispatcher<T> dispatcher, String group)
|
||||
{
|
||||
_omgr.requireEventThread(); // sanity check
|
||||
@@ -294,7 +294,7 @@ public class InvocationManager
|
||||
* Clears out a dispatcher registration. This should be called to free up resources when an
|
||||
* invocation service is no longer going to be used.
|
||||
*/
|
||||
public void clearDispatcher (InvocationMarshaller marsh)
|
||||
public void clearDispatcher (InvocationMarshaller<?> marsh)
|
||||
{
|
||||
_omgr.requireEventThread(); // sanity check
|
||||
|
||||
@@ -312,9 +312,9 @@ public class InvocationManager
|
||||
/**
|
||||
* Constructs a list of all bootstrap services registered in any of the supplied groups.
|
||||
*/
|
||||
public List<InvocationMarshaller> getBootstrapServices (String[] bootGroups)
|
||||
public List<InvocationMarshaller<?>> getBootstrapServices (String[] bootGroups)
|
||||
{
|
||||
List<InvocationMarshaller> services = Lists.newArrayList();
|
||||
List<InvocationMarshaller<?>> services = Lists.newArrayList();
|
||||
for (String group : bootGroups) {
|
||||
services.addAll(_bootlists.get(group));
|
||||
}
|
||||
@@ -450,7 +450,7 @@ public class InvocationManager
|
||||
protected IntMap<Dispatcher> _dispatchers = IntMaps.newHashIntMap();
|
||||
|
||||
/** Maps bootstrap group to lists of services to be provided to clients at boot time. */
|
||||
protected Multimap<String, InvocationMarshaller> _bootlists = ArrayListMultimap.create();
|
||||
protected Multimap<String, InvocationMarshaller<?>> _bootlists = ArrayListMultimap.create();
|
||||
|
||||
/** Tracks recently registered services so that we can complain informatively if a request
|
||||
* comes in on a service we don't know about. */
|
||||
|
||||
Reference in New Issue
Block a user