当前位置: 首页>>代码示例>>Java>>正文


Java UpnpServiceConfiguration类代码示例

本文整理汇总了Java中org.fourthline.cling.UpnpServiceConfiguration的典型用法代码示例。如果您正苦于以下问题:Java UpnpServiceConfiguration类的具体用法?Java UpnpServiceConfiguration怎么用?Java UpnpServiceConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UpnpServiceConfiguration类属于org.fourthline.cling包,在下文中一共展示了UpnpServiceConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
protected UpnpServiceConfiguration createConfiguration() {
    return new ArchosUpnpServiceConfiguration() {

        @Override
        public StreamClient createStreamClient() throws InitializationException {
            // Use Jetty
            return new ArchosStreamClientImpl(
                    new StreamClientConfigurationImpl(
                            getSyncProtocolExecutorService()
                    ) {
                        @Override
                        public String getUserAgentValue(int majorVersion, int minorVersion) {
                            // TODO: UPNP VIOLATION: Synology NAS requires User-Agent to contain
                            // "Android" to return DLNA protocolInfo required to stream to Samsung TV
                            // see: http://two-play.com/forums/viewtopic.php?f=6&t=81
                            ServerClientTokens tokens = new ServerClientTokens(majorVersion, minorVersion);
                            tokens.setOsName("Android");
                            tokens.setOsVersion(Build.VERSION.RELEASE);
                            return tokens.toString();
                        }
                    }
            );
        }
    };
}
 
开发者ID:archos-sa,项目名称:aos-MediaLib,代码行数:26,代码来源:ArchosUpnpServiceImpl.java

示例2: createServiceConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
private UpnpServiceConfiguration createServiceConfiguration() {
    return new DefaultUpnpServiceConfiguration() {
        @Override
        public DeviceDescriptorBinder getDeviceDescriptorBinderUDA10() {
            return new SempDeviceDescriptorBinderImpl(this, sempServerUrl);
        }

        @Override
        public StreamClient createStreamClient() {
            // disable the client in order to avoid requesting descriptors from UPnP devices
            return null;
        }

        @Override
        public StreamServer createStreamServer(NetworkAddressFactory networkAddressFactory) {
            return new org.fourthline.cling.transport.impl.apache.StreamServerImpl(
                    new StreamServerConfigurationImpl()
            );
        }
    };
}
 
开发者ID:camueller,项目名称:SmartApplianceEnabler,代码行数:22,代码来源:SempDiscovery.java

示例3: createConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
@Override
protected UpnpServiceConfiguration createConfiguration() {
	
    return new AndroidUpnpServiceConfiguration() {

        @Override
        public int getRegistryMaintenanceIntervalMillis() {
            return 20000;
        }
  
        @Override
        public ServiceType[] getExclusiveServiceTypes() {
            return new ServiceType[]{
                new UDAServiceType("ContentDirectory") //SwitchPower
            };
        }
    };
}
 
开发者ID:eriklupander,项目名称:microgramcaster,代码行数:19,代码来源:BrowserUpnpService.java

示例4: getConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
/**
 * returns the upnp service configuration
 *
 * @return the configuration
 */
public UpnpServiceConfiguration getConfiguration() {
    if (!isInitialized()) {
        return null;
    }
    return androidUpnpService.getConfiguration();
}
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:12,代码来源:UpnpClient.java

示例5: createConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
@Override
protected UpnpServiceConfiguration createConfiguration() {
    return new AndroidUpnpServiceConfiguration() {

        @Override
        public int getRegistryMaintenanceIntervalMillis() {
            return 7000;
        }

        @Override
        public ServiceType[] getExclusiveServiceTypes() {
            return new ServiceType[]{new UDAServiceType("ContentDirectory")};
        }
    };
}
 
开发者ID:MizzleDK,项目名称:Mizuu-Android-TV,代码行数:16,代码来源:UpnpService.java

示例6: RouterImpl

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
/**
 * @param configuration   The configuration used by this router.
 * @param protocolFactory The protocol factory used by this router.
 */
@Inject
public RouterImpl(UpnpServiceConfiguration configuration, ProtocolFactory protocolFactory) {
    log.info("Creating Router: " + getClass().getName());
    this.configuration = configuration;
    this.protocolFactory = protocolFactory;
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:11,代码来源:RouterImpl.java

示例7: ControlPointImpl

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
@Inject
public ControlPointImpl(UpnpServiceConfiguration configuration, ProtocolFactory protocolFactory, Registry registry) {
    log.fine("Creating ControlPoint: " + getClass().getName());
    
    this.configuration = configuration;
    this.protocolFactory = protocolFactory;
    this.registry = registry;
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:9,代码来源:ControlPointImpl.java

示例8: AndroidRouter

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
public AndroidRouter(UpnpServiceConfiguration configuration,
                     ProtocolFactory protocolFactory,
                     Context context) throws InitializationException {
    super(configuration, protocolFactory);

    this.context = context;
    this.wifiManager = ((WifiManager) context.getSystemService(Context.WIFI_SERVICE));
    this.networkInfo = NetworkUtils.getConnectedNetworkInfo(context);

    // Only register for network connectivity changes if we are not running on emulator
    if (!ModelUtil.ANDROID_EMULATOR) {
        this.broadcastReceiver = new ConnectivityBroadcastReceiver();
        context.registerReceiver(broadcastReceiver, new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE"));
    }
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:16,代码来源:AndroidRouter.java

示例9: createConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
private UpnpServiceConfiguration createConfiguration() {
    return new AndroidUpnpServiceConfiguration() {
        @Override  public ServiceType[] getExclusiveServiceTypes() {
            return new ServiceType[] {
                    new UDAServiceType("ContentDirectory", 1)
            };
        }
        @Override protected SOAPActionProcessor createSOAPActionProcessor() {
            return new RecoveringSOAPActionProcessorImpl() {
                @Override
                @DebugLog
                public void readBody(ActionResponseMessage responseMsg, ActionInvocation actionInvocation) throws UnsupportedDataException {
                    try {
                        super.readBody(responseMsg, actionInvocation);
                    } catch (Exception e) {
                        //Hack for X_GetFeatureList embedding this in the body
                        String fixedBody = StringUtils.remove(getMessageBody(responseMsg),"<?xml version=\"1.0\" encoding=\"utf-8\"?>");
                        responseMsg.setBody(fixedBody);
                        super.readBody(responseMsg, actionInvocation);
                    }
                }
            };
        }
        @Override public int getRegistryMaintenanceIntervalMillis() {
            return 2500;//10000;
        }
    };
}
 
开发者ID:OpenSilk,项目名称:Orpheus,代码行数:29,代码来源:UpnpServiceService.java

示例10: getConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
/**
 * returns the upnp service configuration
 * 
 * @return the configuration
 */
public UpnpServiceConfiguration getConfiguration() {
	if (!isInitialized()) {
		return null;
	}
	return androidUpnpService.getConfiguration();
}
 
开发者ID:msafin,项目名称:wmc,代码行数:12,代码来源:UpnpClient.java

示例11: createRouter

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
protected AndroidRouter createRouter(UpnpServiceConfiguration configuration,
                                     ProtocolFactory protocolFactory,
                                     Context context) {
    return new AndroidRouter(configuration, protocolFactory, context);
}
 
开发者ID:archos-sa,项目名称:aos-MediaLib,代码行数:6,代码来源:ArchosUpnpServiceImpl.java

示例12: getConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
public UpnpServiceConfiguration getConfiguration() {
    return upnpService.getConfiguration();
}
 
开发者ID:archos-sa,项目名称:aos-MediaLib,代码行数:4,代码来源:ArchosUpnpServiceImpl.java

示例13: createConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
@Override
protected UpnpServiceConfiguration createConfiguration() {
    return new FixedAndroidUpnpServiceConfiguration();
}
 
开发者ID:kevinshine,项目名称:BeyondUPnP,代码行数:5,代码来源:BeyondUpnpService.java

示例14: getConfiguration

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
public UpnpServiceConfiguration getConfiguration() {
    return configuration;
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:MockUpnpService.java

示例15: MockRouter

import org.fourthline.cling.UpnpServiceConfiguration; //导入依赖的package包/类
public MockRouter(UpnpServiceConfiguration configuration,
                  ProtocolFactory protocolFactory) {
    this.configuration = configuration;
    this.protocolFactory = protocolFactory;
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:6,代码来源:MockRouter.java


注:本文中的org.fourthline.cling.UpnpServiceConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。